portraitselectioncontrol

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> <mask > ... </mask> </portraitselectioncontrol>

<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

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