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
formattedtextcontrol
formattedtextfield
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
addDie
getDice
isEmpty
onValueChanged
reset
setDice



Inherits windowcontrol
Context windowinstance

A die control contains a group of dice that can be of different types.

The control supports the "dice" dragdata type. Dropping dice on the control adds them to the list of dice contained in the control. Dragging from the control starts a die roll with the contained dice held.



Definition

<diecontrol name="..." >
<noreset /> Disable reset by using the middle mouse button
</diecontrol>


Interface

addDie

function addDie( type )

Add a die to the list of dice in the control. The specified value should be one of the built in die types ("d4", "d6", "d8", "d10", "d12" or "d20") or a custom die type.

Parameters

type(string)
The die identifier

getDice

function getDice( )

Get the dice contained in the control.

Return values

(table)
An integer indexed table containing strings specifying the types of the dice in the control

isEmpty

function isEmpty( )

Returns whether the control contains dice or is empty.

Return values

(boolean)
Whether the control is empty

onValueChanged

event function onValueChanged( )

If present, this function is executed whenever the value of this control changes.


reset

function reset( )

Empty the control, removing all dice.


setDice

function setDice( dice )

Reset the entire contents of the control to match the list given. The table should contain integer indexed strings identifying the die, either using one of the built in types ("d4", "d6", "d8", "d10", "d12" or "d20") or a custom die type.

Parameters

dice(table)
An integer indexed table containing die identifier strings


'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