![]() |
BlankMat 0.1.0
Free open-source 3D texture creation application
|
A float that can be directly displayed and edited in the UI. More...
Public Member Functions | |
void | Display () override |
Displays the variable as an editable field in the UI. | |
float | operator+ (float other) const |
Adds the given value to this value. | |
float | operator+ (const UIFloat &other) const |
Adds the given value to this value. | |
UIFloat (const std::string &name="", float value=0.0f, ActionStack *actionStack=nullptr, std::function< void()> callback=std::function< void()>(nullptr)) | |
Creates a new variable that can be displayed and updated directly in the UI. | |
![]() | |
bool | Equals (const float &value) const |
Returns whether the value is equal to the given value. | |
float | Get () const |
Returns the current value of this variable. | |
float * | GetRef () const |
Returns a reference to the value stored in this variable. This is unsafe, but is necessary for Commands outside of the class to update the value. | |
operator float () | |
Explicitly converts this variable to its internal value. | |
float & | operator* () |
Returns a reference to the value stored in this variable. | |
float * | operator-> () |
Returns a reference to the value stored in this variable. | |
std::string | Name () const |
Returns the name of the variable. | |
void | Set (const float &newValue) |
Sets the value of the variable to the new value only if it is different. Sends a Command to the action stack indicating the changed value. | |
void | SetNoUpdate (const float &newValue) |
Sets the value of the variable to the new value without creating a command. | |
Additional Inherited Members | |
![]() | |
std::string | mName |
Name of the variable. | |
float | mValue |
Value of the variable. | |
ActionStack * | mActionStack |
Reference to the global action stack. | |
std::function< void()> | mSetCallback |
Callback function that runs whenever set is modified. | |
A float that can be directly displayed and edited in the UI.
|
inlineexplicit |
Creates a new variable that can be displayed and updated directly in the UI.
name | Name of the variable |
value | Value to initialize the variable to |
actionStack | Global action stack |
callback | Callback function to run when set |
|
inlineoverridevirtual |
Displays the variable as an editable field in the UI.
Implements IUIVariable< float >.
|
inline |
Adds the given value to this value.
other | Value to add |
|
inline |
Adds the given value to this value.
other | Value to add |