diff options
author | Vicent Marti | 2008-08-14 23:17:41 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-14 23:17:41 +0000 |
commit | 8e60e6c558be96286ad8df3502c69060f9db117c (patch) | |
tree | 233a0dd4538f43ada920e6d605049ed9f5c2ca71 /gui | |
parent | 8eaa982c41a083337aa512f1d303b178d25f6a2a (diff) | |
download | scummvm-rg350-8e60e6c558be96286ad8df3502c69060f9db117c.tar.gz scummvm-rg350-8e60e6c558be96286ad8df3502c69060f9db117c.tar.bz2 scummvm-rg350-8e60e6c558be96286ad8df3502c69060f9db117c.zip |
Misc GFX tweaks.
svn-id: r33883
Diffstat (limited to 'gui')
-rw-r--r-- | gui/TabWidget.h | 5 | ||||
-rw-r--r-- | gui/launcher.cpp | 3 | ||||
-rw-r--r-- | gui/newgui.cpp | 2 | ||||
-rw-r--r-- | gui/options.cpp | 10 | ||||
-rw-r--r-- | gui/options.h | 4 |
5 files changed, 19 insertions, 5 deletions
diff --git a/gui/TabWidget.h b/gui/TabWidget.h index bf316a7ac3..3dffcd2afe 100644 --- a/gui/TabWidget.h +++ b/gui/TabWidget.h @@ -85,6 +85,11 @@ public: * Widgets are always added to the active tab. */ void setActiveTab(int tabID); + + void setTabTitle(int tabID, const String &title) { + assert(0 <= tabID && tabID < (int)_tabs.size()); + _tabs[tabID].title = title; + } virtual void handleMouseDown(int x, int y, int button, int clickCount); virtual bool handleKeyDown(Common::KeyState state); diff --git a/gui/launcher.cpp b/gui/launcher.cpp index d1187a4ad5..e056b60f02 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -195,7 +195,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // // 3) The graphics tab // - tab->addTab("Graphics"); + _graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX"); _globalGraphicsOverride = new CheckboxWidget(tab, "GameOptions_Graphics.EnableTabCheckbox", "Override global graphic settings", kCmdGlobalGraphicsOverride, 0); @@ -257,6 +257,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // Activate the first tab tab->setActiveTab(0); + _tabWidget = tab; // Add OK & Cancel buttons new ButtonWidget(this, "GameOptions.Cancel", "Cancel", kCloseCmd, 0); diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 945c944b93..2fa0dc8620 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -94,7 +94,7 @@ NewGui::NewGui() : _redrawStatus(kRedrawDisabled), if (themefile.compareToIgnoreCase("default") == 0) themefile = "builtin"; - if (!themefile.hasSuffix(".zip")) + if (themefile != "builtin" && !themefile.hasSuffix(".zip")) themefile += ".zip"; loadNewTheme(themefile); diff --git a/gui/options.cpp b/gui/options.cpp index 590b0bd900..6377bd6377 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -73,12 +73,12 @@ static const int outputRateValues[] = { 0, 22050, 8000, 11025, 44100, 48000, -1 OptionsDialog::OptionsDialog(const String &domain, int x, int y, int w, int h) - : Dialog(x, y, w, h), _domain(domain) { + : Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _tabWidget(0) { init(); } OptionsDialog::OptionsDialog(const String &domain, const String &name) - : Dialog(name), _domain(domain) { + : Dialog(name), _domain(domain), _graphicsTabId(-1), _tabWidget(0) { init(); } @@ -644,6 +644,9 @@ void OptionsDialog::reflowLayout() { Dialog::reflowLayout(); int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth"); + + if (_graphicsTabId != -1 && _tabWidget) + _tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX"); if (_midiPopUp) _midiPopUp->changeLabelWidth(labelWidth); @@ -667,7 +670,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() // // 1) The graphics tab // - tab->addTab(g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX"); + _graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX"); addGraphicControls(tab, "GlobalOptions_Graphics."); // @@ -735,6 +738,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() // Activate the first tab tab->setActiveTab(0); + _tabWidget = tab; // Add OK & Cancel buttons new ButtonWidget(this, "GlobalOptions.Cancel", "Cancel", kCloseCmd, 0); diff --git a/gui/options.h b/gui/options.h index 8f4496c753..af13663b29 100644 --- a/gui/options.h +++ b/gui/options.h @@ -26,6 +26,7 @@ #define OPTIONS_DIALOG_H #include "gui/dialog.h" +#include "gui/TabWidget.h" #include "common/str.h" #ifdef SMALL_SCREEN_DEVICE @@ -80,6 +81,9 @@ protected: void setMIDISettingsState(bool enabled); void setVolumeSettingsState(bool enabled); void setSubtitleSettingsState(bool enabled); + + TabWidget *_tabWidget; + int _graphicsTabId; private: // |