events::sdl_handler: Make handle_window_event optional

Very little actually uses this.
This commit is contained in:
Tommy 2022-07-17 02:54:51 +12:00
parent 6a2ea6ed3e
commit 1fea22a51d
3 changed files with 1 additions and 8 deletions

View File

@ -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_;

View File

@ -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() {}

View File

@ -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;