Team premiums and the manager confirmation show pressed buttons

The back, send and switch buttons below the contract offer and team premium
panels and JA/NEIN of the manager confirmation are drawn pressed while the
mouse button is held, using the shared frame of ui/button_frame.hpp.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-08 17:49:57 +01:00
1 parent fb72de3895
commit b6bc17a381
7 files changed
+67 -15

No files matched your search

+7 -2
View File
@@ -461,11 +461,16 @@ int main(int argc, char** argv) {
random = random_before;
return -2;
}
// Clicks act on button release.
if (event.type == SDL_MOUSEBUTTONUP &&
// Clicks act on button release; a button held down is drawn pressed meanwhile.
if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_LEFT) {
if (screen.press(event.button.x, event.button.y)) {
present_season(screen.render(), "OpenBMH - contracts");
}
} else if (event.type == SDL_MOUSEBUTTONUP &&
(event.button.button == SDL_BUTTON_LEFT || event.button.button == SDL_BUTTON_RIGHT)) {
changed |= screen.click(event.button.x, event.button.y,
event.button.button == SDL_BUTTON_RIGHT);
changed = true; // also ends a pressed look that did not lead to a change
} else if (event.type == SDL_MOUSEMOTION) {
changed |= screen.move(event.motion.x, event.motion.y);
} else if (event.type == SDL_TEXTINPUT) {