Packages
 Input
 Module
 User
 DB
 Interface

Objects
 bitmapwidget
 databasenode
 dragdata
 textwidget
 tokeninstance
 widget
 widgetcontainer

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

Components
 categoryselectionsettings
 customdie
 die
 font
 framedef
 desktopframe
 hotkeybar
 icon
 imageupdatefolder
 importinfo
 includefile
 panel
 portraitset
 template
 tokenroot
 tooltip
addDie
getDice
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="..." > ... </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

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.
'd20 System' and the d20 System logo are trademarks of Wizards of the Coast, Inc. in the United States and other countries and are used with permission.
© 2004-2008 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy