|
Contents
TwAddVarRW (function)DescriptionThis function adds a new variable to a tweak bar by specifiing the variable’s pointer. The variable is declared Read-Write (RW), so it could be modified interactively by the user. ParametersbarThe tweak bar to which adding a new variable. name
The name of the variable. It will be displayed in the tweak bar if no typeType of the variable. It must be one of the TwType constants. varPointer to the C/C++ variable linked to this entry. def
An optional definition string used to modify the behaviour of this new entry. This string must follow the variable commands syntax, or set to Return value
Examplefloat rotSpeed = 0; // ... TwAddVarRW(bar, "RotSpeed", TW_TYPE_FLOAT, &rotSpeed, " min=0 max=10 step=0.01 group=Engine label='Rotation speed' "); See also |