summaryrefslogtreecommitdiff
path: root/src/waypoint_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-08-22 01:14:25 +0000
committerbelugas <belugas@openttd.org>2008-08-22 01:14:25 +0000
commitdd1ae8c13f63b513310f06e89898d8b791333f8f (patch)
treedb0d8213cf5ad5b48480b2fd0edad949fdf03e14 /src/waypoint_gui.cpp
parent7ef5905b8cd691b9fbb1805cf2184a38486d84a3 (diff)
downloadopenttd-dd1ae8c13f63b513310f06e89898d8b791333f8f.tar.xz
(svn r14127) -Feature(ette): Give the the player's colour to the waypoint window been shown
Diffstat (limited to 'src/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index bf95ee8d1..1f1b81f15 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -37,6 +37,7 @@ public:
WaypointWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->wp = GetWaypoint(this->window_number);
+ this->caption_color = (byte)GetTileOwner(this->wp->xy);
this->flags4 |= WF_DISABLE_VP_SCROLL;
InitializeWindowViewport(this, 3, 17, 254, 86, this->wp->xy, ZOOM_LVL_MIN);
@@ -107,5 +108,6 @@ static const WindowDesc _waypoint_view_desc = {
void ShowWaypointWindow(const Waypoint *wp)
{
+ if (!wp->IsValid()) return; // little safety
AllocateWindowDescFront<WaypointWindow>(&_waypoint_view_desc, wp->index);
}