Packages
 Comm
 DB
 Debug
 Input
 Interface
 Module
 Token
 User

Objects
 bitmapwidget
 databasenode
 dragdata
 textwidget
 tokeninstance
 widget
 widgetcontainer

Elements
 buttoncontrol
 categoryselectioncontrol
 chatentry
 chatwindow
 databasecontrol
 diecontrol
 diefield
 genericcontrol
 imagecontrol
 numbercontrol
 numberfield
 portraitselectioncontrol
 script
 scrollbarcontrol
 scrollercontrol
 stringcontrol
 stringfield
 subwindow
 textbasecontrol
 tokenbag
 tokencontrol
 tokenfield
 windowclass
 windowcontrol
 windowinstance
 windowlist
 windowreferencecontrol
 windowreferencefield

Components
 categoryselectionsettings
 customdie
 desktopframe
 die
 distance
 font
 framedef
 hotkeybar
 icon
 imageupdatefolder
 importinfo
 includefile
 panel
 portraitset
 properties
 replaces
 template
 tokenroot
 tooltip
onButtonPress
setColor
setIcons



Inherits windowcontrol
Context windowinstance

Button controls create buttons that respond to simple click events with graphical presentations for the normal, hover and pressed states. They are not connected to the database or any direct window functionality, but are useful for utility purposes.



Definition

<buttoncontrol >
<icon > The names of the icon resources used to render the control
<normal > ... </normal> The icon for the normal state
<pressed > ... </pressed> The icon for the pressed state
<hover > ... </hover> The icon for the hover state
</icon>
</buttoncontrol>


Interface

onButtonPress

event function onButtonPress( )

If present, this function is called when the buttoncontrol is pressed. (i.e. mouse clicked and released on button)


setColor

function setColor( color )

Sets the color used to draw the icons. The color is used to modulate the pixel colors of the bitmap images.

Parameters

color   (string)   
A color value in the form "AARRGGBB" where the components are hexadecimal digits specifying the alpha (transparency), red, green and blue channels, respectively, in the range 0 .. 255. If alpha is zero or not defined, FF is assumed.

setIcons

function setIcons( normal, pressed, [hover] )

Sets the names of the icon resources used for drawing the state icons in the contol. Setting them through this function overrides the values given in the control definition.

Parameters

normal   (string)   
The icon for the normal state
pressed   (string)   
The icon for the pressed state
hover   (string)   [optional]
The icon for the hover state


'Fantasy Grounds' is a trademark of SmiteWorks Ltd. All other trademarks are the property of their respective owners.
© 2004-2010 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy