Struct storing unit value logic natively.
More...
#include <VexUI.hpp>
|
| | UIUnitValue (float v) |
| | UIUnitValue (float v, UIUnitType t) |
| UIUnitValue & | operator= (float v) |
| void | parse (const nlohmann::json &jval) |
| | Parses a json value into the unit struct.
|
| nlohmann::json | toJson () const |
| | Converts the unit back to a json-compatible format (preserves strings like "px", "%").
|
| float | getPixels (const VexUI *ui) const |
| | Dynamically calculates the raw pixel representation required for rendering.
|
|
| static UIUnitValue | parseJson (const nlohmann::json &jval) |
Struct storing unit value logic natively.
Definition at line 41 of file VexUI.hpp.
◆ UIUnitValue() [1/2]
| vex::UIUnitValue::UIUnitValue |
( |
float | v | ) |
|
|
inline |
◆ UIUnitValue() [2/2]
| vex::UIUnitValue::UIUnitValue |
( |
float | v, |
|
|
UIUnitType | t ) |
|
inline |
◆ getPixels()
| float vex::UIUnitValue::getPixels |
( |
const VexUI * | ui | ) |
const |
Dynamically calculates the raw pixel representation required for rendering.
Definition at line 320 of file VexUI.cpp.
◆ operator=()
| UIUnitValue & vex::UIUnitValue::operator= |
( |
float | v | ) |
|
|
inline |
◆ parse()
| void vex::UIUnitValue::parse |
( |
const nlohmann::json & | jval | ) |
|
Parses a json value into the unit struct.
Definition at line 284 of file VexUI.cpp.
◆ parseJson()
| UIUnitValue vex::UIUnitValue::parseJson |
( |
const nlohmann::json & | jval | ) |
|
|
inlinestatic |
◆ toJson()
| nlohmann::json vex::UIUnitValue::toJson |
( |
| ) |
const |
Converts the unit back to a json-compatible format (preserves strings like "px", "%").
Definition at line 306 of file VexUI.cpp.
◆ type
| UIUnitType vex::UIUnitValue::type = UIUnitType::Psp |
◆ value
| float vex::UIUnitValue::value = 0.f |
The documentation for this struct was generated from the following files: