@@ -1640,13 +1640,13 @@ struct GameSettingsWindow : Window {
if (sd->desc.cmd != SDT_BOOLX && !(sd->desc.flags & SGF_MULTISTRING)) {
/* Show the correct currency-translated value */
if (sd->desc.flags & SGF_CURRENCY) value *= _currency->rate;
this->valuewindow_entry = pe;
SetDParam(0, value);
ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, 100, this, CS_NUMERAL, QSF_NONE);
ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, 100, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
}
virtual void OnTimeout()
{
@@ -1656,28 +1656,35 @@ struct GameSettingsWindow : Window {
this->SetDirty();
virtual void OnQueryTextFinished(char *str)
/* The user pressed cancel */
if (str == NULL) return;
assert(this->valuewindow_entry != NULL);
assert((this->valuewindow_entry->flags & SEF_KIND_MASK) == SEF_SETTING_KIND);
const SettingDesc *sd = this->valuewindow_entry->d.entry.setting;
int32 value;
if (!StrEmpty(str)) {
int32 value = atoi(str);
value = atoi(str);
/* Save the correct currency-translated value */
if (sd->desc.flags & SGF_CURRENCY) value /= _currency->rate;
} else {
value = (int32)sd->desc.def;
if ((sd->desc.flags & SGF_PER_COMPANY) != 0) {
SetCompanySetting(this->valuewindow_entry->d.entry.index, value);
SetSettingValue(this->valuewindow_entry->d.entry.index, value);
virtual void OnResize()
this->vscroll.SetCapacityFromWidget(this, SETTINGSEL_OPTIONSPANEL, SETTINGTREE_TOP_OFFSET + SETTINGTREE_BOTTOM_OFFSET);
Status change: