summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lang/english.txt1
-rw-r--r--src/settings_gui.cpp13
2 files changed, 12 insertions, 2 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 47cbf4e7d..d4302e4ac 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1104,6 +1104,7 @@ STR_WARNING_DIFFICULTY_TO_CUSTOM :{WHITE}This act
# Advanced settings window
STR_CONFIG_SETTING_CAPTION :{WHITE}Advanced Settings
STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT :(no explanation available)
+STR_CONFIG_SETTING_DEFAULT_VALUE :{LTBLUE}Default value: {ORANGE}{STRING1}
STR_CONFIG_SETTING_OFF :Off
STR_CONFIG_SETTING_ON :On
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 095825361..0dd5a439b 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1738,7 +1738,8 @@ struct GameSettingsWindow : Window {
break;
case WID_GS_HELP_TEXT:
- size->height = max(size->height, _settings_main_page.GetMaxHelpHeight(size->width));
+ size->height = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL +
+ max(size->height, _settings_main_page.GetMaxHelpHeight(size->width));
break;
default:
@@ -1756,7 +1757,15 @@ struct GameSettingsWindow : Window {
case WID_GS_HELP_TEXT:
if (this->last_clicked != NULL) {
- DrawStringMultiLine(r.left, r.right, r.top, r.bottom, this->last_clicked->GetHelpText(), TC_WHITE);
+ const SettingDesc *sd = this->last_clicked->d.entry.setting;
+ int32 default_value = ReadValue(&sd->desc.def, sd->save.conv);
+ this->last_clicked->SetValueDParams(0, default_value);
+
+ int y = r.top;
+ DrawString(r.left, r.right, y, STR_CONFIG_SETTING_DEFAULT_VALUE);
+ y += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
+
+ DrawStringMultiLine(r.left, r.right, y, r.bottom, this->last_clicked->GetHelpText(), TC_WHITE);
}
break;