
Prototype: GemRB.SetButtonFlags(WindowIndex, ControlIndex, Flags, Operation)

Metaclass Prototype: SetFlags(Flags, Operation)

Description: Sets the Display Flags of a Button. 

Parameters:
WindowIndex, ControlIndex  - the control's reference
Flags                      - various bits altering the behaviour of the control
IE_GUI_BUTTON_NO_IMAGE   = 0x00000001, no button image set by SetButtonSprites
IE_GUI_BUTTON_PICTURE    = 0x00000002, has picture set by other SetButton* commands
IE_GUI_BUTTON_SOUND      = 0x00000004, clicking the button has a sound
IE_GUI_BUTTON_CAPS       = 0x00000008, uppercase the button label
IE_GUI_BUTTON_CHECKBOX   = 0x00000010, it is a checkbox
IE_GUI_BUTTON_RADIOBUTTON= 0x00000020, it is a radio button
IE_GUI_BUTTON_DEFAULT    = 0x00000040, it is the default button
IE_GUI_BUTTON_DRAGGABLE  = 0x00000080, the image of the button is draggable?
Operation                  - the binary operation to be performed on the
                             current button flags
OP_SET = 0, sets the value completely
OP_OR = 1, sets (turns on) the 1 bits of the value
OP_NAND = 2, resets (turns off) the 1 bits of the value

Return value:  N/A

Examples:
GemRB.SetButtonFlags (window, button, IE_GUI_BUTTON_CHECKBOX, OP_OR)
This command will make the button behave like a checkbox.

GemRB.SetButtonFlags (Window, Button, IE_GUI_BUTTON_NO_IMAGE, OP_NAND)
This command will re-enable the images of the button (making it visible).

See also: SetButtonSprites, SetButtonPicture, SetButtonBAM

