| 177 | } |
| 178 | |
| 179 | bool 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 | |
| 189 | bool IMUIContext::DoButtonMouseOver(int id, bool mouse_over, UIState& ui_state) { |
| 190 | bool result = false; |
no outgoing calls
no test coverage detected