beautypg.com

Iftouchscreen – BrightSign Object Reference Manual (FW 5.1) User Manual

Page 125

background image

117

The ifTouchScreen interface provides the following:

SetResolution(x As Integer, y As Integer) As Void

AddRectangleRegion(x As Integer, y As Integer, w As Integer, h As Integer, userid As

Integer) As Void

AddCircleRegion(x As Integer, y As Integer, radius As Integer, userid As Integer) As

Void

ClearRegions(): Clears the list of regions added using AddRectangleRegion() or AddCircleRegion() so
that any contacts in those regions no longer generate events. This call has no effect on the rollover graphics.

GetDeviceName() As String

SetCursorPosition(x As Integer, y As Integer) As Void

SetCursorBitmap(filename As String, x As Integer, y As Integer) As Void: Specifies a BMP
or PNG file as the mouse cursor icon. This method also accepts a "hot spot" (i.e. the point within the icon rectangle
that will trigger events when the mouse is clicked) as a set of

x,y coordinates. The icon can be a rectangle of any

width or height. The colors are specified internally in YUV (6-4-4 bits respectively), but pixels in the passed image
file can be one of 16 different colors. These colors are 16 bits, with 14 bits of color and 2 bits of alpha. If you use all
of the alpha levels on all shades, then you limit the number of available shades to five (five shades at three alpha
levels plus one fully transparent color gives 16).

EnableCursor(enable As Boolean) As Void

EnableRollover(region_id As Integer, on_image As String, off_image As String,
cache_image As Boolean, image_player As Object) As Void: Enables a rollover for a touch region.
The function accepts the ID of the touch region, as well as two strings specifying the names of the on and off
bitmap images, a cache setting, and the image player that draws the rollover. The cache_image parameter simply
tells the script whether to keep the bitmaps loaded in memory or not. This setting uses up memory very quickly, so
we recommend that cache_image normally be set to 0.

EnableRegion(region_id As Integer, enabled As Boolean) As Void: Enables or disables a rollover
region. The function accepts the ID of the touch region, as well as a Boolean value (True or False). The rollover