Packages
 Comm
 DB
 Debug
 Extension
 Input
 Interface
 Module
 Token
 User

Objects
 bitmapwidget
 databasenode
 dragdata
 textbasecontrol
 textwidget
 tokeninstance
 widget
 widgetcontainer
 windowcontrol
 windowinstance

Controls
 buttoncontrol
 buttonfield
 categoryselectioncontrol
 chatentry
 chatwindow
 databasecontrol
 diecontrol
 diefield
 formattedtextcontrol
 formattedtextfield
 genericcontrol
 imagecontrol
 numbercontrol
 numberfield
 portraitselectioncontrol
 scrollbarcontrol
 scrollercontrol
 stringcontrol
 stringfield
 subwindow
 tokenbag
 tokencontrol
 tokenfield
 windowlist
 windowreferencecontrol
 windowreferencefield

Assets and Settings
 announcement
 categoryselectionsettings
 characterdbroot
 customdie
 description
 desktopframe
 die
 diebox
 distance
 font
 framedef
 hotkeybar
 icon
 imageupdatefolder
 imagesettings
 importinfo
 importruleset
 includefile
 panel
 pollbox
 portraitset
 properties
 replaces
 script
 string
 template
 textsettings
 tokenroot
 tooltip
 windowclass
activate
getFile
setFile



Inherits windowcontrol
Context windowinstance

A portrait selection control is a special control intended purely for identity portrait selection. It has a special feature allowing it to directly access image files in the "portraits" folder under the program installation directory.

Each portrait selection control should be initialized with a particular file found using User.getPortraitFileList.

The loaded portrait image is displayed layered on the specified base bitmap, and masked using the specified mask bitmap's transparency.



Definition

<portraitselectioncontrol >
<base > ... </base> The name of an icon resource used to draw the portrait frame
<mask > ... </mask> The name of an icon resource used to mask the portrait image
</portraitselectioncontrol>


Interface


activate

function activate()

Notifies the framework that the user has selected this portrait for use. The portrait will be applied to the currently active identity for the currently active user.


getFile

function getFile()

Gets the name of the file represented in the control. The value returned should only be used as an identifier to pass to secondary functions such as User.setPortrait.

Return values

(string)
The name of the portrait image file contained in the control

setFile

function setFile(bitmap)

Sets the bitmap represented by this control. This must be a simple filename as reported by User.getPortraitFileList.

Parameters

bitmap   (string)   

The name of the image file containing a portrait bitmap



'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