#include <WhiteBoxNumericInput.h>
Public Member Functions | |
| void | Begin (NumericOpMode mode) |
| void | SetAxis (NumericAxisConstraint axis) |
| void | AppendDigit (char digit) |
| void | AppendDecimal () |
| void | AppendOperator (char op) |
| void | Backspace () |
| void | Reset () |
| bool | IsActive () const |
| bool | IsEmpty () const |
| Returns true if no digits have been entered yet (expression is empty). | |
| float | GetValue () const |
| Evaluates the expression and returns the result. | |
| AZ::Vector3 | GetAxisVector () const |
| AZStd::string | GetStatusText () const |
Tracks the state of a Blender-style numeric input session.
Supports simple two-operand expressions: lhs [op] rhs e.g. "5" -> 5 "-5" -> -5 "10*2" -> 20 "10/4" -> 2.5 "3+2" -> 5 "10-3" -> 7
|
inline |
Handle an operator key: + - * / Rules:
Leading '-' -> start a negative first operand (e.g. "-5"). Leading '+' -> no-op (already positive). Leading '*' or '/' -> implicit LHS of "1" (so "*2" = 1x2 = 2; "/4" = 1/4 = 0.25). This lets you type J *2 Enter to scalex2, or J /2 Enter to scalex0.5. After a first operand is complete -> set the binary operator and start the RHS. Pressing the same operator again -> cancel it (back to LHS editing). Pressing a different operator while RHS is empty -> change operator.
|
inline |
Status string suitable for a viewport overlay. Example: "Move X: 5*2_" or "Rotate: 90_" or "Scale: -0.5_"