summaryrefslogtreecommitdiff
path: root/src/intro_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/intro_gui.cpp')
-rw-r--r--src/intro_gui.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp
index 0b08be4db..d61f5b252 100644
--- a/src/intro_gui.cpp
+++ b/src/intro_gui.cpp
@@ -83,6 +83,18 @@ struct SelectGameWindow : public Window {
}
}
+ virtual Dimension GetWidgetContentSize(int widget)
+ {
+ Dimension d = {0, 0};
+ if (widget == SGI_DIFFICULTIES) {
+ for (uint i = STR_DIFFICULTY_LEVEL_EASY; i <= STR_DIFFICULTY_LEVEL_CUSTOM; i++) {
+ SetDParam(0, STR_DIFFICULTY_LEVEL_EASY + _settings_newgame.difficulty.diff_level);
+ d = maxdim(d, GetStringBoundingBox(STR_INTRO_DIFFICULTY));
+ }
+ }
+ return d;
+ }
+
virtual void OnClick(Point pt, int widget)
{
#ifdef ENABLE_NETWORK