(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)

This commit is contained in:
smatz
2008-09-15 19:02:50 +00:00
parent 17e208dc16
commit e543181b12
17 changed files with 144 additions and 89 deletions

View File

@@ -370,7 +370,7 @@ public:
case TVW_CHANGENAME: /* rename */
SetDParam(0, this->window_number);
ShowQueryString(STR_TOWN, STR_2007_RENAME_TOWN, MAX_LENGTH_TOWN_NAME_BYTES, MAX_LENGTH_TOWN_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_NONE);
ShowQueryString(STR_TOWN, STR_2007_RENAME_TOWN, MAX_LENGTH_TOWN_NAME_BYTES, MAX_LENGTH_TOWN_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT);
break;
case TVW_EXPAND: /* expand town - only available on Scenario editor */
@@ -401,11 +401,10 @@ public:
virtual void OnQueryTextFinished(char *str)
{
if (!StrEmpty(str)) {
_cmd_text = str;
DoCommandP(0, this->window_number, 0, NULL,
CMD_RENAME_TOWN | CMD_MSG(STR_2008_CAN_T_RENAME_TOWN));
}
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));
}
};