General use UiElement for handeling input events. Add to a window's elements member to start recieving events.
More...
|
| | UiElement (float anchorX, float anchorY, std::uint32_t bufferWidth, std::uint32_t bufferHeight, std::uint32_t absoluteWidth, std::uint32_t absoluteHeight, float anchorOffsetX=0.5, float anchorOffsetY=0.5, float z=0, bool ignoreScaling=false) |
| | Constructs a UiElement with absolute dimensions.
|
| |
| | UiElement (float anchorX, float anchorY, std::uint32_t bufferWidth, std::uint32_t bufferHeight, float relativeWidth, float relativeHeight, float anchorOffsetX=0.5, float anchorOffsetY=0.5, float z=0, bool ignoreScaling=false) |
| | Constructs a UiElement with relative dimensions.
|
| |
|
|
Event< MouseMoveEvent > | onMouseMove |
| |
|
Event< MouseMoveEvent > | onMouseEnter |
| |
|
Event< MouseMoveEvent > | onMouseLeave |
| |
|
Event< MousePoint > | onMouseRightClick |
| |
|
Event< MousePoint > | onMouseLeftClick |
| |
|
Event< MousePoint > | onMouseRightHold |
| |
|
Event< MousePoint > | onMouseLeftHold |
| |
|
Event< MousePoint > | onMouseRightRelease |
| |
|
Event< MousePoint > | onMouseLeftRelease |
| |
|
float | z |
| |
|
float | anchorX |
| |
|
float | anchorY |
| |
|
bool | useRelativeSize |
| |
|
bool | ignoreScaling |
| |
|
std::uint32_t | bufferWidth |
| |
|
std::uint32_t | bufferHeight |
| |
|
std::uint32_t | absoluteWidth |
| |
|
std::uint32_t | absoluteHeight |
| |
|
float | relativeWidth |
| |
|
float | relativeHeight |
| |
|
float | anchorOffsetX |
| |
|
float | anchorOffsetY |
| |
|
std::vector< Pixel_BU8_GU8_RU8_AU8 > | buffer |
| |
|
std::vector< UiElement > | children |
| |
General use UiElement for handeling input events. Add to a window's elements member to start recieving events.
◆ UiElement() [1/2]
| Crafter::UiElement::UiElement |
( |
float | anchorX, |
|
|
float | anchorY, |
|
|
std::uint32_t | bufferWidth, |
|
|
std::uint32_t | bufferHeight, |
|
|
std::uint32_t | absoluteWidth, |
|
|
std::uint32_t | absoluteHeight, |
|
|
float | anchorOffsetX = 0.5, |
|
|
float | anchorOffsetY = 0.5, |
|
|
float | z = 0, |
|
|
bool | ignoreScaling = false ) |
Constructs a UiElement with absolute dimensions.
- Parameters
-
| anchorX | Relative position where this elements x anchor (top-left) is placed to its parent x anchor |
| anchorY | Relative position where this elements y anchor (top-left) is placed to its parent y anchor |
| bufferWidth | The width of this elements pixel buffer |
| bufferHeight | The height of this elements pixel buffer |
| absoluteWidth | The absolute x size in pixels this element should be scaled to |
| absoluteHeight | The absolute y size in pixels this element should be scaled to |
| anchorOffsetX | The amount this element's anchor should be offset from the top left corner (0.5 to in the middle) |
| anchorOffsetY | The amount this element's anchor should be offset from the top left corner (0.5 to place it in the middle) |
| z | This elements Z position |
| ignoreScaling | Wether this element ignores the scaling of the window, if true its size will be scaled according to the window scale |
◆ UiElement() [2/2]
| Crafter::UiElement::UiElement |
( |
float | anchorX, |
|
|
float | anchorY, |
|
|
std::uint32_t | bufferWidth, |
|
|
std::uint32_t | bufferHeight, |
|
|
float | relativeWidth, |
|
|
float | relativeHeight, |
|
|
float | anchorOffsetX = 0.5, |
|
|
float | anchorOffsetY = 0.5, |
|
|
float | z = 0, |
|
|
bool | ignoreScaling = false ) |
Constructs a UiElement with relative dimensions.
- Parameters
-
| anchorX | Relative position where this elements x anchor (top-left) is placed to its parent x anchor |
| anchorY | Relative position where this elements y anchor (top-left) is placed to its parent y anchor |
| bufferWidth | The width of this elements pixel buffer |
| bufferHeight | The height of this elements pixel buffer |
| relativeWidth | The relative x size this element should be scaled to compared to its parent |
| relativeHeight | The relative y size this element should be scaled to compared to its parent |
| anchorOffsetX | The amount this element's anchor should be offset from the top left corner (0.5 to in the middle) |
| anchorOffsetY | The amount this element's anchor should be offset from the top left corner (0.5 to place it in the middle) |
| z | This elements Z position |
| ignoreScaling | Wether this element ignores the scaling of the window, if true its size will be scaled according to the window scale |
The documentation for this class was generated from the following file:
- src/module/Crafter.Graphics-UiElement.cppm