src/waypoint_gui.cpp
changeset 10120 f158a34ecdea
parent 9986 4ee5b226abad
child 10145 849ba8b8626b
equal deleted inserted replaced
10119:00bd6a85b068 10120:f158a34ecdea
    13 #include "string_func.h"
    13 #include "string_func.h"
    14 #include "strings_func.h"
    14 #include "strings_func.h"
    15 #include "gfx_func.h"
    15 #include "gfx_func.h"
    16 #include "command_func.h"
    16 #include "command_func.h"
    17 #include "functions.h"
    17 #include "functions.h"
       
    18 #include "window_func.h"
    18 
    19 
    19 #include "table/strings.h"
    20 #include "table/strings.h"
    20 
    21 
    21 struct WaypointWindow : Window {
    22 struct WaypointWindow : Window {
    22 private:
    23 private:
    41 
    42 
    42 		this->flags4 |= WF_DISABLE_VP_SCROLL;
    43 		this->flags4 |= WF_DISABLE_VP_SCROLL;
    43 		InitializeWindowViewport(this, 3, 17, 254, 86, this->wp->xy, ZOOM_LVL_MIN);
    44 		InitializeWindowViewport(this, 3, 17, 254, 86, this->wp->xy, ZOOM_LVL_MIN);
    44 
    45 
    45 		this->FindWindowPlacementAndResize(desc);
    46 		this->FindWindowPlacementAndResize(desc);
       
    47 	}
       
    48 
       
    49 	~WaypointWindow()
       
    50 	{
       
    51 		DeleteWindowById(WC_TRAINS_LIST, (this->window_number << 16) | (VEH_TRAIN << 11) | VLW_WAYPOINT_LIST | this->wp->owner);
    46 	}
    52 	}
    47 
    53 
    48 	virtual void OnPaint()
    54 	virtual void OnPaint()
    49 	{
    55 	{
    50 		/* You can only change your own waypoints */
    56 		/* You can only change your own waypoints */