MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DoButton

Method DoButton

Source/GUI/IMUI/imui.cpp:179–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179bool IMUIContext::DoButton(int id, vec2 top_left, vec2 bottom_right, UIState& ui_state) {
180 bool mouse_over = false;
181 if (mouse_pos[0] > top_left[0] && mouse_pos[0] < bottom_right[0] &&
182 mouse_pos[1] > top_left[1] && mouse_pos[1] < bottom_right[1]) {
183 mouse_over = true;
184 }
185
186 return DoButtonMouseOver(id, mouse_over, ui_state);
187}
188
189bool IMUIContext::DoButtonMouseOver(int id, bool mouse_over, UIState& ui_state) {
190 bool result = false;

Callers 1

DrawWeaponConnectionUIFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected