summaryrefslogtreecommitdiff
path: root/src/tree_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-04 07:49:37 +0000
committerMichael Lutz <michi@icosahedron.de>2019-03-24 16:10:04 +0100
commit317f69c1520a3e60335c56d358686609d3decf86 (patch)
treea3432e9e5f433043f3e5431892f49580f1965c73 /src/tree_gui.cpp
parentaafce475963e2d2df59de9b02242a04856e78f93 (diff)
downloadopenttd-317f69c1520a3e60335c56d358686609d3decf86.tar.xz
Codechange: Use override specifier in Window-derived classes.
Diffstat (limited to 'src/tree_gui.cpp')
-rw-r--r--src/tree_gui.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp
index f21eeaef2..1b1dce95a 100644
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -84,7 +84,7 @@ public:
return size;
}
- 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_BT_TYPE_11 && widget <= WID_BT_TYPE_34) {
Dimension d = GetMaxTreeSpriteSize();
@@ -102,7 +102,7 @@ public:
}
}
- virtual void DrawWidget(const Rect &r, int widget) const
+ void DrawWidget(const Rect &r, int widget) const override
{
if (widget < WID_BT_TYPE_11 || widget > WID_BT_TYPE_34 || widget - WID_BT_TYPE_11 >= this->count) return;
@@ -111,7 +111,7 @@ public:
DrawSprite(tree_sprites[i].sprite, tree_sprites[i].pal, (r.left + r.right) / 2 + WD_FRAMERECT_LEFT, r.bottom - 7);
}
- virtual void OnClick(Point pt, int widget, int click_count)
+ void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_BT_TYPE_11: case WID_BT_TYPE_12: case WID_BT_TYPE_13: case WID_BT_TYPE_14:
@@ -138,17 +138,17 @@ public:
}
}
- virtual void OnPlaceObject(Point pt, TileIndex tile)
+ void OnPlaceObject(Point pt, TileIndex tile) override
{
VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_PLANT_TREES);
}
- virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
+ void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
{
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
}
- virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
+ void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
{
if (pt.x != -1 && select_proc == DDSP_PLANT_TREES) {
DoCommandP(end_tile, this->tree_to_plant, start_tile,
@@ -159,13 +159,13 @@ public:
/**
* Initialize the window data
*/
- virtual void OnInit()
+ void OnInit() override
{
this->base = _tree_base_by_landscape[_settings_game.game_creation.landscape];
this->count = _tree_count_by_landscape[_settings_game.game_creation.landscape];
}
- virtual void OnPlaceObjectAbort()
+ void OnPlaceObjectAbort() override
{
this->RaiseButtons();
}