GuiIconButtonCtrl
Draws the bitmap within a special button control. Only a single bitmap is used and the button will be drawn in a highlighted mode when the mouse hovers over it or when it has been clicked.
Public Attributes
bool
If true, the text and icon will be automatically sized to the size of the control.
Point2I
Margin area around the button.
filename
Bitmap file for the icon to display on the button.
Where to place the icon on the control. Options are 0 (None), 1 (Left), 2 (Right), 3 (Center).
bool
If true, will make sure the icon is square.
bool
If true, the icon will be scaled to be the same size as the button.
Where to place the text on the control.
int
Margin between the icon and the text.
Public Functions
void
setBitmap(string buttonFilename)
Set the bitmap to use for the button portion of this control.
Detailed Description
Draws the bitmap within a special button control. Only a single bitmap is used and the button will be drawn in a highlighted mode when the mouse hovers over it or when it has been clicked.
new GuiIconButtonCtrl(TestIconButton) { buttonMargin = "4 4"; iconBitmap = "art/gui/lagIcon.png"; iconLocation = "Center"; sizeIconToButton = "0"; makeIconSquare = "1"; textLocation = "Bottom"; textMargin = "-2"; autoSize = "0"; text = "Lag Icon"; textID = ""STR_LAG""; buttonType = "PushButton"; profile = "GuiIconButtonProfile"; };
Public Attributes
bool autoSize
If true, the text and icon will be automatically sized to the size of the control.
Point2I buttonMargin
Margin area around the button.
filename iconBitmap
Bitmap file for the icon to display on the button.
GuiIconButtonIconLocation iconLocation
Where to place the icon on the control. Options are 0 (None), 1 (Left), 2 (Right), 3 (Center).
bool makeIconSquare
If true, will make sure the icon is square.
bool sizeIconToButton
If true, the icon will be scaled to be the same size as the button.
GuiIconButtonTextLocation textLocation
Where to place the text on the control.
Options are 0 (None), 1 (Bottom), 2 (Right), 3 (Top), 4 (Left), 5 (Center).
int textMargin
Margin between the icon and the text.
Public Functions
setBitmap(string buttonFilename)
Set the bitmap to use for the button portion of this control.
Parameters:
buttonFilename | Filename for the image // Define the button filename %buttonFilename = "pearlButton"; // Inform the GuiIconButtonCtrl control to update its main button graphic to the defined bitmap %thisGuiIconButtonCtrl.setBitmap(%buttonFilename); |