summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 5c2e06070..ef434c4ff 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -337,7 +337,7 @@ public:
this->last_sorting = this->stations.GetListing();
}
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
+ void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
switch (widget) {
case WID_STL_SORTBY: {
@@ -393,7 +393,7 @@ public:
}
}
- virtual void OnPaint()
+ void OnPaint() override
{
this->BuildStationsList((Owner)this->window_number);
this->SortStationsList();
@@ -401,7 +401,7 @@ public:
this->DrawWidgets();
}
- virtual void DrawWidget(const Rect &r, int widget) const
+ void DrawWidget(const Rect &r, int widget) const override
{
switch (widget) {
case WID_STL_SORTBY:
@@ -485,7 +485,7 @@ public:
}
}
- virtual void SetStringParameters(int widget) const
+ void SetStringParameters(int widget) const override
{
if (widget == WID_STL_CAPTION) {
SetDParam(0, this->window_number);
@@ -493,7 +493,7 @@ public:
}
}
- virtual void OnClick(Point pt, int widget, int click_count)
+ void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_STL_LIST: {
@@ -609,7 +609,7 @@ public:
}
}
- virtual void OnDropdownSelect(int widget, int index)
+ void OnDropdownSelect(int widget, int index) override
{
if (this->stations.SortType() != index) {
this->stations.SetSortType(index);
@@ -621,7 +621,7 @@ public:
}
}
- virtual void OnGameTick()
+ void OnGameTick() override
{
if (this->stations.NeedResort()) {
DEBUG(misc, 3, "Periodic rebuild station list company %d", this->window_number);
@@ -629,7 +629,7 @@ public:
}
}
- virtual void OnResize()
+ void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_STL_LIST, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
}
@@ -639,7 +639,7 @@ public:
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
+ void OnInvalidateData(int data = 0, bool gui_scope = true) override
{
if (data == 0) {
/* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
@@ -1361,7 +1361,7 @@ struct StationViewWindow : public Window {
data->Update(count);
}
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
+ void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
switch (widget) {
case WID_SV_WAITING:
@@ -1385,7 +1385,7 @@ struct StationViewWindow : public Window {
}
}
- virtual void OnPaint()
+ void OnPaint() override
{
const Station *st = Station::Get(this->window_number);
CargoDataEntry cargo;
@@ -1441,7 +1441,7 @@ struct StationViewWindow : public Window {
}
}
- virtual void SetStringParameters(int widget) const
+ void SetStringParameters(int widget) const override
{
const Station *st = Station::Get(this->window_number);
SetDParam(0, st->index);
@@ -1876,7 +1876,7 @@ struct StationViewWindow : public Window {
this->SetWidgetDirty(WID_SV_WAITING);
}
- virtual void OnClick(Point pt, int widget, int click_count)
+ void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_SV_WAITING:
@@ -2037,7 +2037,7 @@ struct StationViewWindow : public Window {
this->SetDirty();
}
- virtual void OnDropdownSelect(int widget, int index)
+ void OnDropdownSelect(int widget, int index) override
{
if (widget == WID_SV_SORT_BY) {
this->SelectSortBy(index);
@@ -2046,14 +2046,14 @@ struct StationViewWindow : public Window {
}
}
- virtual void OnQueryTextFinished(char *str)
+ void OnQueryTextFinished(char *str) override
{
if (str == NULL) return;
DoCommandP(0, this->window_number, 0, CMD_RENAME_STATION | CMD_MSG(STR_ERROR_CAN_T_RENAME_STATION), NULL, str);
}
- virtual void OnResize()
+ void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_SV_WAITING, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
}
@@ -2063,7 +2063,7 @@ struct StationViewWindow : public Window {
* @param data Information about the changed data. If it's a valid cargo ID, invalidate the cargo data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
+ void OnInvalidateData(int data = 0, bool gui_scope = true) override
{
if (gui_scope) {
if (data >= 0 && data < NUM_CARGO) {
@@ -2249,7 +2249,7 @@ struct SelectStationWindow : Window {
this->OnInvalidateData(0);
}
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
+ void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
if (widget != WID_JS_PANEL) return;
@@ -2269,7 +2269,7 @@ struct SelectStationWindow : Window {
*size = d;
}
- virtual void DrawWidget(const Rect &r, int widget) const
+ void DrawWidget(const Rect &r, int widget) const override
{
if (widget != WID_JS_PANEL) return;
@@ -2290,7 +2290,7 @@ struct SelectStationWindow : Window {
}
}
- virtual void OnClick(Point pt, int widget, int click_count)
+ void OnClick(Point pt, int widget, int click_count) override
{
if (widget != WID_JS_PANEL) return;
@@ -2311,7 +2311,7 @@ struct SelectStationWindow : Window {
DeleteWindowById(WC_SELECT_STATION, 0);
}
- virtual void OnRealtimeTick(uint delta_ms)
+ void OnRealtimeTick(uint delta_ms) override
{
if (_thd.dirty & 2) {
_thd.dirty &= ~2;
@@ -2319,7 +2319,7 @@ struct SelectStationWindow : Window {
}
}
- virtual void OnResize()
+ void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_JS_PANEL, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
}
@@ -2329,7 +2329,7 @@ struct SelectStationWindow : Window {
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
+ void OnInvalidateData(int data = 0, bool gui_scope = true) override
{
if (!gui_scope) return;
FindStationsNearby<T>(this->area, true);