summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-17 12:48:06 +0000
committerrubidium <rubidium@openttd.org>2008-05-17 12:48:06 +0000
commit8b5421290027ab67cba25225111e3561ddd7af07 (patch)
tree95ff2c47f7b8b827b734ad75a798bd9257a80067 /src/vehicle_gui.cpp
parentd8154e00ac8b0df7ad0ac94c90a393aa5096e573 (diff)
downloadopenttd-8b5421290027ab67cba25225111e3561ddd7af07.tar.xz
(svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index b5e6568d5..274c9e20f 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -394,7 +394,7 @@ struct RefitWindow : public Window {
SetVScrollCount(this, this->list->num_lines);
SetDParam(0, v->index);
- DrawWindowWidgets(this);
+ this->DrawWidgets();
this->cargo = DrawVehicleRefitWindow(this->list, this->sel, this->vscroll.pos, this->vscroll.cap, this->resize.step_height);
@@ -1028,12 +1028,12 @@ struct VehicleListWindow : public Window, public VehicleListBase {
VLW_WIDGET_START_ALL,
WIDGET_LIST_END);
- DrawWindowWidgets(this);
+ this->DrawWidgets();
/* draw sorting criteria string */
DrawString(85, 15, _vehicle_sort_listing[this->vehicles.sort_type], TC_BLACK);
/* draw arrow pointing up/down for ascending/descending sorting */
- DrawSortButtonState(this, VLW_WIDGET_SORT_ORDER, this->vehicles.flags & VL_DESC ? SBS_DOWN : SBS_UP);
+ this->DrawSortButtonState(VLW_WIDGET_SORT_ORDER, this->vehicles.flags & VL_DESC ? SBS_DOWN : SBS_UP);
max = min(this->vscroll.pos + this->vscroll.cap, this->vehicles.list_length);
for (i = this->vscroll.pos; i < max; ++i) {
@@ -1508,7 +1508,7 @@ struct VehicleDetailsWindow : Window {
SetDParam(0, v->index);
- DrawWindowWidgets(this);
+ this->DrawWidgets();
/* Draw running cost */
SetDParam(1, v->age / 366);
@@ -1942,7 +1942,7 @@ static void DrawVehicleViewWindow(Window *w)
/* draw widgets & caption */
SetDParam(0, v->index);
- DrawWindowWidgets(w);
+ w->DrawWidgets();
if (v->vehstatus & VS_CRASHED) {
str = STR_8863_CRASHED;
@@ -2021,7 +2021,7 @@ static void DrawVehicleViewWindow(Window *w)
/* draw the flag plus orders */
DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, 2, w->widget[VVW_WIDGET_START_STOP_VEH].top + 1);
DrawStringCenteredTruncated(w->widget[VVW_WIDGET_START_STOP_VEH].left + 8, w->widget[VVW_WIDGET_START_STOP_VEH].right, w->widget[VVW_WIDGET_START_STOP_VEH].top + 1, str, TC_FROMSTRING);
- DrawWindowViewport(w);
+ w->DrawViewport();
}
/** Command indices for the _vehicle_command_translation_table. */