summaryrefslogtreecommitdiff
path: root/ship_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-10-10 07:56:23 +0000
committerbjarni <bjarni@openttd.org>2006-10-10 07:56:23 +0000
commit08789dd3e851feffd380fc8530dbe357d010c7f1 (patch)
tree647e28c1db02554590cec07a3ff06920e2a1fa7d /ship_gui.c
parent28d11c2bdae8eb836b0ce3dc0273a0a783f1a54f (diff)
downloadopenttd-08789dd3e851feffd380fc8530dbe357d010c7f1.tar.xz
(svn r6712) -Code cleanup: renamed buildtrain_d to buildvehicle_d as it's used for all vehicle types
Diffstat (limited to 'ship_gui.c')
-rw-r--r--ship_gui.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ship_gui.c b/ship_gui.c
index 8dd4bd804..48867bb46 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -263,7 +263,7 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
DrawWindowWidgets(w);
y = 15;
- sel = WP(w,buildtrain_d).sel_index;
+ sel = WP(w,buildvehicle_d).sel_index;
pos = w->vscroll.pos;
selected_id = INVALID_ENGINE;
for (eid = SHIP_ENGINES_INDEX; eid < SHIP_ENGINES_INDEX + NUM_SHIP_ENGINES; eid++) {
@@ -277,7 +277,7 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
sel--;
}
- WP(w,buildtrain_d).sel_engine = selected_id;
+ WP(w,buildvehicle_d).sel_engine = selected_id;
if (selected_id != INVALID_ENGINE) {
DrawShipPurchaseInfo(2, w->widget[4].top + 1, selected_id);
@@ -290,20 +290,20 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
case 2: { /* listbox */
uint i = (e->we.click.pt.y - 14) / 24;
if (i < w->vscroll.cap) {
- WP(w,buildtrain_d).sel_index = i + w->vscroll.pos;
+ WP(w,buildvehicle_d).sel_index = i + w->vscroll.pos;
SetWindowDirty(w);
}
} break;
case 5: { /* build */
- EngineID sel_eng = WP(w,buildtrain_d).sel_engine;
+ EngineID sel_eng = WP(w,buildvehicle_d).sel_engine;
if (sel_eng != INVALID_ENGINE)
DoCommandP(w->window_number, sel_eng, 0, CcBuildShip, CMD_BUILD_SHIP | CMD_MSG(STR_980D_CAN_T_BUILD_SHIP));
} break;
case 6: { /* rename */
- EngineID sel_eng = WP(w,buildtrain_d).sel_engine;
+ EngineID sel_eng = WP(w,buildvehicle_d).sel_engine;
if (sel_eng != INVALID_ENGINE) {
- WP(w,buildtrain_d).rename_engine = sel_eng;
+ WP(w,buildvehicle_d).rename_engine = sel_eng;
ShowQueryString(GetCustomEngineName(sel_eng),
STR_9838_RENAME_SHIP_TYPE, 31, 160, w->window_class, w->window_number, CS_ALPHANUMERAL);
}
@@ -314,7 +314,7 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
case WE_ON_EDIT_TEXT:
if (e->we.edittext.str[0] != '\0') {
_cmd_text = e->we.edittext.str;
- DoCommandP(0, WP(w, buildtrain_d).rename_engine, 0, NULL,
+ DoCommandP(0, WP(w, buildvehicle_d).rename_engine, 0, NULL,
CMD_RENAME_ENGINE | CMD_MSG(STR_9839_CAN_T_RENAME_SHIP_TYPE));
}
break;