GUI: Added override specifiers

This commit is contained in:
Eugene Sandulenko 2018-03-28 12:47:23 +02:00
parent ea7f92bb21
commit b0affe5bf2
4 changed files with 27 additions and 27 deletions

View file

@ -42,29 +42,29 @@ public:
void drawDialog(DrawLayer layerToDraw) override; void drawDialog(DrawLayer layerToDraw) override;
virtual void receivedFocus(int x = -1, int y = -1) {} virtual void receivedFocus(int x = -1, int y = -1) override {}
protected: protected:
virtual void handleMouseDown(int x, int y, int button, int clickCount) { virtual void handleMouseDown(int x, int y, int button, int clickCount) override {
close(); close();
_parent->handleMouseDown(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount); _parent->handleMouseDown(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount);
} }
virtual void handleMouseUp(int x, int y, int button, int clickCount) { virtual void handleMouseUp(int x, int y, int button, int clickCount) override {
close(); close();
_parent->handleMouseUp(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount); _parent->handleMouseUp(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount);
} }
virtual void handleMouseWheel(int x, int y, int direction) { virtual void handleMouseWheel(int x, int y, int direction) override {
close(); close();
_parent->handleMouseWheel(x + (getAbsX() - _parent->getAbsX()), y + (getAbsX() - _parent->getAbsX()), direction); _parent->handleMouseWheel(x + (getAbsX() - _parent->getAbsX()), y + (getAbsX() - _parent->getAbsX()), direction);
} }
virtual void handleKeyDown(Common::KeyState state) { virtual void handleKeyDown(Common::KeyState state) override {
close(); close();
_parent->handleKeyDown(state); _parent->handleKeyDown(state);
} }
virtual void handleKeyUp(Common::KeyState state) { virtual void handleKeyUp(Common::KeyState state) override {
close(); close();
_parent->handleKeyUp(state); _parent->handleKeyUp(state);
} }
virtual void handleMouseMoved(int x, int y, int button) { virtual void handleMouseMoved(int x, int y, int button) override {
close(); close();
} }

View file

@ -130,15 +130,15 @@ protected:
public: public:
ConsoleDialog(float widthPercent, float heightPercent); ConsoleDialog(float widthPercent, float heightPercent);
void open(); void open() override;
void close(); void close() override;
void drawDialog(DrawLayer layerToDraw) override; void drawDialog(DrawLayer layerToDraw) override;
void handleTickle(); void handleTickle() override;
void reflowLayout(); void reflowLayout() override;
void handleMouseWheel(int x, int y, int direction); void handleMouseWheel(int x, int y, int direction) override;
void handleKeyDown(Common::KeyState state); void handleKeyDown(Common::KeyState state) override;
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
int printFormat(int dummy, const char *format, ...) GCC_PRINTF(3, 4); int printFormat(int dummy, const char *format, ...) GCC_PRINTF(3, 4);
int vprintFormat(int dummy, const char *format, va_list argptr); int vprintFormat(int dummy, const char *format, va_list argptr);

View file

@ -50,10 +50,10 @@ public:
void drawDialog(DrawLayer layerToDraw) override; void drawDialog(DrawLayer layerToDraw) override;
void handleMouseUp(int x, int y, int button, int clickCount); void handleMouseUp(int x, int y, int button, int clickCount) override;
void handleMouseWheel(int x, int y, int direction); // Scroll through entries with scroll wheel void handleMouseWheel(int x, int y, int direction) override; // Scroll through entries with scroll wheel
void handleMouseMoved(int x, int y, int button); // Redraw selections depending on mouse position void handleMouseMoved(int x, int y, int button) override; // Redraw selections depending on mouse position
void handleKeyDown(Common::KeyState state); // Scroll through entries with arrow keys etc. void handleKeyDown(Common::KeyState state) override; // Scroll through entries with arrow keys etc.
protected: protected:
void drawMenuEntry(int entry, bool hilite); void drawMenuEntry(int entry, bool hilite);

View file

@ -101,15 +101,15 @@ public:
_tabs[tabID].title = title; _tabs[tabID].title = title;
} }
virtual void handleMouseDown(int x, int y, int button, int clickCount); virtual void handleMouseDown(int x, int y, int button, int clickCount) override;
virtual bool handleKeyDown(Common::KeyState state); virtual bool handleKeyDown(Common::KeyState state) override;
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
virtual int getFirstVisible() const; virtual int getFirstVisible() const;
virtual void setFirstVisible(int tabID, bool adjustIfRoom = false); virtual void setFirstVisible(int tabID, bool adjustIfRoom = false);
virtual bool containsWidget(Widget *) const; virtual bool containsWidget(Widget *) const override;
virtual void reflowLayout(); virtual void reflowLayout() override;
void draw() override; void draw() override;
void markAsDirty() override; void markAsDirty() override;
@ -117,12 +117,12 @@ public:
protected: protected:
// We overload getChildY to make sure child widgets are positioned correctly. // We overload getChildY to make sure child widgets are positioned correctly.
// Essentially this compensates for the space taken up by the tab title header. // Essentially this compensates for the space taken up by the tab title header.
virtual int16 getChildY() const; virtual int16 getChildY() const override;
virtual uint16 getHeight() const; virtual uint16 getHeight() const override;
virtual void drawWidget(); virtual void drawWidget() override;
virtual Widget *findWidget(int x, int y); virtual Widget *findWidget(int x, int y) override;
virtual void adjustTabs(int value); virtual void adjustTabs(int value);