summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-03-28 02:54:40 +0000
committeryexo <yexo@openttd.org>2009-03-28 02:54:40 +0000
commite701019992daf4bea0ba109b8959faa2afc40fe1 (patch)
tree6d150543daf0e4fe5e7759540c925564db543ec6
parented330197c4de8c55b929b44f51f78bc0c56a3fd1 (diff)
downloadopenttd-e701019992daf4bea0ba109b8959faa2afc40fe1.tar.xz
(svn r15868) -Codechange: remove the close box from the widget array instead of doing it in the constructor of the difficulty window. This makes it work again in rtl languages.
-rw-r--r--src/settings_gui.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 759643e70..f05beffa5 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -385,7 +385,6 @@ extern void StartupEconomy();
/* Names of the game difficulty settings window */
enum GameDifficultyWidgets {
- GDW_CLOSEBOX = 0,
GDW_CAPTION,
GDW_UPPER_BG,
GDW_LVL_EASY,
@@ -401,8 +400,7 @@ enum GameDifficultyWidgets {
/* Widget definition for the game difficulty settings window */
static const Widget _game_difficulty_widgets[] = {
-{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_MAUVE, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, // GDW_CLOSEBOX
-{ WWT_CAPTION, RESIZE_NONE, COLOUR_MAUVE, 11, 369, 0, 13, STR_6800_DIFFICULTY_LEVEL, STR_018C_WINDOW_TITLE_DRAG_THIS}, // GDW_CAPTION
+{ WWT_CAPTION, RESIZE_NONE, COLOUR_MAUVE, 0, 369, 0, 13, STR_6800_DIFFICULTY_LEVEL, STR_018C_WINDOW_TITLE_DRAG_THIS}, // GDW_CAPTION
{ WWT_PANEL, RESIZE_NONE, COLOUR_MAUVE, 0, 369, 14, 41, 0x0, STR_NULL}, // GDW_UPPER_BG
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 10, 96, 16, 27, STR_6801_EASY, STR_NULL}, // GDW_LVL_EASY
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 97, 183, 16, 27, STR_6802_MEDIUM, STR_NULL}, // GDW_LVL_MEDIUM
@@ -417,10 +415,7 @@ static const Widget _game_difficulty_widgets[] = {
};
static const NWidgetPart _nested_game_difficulty_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_MAUVE, GDW_CLOSEBOX),
- NWidget(WWT_CAPTION, COLOUR_MAUVE, GDW_CAPTION), SetMinimalSize(359, 14), SetDataTip(STR_6800_DIFFICULTY_LEVEL, STR_018C_WINDOW_TITLE_DRAG_THIS),
- EndContainer(),
+ NWidget(WWT_CAPTION, COLOUR_MAUVE, GDW_CAPTION), SetMinimalSize(370, 14), SetDataTip(STR_6800_DIFFICULTY_LEVEL, STR_018C_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PANEL, COLOUR_MAUVE, GDW_UPPER_BG),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL),
@@ -487,9 +482,6 @@ public:
this->clicked_increase = false;
this->clicked_button = NO_SETTINGS_BUTTON;
this->timeout = 0;
- /* Hide the closebox to make sure that the user aborts or confirms his changes */
- this->HideWidget(GDW_CLOSEBOX);
- this->widget[GDW_CAPTION].left = 0;
/* Setup disabled buttons when creating window
* disable all other difficulty buttons during gameplay except for 'custom' */
this->SetWidgetsDisabledState(_game_mode == GM_NORMAL,