|
GuiIconButtonCtrl Class Reference
[Core Controls]
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. More...
Public Member Functions | |
void | setBitmap (string buttonFilename) |
Set the bitmap to use for the button portion of this control. | |
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. | |
int | textMargin |
Margin between the icon and the text. |
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.
- Example:
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"; };
- See also:
- GuiControl
- GuiButtonCtrl
Member Function Documentation
void GuiIconButtonCtrl::setBitmap | ( | string | buttonFilename | ) |
Set the bitmap to use for the button portion of this control.
- Parameters:
-
buttonFilename Filename for the image
- Example:
// Define the button filename %buttonFilename = "pearlButton"; // Inform the GuiIconButtonCtrl control to update its main button graphic to the defined bitmap %thisGuiIconButtonCtrl.setBitmap(%buttonFilename);
- See also:
- GuiControl
- GuiButtonCtrl
Member Data Documentation
If true, the text and icon will be automatically sized to the size of the control.
Point2I GuiIconButtonCtrl::buttonMargin |
Margin area around the button.
filename GuiIconButtonCtrl::iconBitmap |
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).
If true, will make sure the icon is square.
If true, the icon will be scaled to be the same size as the button.
Where to place the text on the control.
Options are 0 (None), 1 (Bottom), 2 (Right), 3 (Top), 4 (Left), 5 (Center).
Margin between the icon and the text.