diff options
author | Tony Puccinelli | 2010-08-11 00:54:34 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-11 00:54:34 +0000 |
commit | 6543062e5701e8011a4b12abffa8afca56f30b3f (patch) | |
tree | 2a317b820d5a7feeb903aaeec3c1f37847d21ee5 /gui | |
parent | 682807f0e916b189c69b60765418ee1ccc327cbf (diff) | |
parent | fffec23a02cc88ed8daba0a3b50007b7e220c075 (diff) | |
download | scummvm-rg350-6543062e5701e8011a4b12abffa8afca56f30b3f.tar.gz scummvm-rg350-6543062e5701e8011a4b12abffa8afca56f30b3f.tar.bz2 scummvm-rg350-6543062e5701e8011a4b12abffa8afca56f30b3f.zip |
manually merged base, graphics, common, sound, and gui as I am quite skilled at somehow messing up svn merge :-)
svn-id: r51963
Diffstat (limited to 'gui')
-rw-r--r-- | gui/about.cpp | 35 | ||||
-rw-r--r-- | gui/editable.cpp | 2 | ||||
-rw-r--r-- | gui/options.cpp | 2 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 35 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 44 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 35 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_lowres.stx | 37 |
7 files changed, 29 insertions, 161 deletions
diff --git a/gui/about.cpp b/gui/about.cpp index ea326eb71e..3caab084ca 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -82,30 +82,9 @@ AboutDialog::AboutDialog() : Dialog(10, 20, 300, 174), _scrollPos(0), _scrollTime(0), _willClose(false) { - int i; + reflowLayout(); - const int screenW = g_system->getOverlayWidth(); - const int screenH = g_system->getOverlayHeight(); - - _xOff = g_gui.xmlEval()->getVar("Globals.About.XOffset", 5); - _yOff = g_gui.xmlEval()->getVar("Globals.About.YOffset", 5); - int outerBorder = g_gui.xmlEval()->getVar("Globals.About.OuterBorder"); - - _w = screenW - 2 * outerBorder; - _h = screenH - 2 * outerBorder; - - _lineHeight = g_gui.getFontHeight() + 3; - - // Heuristic to compute 'optimal' dialog width - int maxW = _w - 2*_xOff; - _w = 0; - for (i = 0; i < ARRAYSIZE(credits); i++) { - int tmp = g_gui.getStringWidth(credits[i] + 5); - if (_w < tmp && tmp <= maxW) { - _w = tmp; - } - } - _w += 2*_xOff; + int i; for (i = 0; i < 1; i++) _lines.push_back(""); @@ -155,10 +134,6 @@ AboutDialog::AboutDialog() for (i = 0; i < ARRAYSIZE(credits); i++) addLine(credits[i]); - - // Center the dialog - _x = (screenW - _w) / 2; - _y = (screenH - _h) / 2; } void AboutDialog::addLine(const char *str) { @@ -298,6 +273,7 @@ void AboutDialog::handleKeyUp(Common::KeyState state) { void AboutDialog::reflowLayout() { Dialog::reflowLayout(); + int i; const int screenW = g_system->getOverlayWidth(); const int screenH = g_system->getOverlayHeight(); @@ -313,7 +289,7 @@ void AboutDialog::reflowLayout() { // Heuristic to compute 'optimal' dialog width int maxW = _w - 2*_xOff; _w = 0; - for (int i = 0; i < ARRAYSIZE(credits); i++) { + for (i = 0; i < ARRAYSIZE(credits); i++) { int tmp = g_gui.getStringWidth(credits[i] + 5); if (_w < tmp && tmp <= maxW) { _w = tmp; @@ -321,8 +297,7 @@ void AboutDialog::reflowLayout() { } _w += 2*_xOff; - _lineHeight = g_gui.getFontHeight() + 3; - + // Center the dialog _x = (screenW - _w) / 2; _y = (screenH - _h) / 2; } diff --git a/gui/editable.cpp b/gui/editable.cpp index 92faad5bb3..755e34e380 100644 --- a/gui/editable.cpp +++ b/gui/editable.cpp @@ -65,7 +65,7 @@ void EditableWidget::setEditString(const String &str) { // TODO: We probably should filter the input string here, // e.g. using tryInsertChar. _editString = str; - _caretPos = _editString.size(); + _caretPos = 0; } bool EditableWidget::tryInsertChar(byte c, int pos) { diff --git a/gui/options.cpp b/gui/options.cpp index 072b20b393..d1901e9219 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -770,7 +770,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi _mt32DevicePopUp->setEnabled(false); } - _enableMIDISettings = true; + _enableMT32Settings = true; } // The function has an extra slider range parameter, since both the launcher and SCUMM engine diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 78941003ef..74b8bf4b2c 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -635,6 +635,10 @@ width = '150' height = 'Globals.Button.Height' /> + <widget name = 'Help' + width = '150' + height = 'Globals.Button.Height' + /> <widget name = 'About' width = '150' height = 'Globals.Button.Height' @@ -651,36 +655,7 @@ </layout> </dialog> - <dialog name = 'ScummMain' overlays = 'screen_center'> - <layout type = 'vertical' padding = '8, 8, 8, 8'> - <widget name = 'Resume' - type = 'Button' - /> - <space size = '15'/> - <widget name = 'Load' - type = 'Button' - /> - <widget name = 'Save' - type = 'Button' - /> - <space size = '15'/> - <widget name = 'Options' - type = 'Button' - /> - <widget name = 'Help' - type = 'Button' - /> - <widget name = 'About' - type = 'Button' - /> - <space size = '15'/> - <widget name = 'Quit' - type = 'Button' - /> - </layout> - </dialog> - - <dialog name = 'ScummConfig' overlays = 'screen_center'> + <dialog name = 'GlobalConfig' overlays = 'screen_center'> <layout type = 'vertical' padding = '8, 8, 8, 8'> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <layout type = 'vertical' padding = '0, 0, 0, 0' center = 'true'> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index e7cc7b6279..65083f4bce 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -620,7 +620,7 @@ </dialog> <dialog name = 'GlobalMenu' overlays = 'screen_center'> - <layout type = 'vertical' padding = '8, 8, 4, 6' center = 'true'> + <layout type = 'vertical' padding = '2, 2, 4, 6' center = 'true' spacing='6'> <widget name = 'Title' width = '160' height = '4' @@ -643,6 +643,10 @@ width = '120' height = '12' /> + <widget name = 'Help' + width = '120' + height = '12' + /> <widget name = 'About' width = '120' height = '12' @@ -663,43 +667,7 @@ </layout> </dialog> - <dialog name = 'ScummMain' overlays = 'screen_center'> - <layout type = 'vertical' padding = '8, 8, 8, 8'> - <widget name = 'Resume' - width = 'Globals.Button.Width' - height = '14' - /> - <space size = '2'/> - <widget name = 'Load' - width = 'Globals.Button.Width' - height = '14' - /> - <widget name = 'Save' - width = 'Globals.Button.Width' - height = '14' - /> - <space size = '2'/> - <widget name = 'Options' - width = 'Globals.Button.Width' - height = '14' - /> - <widget name = 'Help' - width = 'Globals.Button.Width' - height = '14' - /> - <widget name = 'About' - width = 'Globals.Button.Width' - height = '14' - /> - <space size = '2'/> - <widget name = 'Quit' - width = 'Globals.Button.Width' - height = '14' - /> - </layout> - </dialog> - - <dialog name = 'ScummConfig' overlays = 'screen_center'> + <dialog name = 'GlobalConfig' overlays = 'screen_center'> <layout type = 'vertical' padding = '8, 8, 8, 8'> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'> <widget name = 'vcMusicText' diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 3464619cf3..484dd15429 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -650,6 +650,10 @@ width = '150' height = 'Globals.Button.Height' /> + <widget name = 'Help' + width = '150' + height = 'Globals.Button.Height' + /> <widget name = 'About' width = '150' height = 'Globals.Button.Height' @@ -666,36 +670,7 @@ </layout> </dialog> - <dialog name = 'ScummMain' overlays = 'screen_center'> - <layout type = 'vertical' padding = '8, 8, 8, 8'> - <widget name = 'Resume' - type = 'Button' - /> - <space size = '15'/> - <widget name = 'Load' - type = 'Button' - /> - <widget name = 'Save' - type = 'Button' - /> - <space size = '15'/> - <widget name = 'Options' - type = 'Button' - /> - <widget name = 'Help' - type = 'Button' - /> - <widget name = 'About' - type = 'Button' - /> - <space size = '15'/> - <widget name = 'Quit' - type = 'Button' - /> - </layout> - </dialog> - - <dialog name = 'ScummConfig' overlays = 'screen_center'> + <dialog name = 'GlobalConfig' overlays = 'screen_center'> <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'> <layout type = 'horizontal' padding = '0, 0, 0, 0'> <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '8' center = 'true'> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index f869956300..5998c50b60 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -618,7 +618,7 @@ </dialog> <dialog name = 'GlobalMenu' overlays = 'screen_center'> - <layout type = 'vertical' padding = '4, 4, 4, 4' center = 'true'> + <layout type = 'vertical' padding = '4, 4, 4, 4' center = 'true' spacing='2'> <widget name = 'Title' width = '160' height = 'Globals.Line.Height' @@ -641,6 +641,10 @@ width = '120' height = 'Globals.Button.Height' /> + <widget name = 'Help' + width = '120' + height = 'Globals.Button.Height' + /> <widget name = 'About' width = '120' height = 'Globals.Button.Height' @@ -661,36 +665,7 @@ </layout> </dialog> - <dialog name = 'ScummMain' overlays = 'screen_center'> - <layout type = 'vertical' padding = '4, 4, 4, 4'> - <widget name = 'Resume' - type = 'Button' - /> - <space size = '8'/> - <widget name = 'Load' - type = 'Button' - /> - <widget name = 'Save' - type = 'Button' - /> - <space size = '8'/> - <widget name = 'Options' - type = 'Button' - /> - <widget name = 'Help' - type = 'Button' - /> - <widget name = 'About' - type = 'Button' - /> - <space size = '8'/> - <widget name = 'Quit' - type = 'Button' - /> - </layout> - </dialog> - - <dialog name = 'ScummConfig' overlays = 'screen_center'> + <dialog name = 'GlobalConfig' overlays = 'screen_center'> <layout type = 'vertical' padding = '8, 8, 8, 8'> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'> <widget name = 'vcMusicText' |