summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-28 14:37:19 +0000
committerrubidium <rubidium@openttd.org>2008-12-28 14:37:19 +0000
commite83cca7d130872b9d64523ce1a0d61306bc31599 (patch)
tree36bbbb5d389d41119ee184607bc012666dda7812 /src/town_gui.cpp
parent9c2c1dea067d305601650c60a67f389e090ad835 (diff)
downloadopenttd-e83cca7d130872b9d64523ce1a0d61306bc31599.tar.xz
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 3ebe75286..4803e3bf2 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -254,7 +254,7 @@ public:
}
case TWA_EXECUTE:
- DoCommandP(this->town->xy, this->window_number, this->sel_index, NULL, CMD_DO_TOWN_ACTION | CMD_MSG(STR_00B4_CAN_T_DO_THIS));
+ DoCommandP(this->town->xy, this->window_number, this->sel_index, CMD_DO_TOWN_ACTION | CMD_MSG(STR_00B4_CAN_T_DO_THIS));
break;
}
}
@@ -404,8 +404,7 @@ public:
{
if (str == NULL) return;
- _cmd_text = str;
- DoCommandP(0, this->window_number, 0, NULL, CMD_RENAME_TOWN | CMD_MSG(STR_2008_CAN_T_RENAME_TOWN));
+ DoCommandP(0, this->window_number, 0, CMD_RENAME_TOWN | CMD_MSG(STR_2008_CAN_T_RENAME_TOWN), NULL, str);
}
};
@@ -667,7 +666,7 @@ static void PlaceProc_Town(TileIndex tile)
{
uint32 size = min(_scengen_town_size, (int)TSM_CITY);
uint32 mode = _scengen_town_size > TSM_CITY ? TSM_CITY : TSM_FIXED;
- DoCommandP(tile, size, mode, CcBuildTown, CMD_BUILD_TOWN | CMD_MSG(STR_0236_CAN_T_BUILD_TOWN_HERE));
+ DoCommandP(tile, size, mode, CMD_BUILD_TOWN | CMD_MSG(STR_0236_CAN_T_BUILD_TOWN_HERE), CcBuildTown);
}
static const Widget _scen_edit_town_gen_widgets[] = {