|
|
@ -732,8 +732,18 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
|
|
|
|
|
|
|
|
|
|
|
virtual void OnQueryTextFinished(char *str)
|
|
|
|
virtual void OnQueryTextFinished(char *str)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int32 value;
|
|
|
|
if (!StrEmpty(str)) {
|
|
|
|
if (!StrEmpty(str)) {
|
|
|
|
int32 value = atoi(str);
|
|
|
|
value = atoi(str);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
/* An empty string means revert to the default */
|
|
|
|
|
|
|
|
switch (this->widget_id) {
|
|
|
|
|
|
|
|
case GLAND_START_DATE_TEXT: value = DEF_START_YEAR; break;
|
|
|
|
|
|
|
|
case GLAND_SNOW_LEVEL_TEXT: value = DEF_SNOWLINE_HEIGHT; break;
|
|
|
|
|
|
|
|
case GLAND_TOWN_PULLDOWN: value = 1; break; // There's not really a default
|
|
|
|
|
|
|
|
default: NOT_REACHED();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch (this->widget_id) {
|
|
|
|
switch (this->widget_id) {
|
|
|
|
case GLAND_START_DATE_TEXT:
|
|
|
|
case GLAND_START_DATE_TEXT:
|
|
|
@ -753,7 +763,6 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
|
|
|
|
|
|
|
|
|
|
|
this->SetDirty();
|
|
|
|
this->SetDirty();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const WindowDesc _generate_landscape_desc(
|
|
|
|
static const WindowDesc _generate_landscape_desc(
|
|
|
|