Minus and plus of the start menu show the original pressed picture
The buttons of the game setup (and of the joining manager's setup) use the darker picture from the bottom of the setup atlas while the mouse button is held, as in a recording of the real game; the release redraws even when the value is at its limit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09fcd8383f
commit
e65bd27375
5 files changed
+59
-2
No files matched your search
@@ -42,9 +42,14 @@ public:
|
||||
SetupScreen(const std::filesystem::path& data, SetupOptions current);
|
||||
const SetupOptions& options() const { return options_; }
|
||||
SetupResult click(int x, int y, bool right_button = false);
|
||||
// Mouse DOWN on a minus or plus button: drawn pressed until the release (click()). True when the picture changed.
|
||||
bool press(int x, int y);
|
||||
Image render() const;
|
||||
|
||||
private:
|
||||
int button_at(int x, int y) const;
|
||||
SetupResult handle_click(int x, int y, bool right);
|
||||
int pressed_button_ = -1; // minus/plus button held down by the mouse
|
||||
SetupOptions options_;
|
||||
Image background_, atlas_;
|
||||
std::array<int, 8> button_x_{}, button_y_{};
|
||||
|
||||
Reference in new issue
Block a user