Meta_ColouredButtonStyle
Module: Metanodes / Definitions
A ColouredButtonStyle provides flat Meta_Button colours as well as button content layout controls.
#include <meta_gui.hpp>
Public Types
| Type | Name |
|---|---|
| enum | IDX { Idx_BGColour_normal, Idx_BGColour_hovering, Idx_BGColour_pressed, Idx_BGColour_toggled, Idx_TextSize, Idx_TextPadding, Idx_TextColour, Idx_Font, Idx_ImageSize, Idx_ImagePosition, Idx_HAlign, Idx_VAlign, Idx_Borders } Property index. |
| enum | ImagePosition { IMAGEPOSITION_LEFT, IMAGEPOSITION_TOP, IMAGEPOSITION_RIGHT, IMAGEPOSITION_BOTTOM, IMAGEPOSITION_CENTRE } Values for Idx_ImagePosition. |
Public Types Documentation
enum IDX
| Enumerator | Value | Description |
|---|---|---|
| Idx_BGColour_normal | vec4f - Background colour; RGBA 0.0f to 1.0f | |
| Idx_BGColour_hovering | vec4f - Background colour when hovering; RGBA 0.0f to 1.0f | |
| Idx_BGColour_pressed | vec4f - Background colour when pressed; RGBA 0.0f to 1.0f | |
| Idx_BGColour_toggled | vec4f - Background colour when toggled; RGBA 0.0f to 1.0f | |
| Idx_TextSize | float - Scalar applied to text to control its size | |
| Idx_TextPadding | vec2f - Padding around text | |
| Idx_TextColour | vec4f - Text colour; RGBA 0.0f to 1.0f | |
| Idx_Font | link - Font to use to display the text (Meta_Font) | |
| Idx_ImageSize | float - Scalar applied to image to control its size | |
| Idx_ImagePosition | ImagePosition (int) - How to align the image around the text | |
| Idx_HAlign | HAlign (int) - How to align the objects horizontally | |
| Idx_VAlign | VAlign (int) - How to align the objects vertically | |
| Idx_Borders | vec2f - Padding around the edge of the button |
Property index.
enum ImagePosition
| Enumerator | Value | Description |
|---|---|---|
| IMAGEPOSITION_LEFT | (Symbols - C: "ImagePositionLeft", Lua: __ColouredButtonStyle_ImagePositionLeft) | |
| IMAGEPOSITION_TOP | (Symbols - C: "ImagePositionTop", Lua: __ColouredButtonStyle_ImagePositionTop) | |
| IMAGEPOSITION_RIGHT | (Symbols - C: "ImagePositionRight", Lua: __ColouredButtonStyle_ImagePositionRight) | |
| IMAGEPOSITION_BOTTOM | (Symbols - C: "ImagePositionBottom", Lua: __ColouredButtonStyle_ImagePositionBottom) | |
| IMAGEPOSITION_CENTRE | (Symbols - C: "ImagePositionCentre", Lua: __ColouredButtonStyle_ImagePositionCentre) |
Values for Idx_ImagePosition.