MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / setState

Method setState

forms/tristatebox.cpp:99–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void TriStateBox::setState(int state)
100{
101 if (State == state)
102 return;
103 State = state;
104 this->pushFormEvent(FormEventType::TriStateBoxChange, nullptr);
105 switch (State)
106 {
107 case 1:
108 this->pushFormEvent(FormEventType::TriStateBoxState1Selected, nullptr);
109 break;
110 case 2:
111 this->pushFormEvent(FormEventType::TriStateBoxState2Selected, nullptr);
112 break;
113 case 3:
114 this->pushFormEvent(FormEventType::TriStateBoxState3Selected, nullptr);
115 break;
116 }
117}
118
119void TriStateBox::nextState()
120{

Callers 3

serializeInFunction · 0.45
updateSoldierButtonsMethod · 0.45
mainFunction · 0.45

Calls 1

pushFormEventMethod · 0.80

Tested by 1

mainFunction · 0.36