1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-14 10:09:11 +00:00

Codechange: Use override specifier in Window-derived classes.

This commit is contained in:
2019-03-04 07:49:37 +00:00
committed by Michael Lutz
parent aafce47596
commit 317f69c152
54 changed files with 765 additions and 765 deletions

View File

@@ -94,12 +94,12 @@ struct OskWindow : public Window {
this->SetWidgetLoweredState(WID_OSK_CAPS, HasBit(_keystate, KEYS_CAPS));
}
virtual void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
if (widget == WID_OSK_CAPTION) SetDParam(0, this->caption);
}
virtual void DrawWidget(const Rect &r, int widget) const
void DrawWidget(const Rect &r, int widget) const override
{
if (widget < WID_OSK_LETTERS) return;
@@ -110,7 +110,7 @@ struct OskWindow : public Window {
TC_BLACK);
}
virtual void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
/* clicked a letter */
if (widget >= WID_OSK_LETTERS) {
@@ -192,21 +192,21 @@ struct OskWindow : public Window {
}
}
virtual void OnEditboxChanged(int widget)
void OnEditboxChanged(int widget) override
{
this->SetWidgetDirty(WID_OSK_TEXT);
this->parent->OnEditboxChanged(this->text_btn);
this->parent->SetWidgetDirty(this->text_btn);
}
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
void OnInvalidateData(int data = 0, bool gui_scope = true) override
{
if (!gui_scope) return;
this->SetWidgetDirty(WID_OSK_TEXT);
this->parent->SetWidgetDirty(this->text_btn);
}
virtual void OnFocusLost()
void OnFocusLost() override
{
VideoDriver::GetInstance()->EditBoxLostFocus();
delete this;