Table of Contents | ||||||
|
||||||
ChangeState | ||||||
Purpose Changes a button's state |
||||||
Protoype void CButtonMngr::ChangeState (string str_button, int i_state, bool b_override = false) |
||||||
Parameters
|
||||||
Description This function changes the state of a button. The ID of the button you want to change is passed in via str_button, and the new state via i_state. Note that the numerical state value must be between 0 and 3, as there are only 4 states that a button can have. By default, the function checks to make sure that a state transition can actually be made (a stuck or disabled button cannot change state without being unstuck or re-enabled for example). I you wish to over-ride this feature and force a state change no matter what, then you can pass TRUE for b_override.
|
||||||
Use #define STATE_UP 1 CButtonMngr button; // normal state change button.ChangeState("my_button", STATE_UP); // forced state change button.ChangeState("my_button", STATE_UP, true); |
||||||
|
||||||
|