mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 11:57:19 +00:00
events::sdl_handler: Make handle_window_event optional
Very little actually uses this.
This commit is contained in:
parent
6a2ea6ed3e
commit
1fea22a51d
@ -148,11 +148,6 @@ protected:
|
||||
*/
|
||||
void handle_event(const SDL_Event& event) override;
|
||||
|
||||
void handle_window_event(const SDL_Event& /*event*/) override
|
||||
{
|
||||
// No action by default
|
||||
}
|
||||
|
||||
/** Process keydown (only when the general map display does not have focus). */
|
||||
virtual void process_focus_keydown_event(const SDL_Event& /*event*/)
|
||||
{
|
||||
@ -211,7 +206,6 @@ private:
|
||||
}
|
||||
|
||||
void handle_event(const SDL_Event& event) override;
|
||||
void handle_window_event(const SDL_Event&) override {}
|
||||
|
||||
private:
|
||||
controller_base& controller_;
|
||||
|
@ -76,7 +76,7 @@ class sdl_handler
|
||||
friend class context;
|
||||
public:
|
||||
virtual void handle_event(const SDL_Event& event) = 0;
|
||||
virtual void handle_window_event(const SDL_Event& event) = 0;
|
||||
virtual void handle_window_event(const SDL_Event&) {};
|
||||
virtual void process_event() {}
|
||||
virtual void draw() {}
|
||||
|
||||
|
@ -102,7 +102,6 @@ protected:
|
||||
|
||||
// TODO: draw_manager - only things that need events should be handlers
|
||||
virtual void handle_event(const SDL_Event&) override {};
|
||||
virtual void handle_window_event(const SDL_Event&) override {};
|
||||
bool focus_; // Should user input be ignored?
|
||||
|
||||
bool mouse_locked() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user