aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/dialog.cpp20
-rw-r--r--gui/launcher.cpp1
-rw-r--r--gui/object.cpp20
-rw-r--r--gui/object.h2
-rw-r--r--gui/options.cpp48
-rw-r--r--gui/options.h4
-rw-r--r--gui/themes/scummclassic.zipbin86033 -> 86033 bytes
-rw-r--r--gui/themes/scummmodern.zipbin1441316 -> 1441312 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_gfx.stx2
-rw-r--r--gui/widgets/edittext.cpp2
10 files changed, 74 insertions, 25 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 0522b40b46..fd15ba5e09 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -334,25 +334,7 @@ void Dialog::removeWidget(Widget *del) {
if (del == _dragWidget)
_dragWidget = NULL;
- Widget *w = _firstWidget;
-
- if (del == _firstWidget) {
- Widget *del_next = del->_next;
- del->_next = 0;
- _firstWidget = del_next;
- return;
- }
-
- w = _firstWidget;
- while (w) {
- if (w->_next == del) {
- Widget *del_next = del->_next;
- del->_next = 0;
- w->_next = del_next;
- return;
- }
- w = w->_next;
- }
+ GuiObject::removeWidget(del);
}
} // End of namespace GUI
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 5bb358452a..a3e4925848 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -24,6 +24,7 @@
#include "common/config-manager.h"
#include "common/events.h"
#include "common/fs.h"
+#include "common/gui_options.h"
#include "common/util.h"
#include "common/system.h"
#include "common/translation.h"
diff --git a/gui/object.cpp b/gui/object.cpp
index 2ec42df9d7..73c4f74d6c 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -59,4 +59,24 @@ void GuiObject::reflowLayout() {
}
}
+void GuiObject::removeWidget(Widget *del) {
+ if (del == _firstWidget) {
+ Widget *del_next = del->next();
+ del->setNext(0);
+ _firstWidget = del_next;
+ return;
+ }
+
+ Widget *w = _firstWidget;
+ while (w) {
+ if (w->next() == del) {
+ Widget *del_next = del->next();
+ del->setNext(0);
+ w->setNext(del_next);
+ return;
+ }
+ w = w->next();
+ }
+}
+
} // End of namespace GUI
diff --git a/gui/object.h b/gui/object.h
index 34ff0d47f2..bce3cd7846 100644
--- a/gui/object.h
+++ b/gui/object.h
@@ -83,6 +83,8 @@ public:
virtual void reflowLayout();
+ virtual void removeWidget(Widget *widget);
+
protected:
virtual void releaseFocus() = 0;
};
diff --git a/gui/options.cpp b/gui/options.cpp
index bfad81c07b..5085f9cdd9 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -30,6 +30,8 @@
#include "common/fs.h"
#include "common/config-manager.h"
+#include "common/gui_options.h"
+#include "common/rendermode.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "common/translation.h"
@@ -79,7 +81,7 @@ static const char *outputRateLabels[] = { _s("<default>"), _s("8 kHz"), _s("11kH
static const int outputRateValues[] = { 0, 8000, 11025, 22050, 44100, 48000, -1 };
OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
- : Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
+ : Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(0) {
init();
}
@@ -1050,7 +1052,8 @@ Common::String OptionsDialog::renderType2GUIO(uint32 renderType) {
{ Common::kRenderVGA, GUIO_RENDERVGA },
{ Common::kRenderAmiga, GUIO_RENDERAMIGA },
{ Common::kRenderFMTowns, GUIO_RENDERFMTOWNS },
- { Common::kRenderPC98, GUIO_RENDERPC98 }
+ { Common::kRenderPC9821, GUIO_RENDERPC9821 },
+ { Common::kRenderPC9801, GUIO_RENDERPC9801 }
};
Common::String res;
@@ -1119,7 +1122,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
//
// 3) The MIDI tab
//
- tab->addTab(_("MIDI"));
+ _midiTabId = tab->addTab(_("MIDI"));
addMIDIControls(tab, "GlobalOptions_MIDI.");
//
@@ -1132,9 +1135,9 @@ GlobalOptionsDialog::GlobalOptionsDialog()
// 5) The Paths tab
//
if (g_system->getOverlayWidth() > 320)
- tab->addTab(_("Paths"));
+ _pathsTabId = tab->addTab(_("Paths"));
else
- tab->addTab(_c("Paths", "lowres"));
+ _pathsTabId = tab->addTab(_c("Paths", "lowres"));
#if !( defined(__DC__) || defined(__GP32__) )
// These two buttons have to be extra wide, or the text will be
@@ -1493,4 +1496,39 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
}
}
+void GlobalOptionsDialog::reflowLayout() {
+ int activeTab = _tabWidget->getActiveTab();
+
+ if (_midiTabId != -1) {
+ _tabWidget->setActiveTab(_midiTabId);
+
+ _tabWidget->removeWidget(_soundFontClearButton);
+ _soundFontClearButton->setNext(0);
+ delete _soundFontClearButton;
+ _soundFontClearButton = addClearButton(_tabWidget, "GlobalOptions_MIDI.mcFontClearButton", kClearSoundFontCmd);
+ }
+
+ if (_pathsTabId != -1) {
+ _tabWidget->setActiveTab(_pathsTabId);
+
+ _tabWidget->removeWidget(_savePathClearButton);
+ _savePathClearButton->setNext(0);
+ delete _savePathClearButton;
+ _savePathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.SavePathClearButton", kSavePathClearCmd);
+
+ _tabWidget->removeWidget(_themePathClearButton);
+ _themePathClearButton->setNext(0);
+ delete _themePathClearButton;
+ _themePathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ThemePathClearButton", kThemePathClearCmd);
+
+ _tabWidget->removeWidget(_extraPathClearButton);
+ _extraPathClearButton->setNext(0);
+ delete _extraPathClearButton;
+ _extraPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ExtraPathClearButton", kExtraPathClearCmd);
+ }
+
+ _tabWidget->setActiveTab(activeTab);
+ OptionsDialog::reflowLayout();
+}
+
} // End of namespace GUI
diff --git a/gui/options.h b/gui/options.h
index 4e0187f50f..83c9d60d59 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -89,6 +89,8 @@ protected:
TabWidget *_tabWidget;
int _graphicsTabId;
+ int _midiTabId;
+ int _pathsTabId;
private:
//
@@ -193,6 +195,8 @@ public:
void close();
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void reflowLayout();
+
protected:
#ifdef SMALL_SCREEN_DEVICE
KeysDialog *_keysDialog;
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 8b2a3e7899..d4cfd0cba3 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 84416636bc..fc4c89cbcc 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx
index b420ce0903..5f7cc69acd 100644
--- a/gui/themes/scummmodern/scummmodern_gfx.stx
+++ b/gui/themes/scummmodern/scummmodern_gfx.stx
@@ -125,7 +125,7 @@
/>
<font id = 'text_normal'
file = 'helvb12.bdf'
- scalable_file = 'FreeSansBold.ttf'
+ scalable_file = 'FreeSans.ttf'
/>
<font resolution = 'y<400'
id = 'text_normal'
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index af8ab8aa5b..4b266e8194 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -33,6 +33,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons
_finishCmd = finishCmd;
setEditString(text);
+ setFontStyle(ThemeEngine::kFontStyleNormal);
}
EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd)
@@ -42,6 +43,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String
_finishCmd = finishCmd;
setEditString(text);
+ setFontStyle(ThemeEngine::kFontStyleNormal);
}
void EditTextWidget::setEditString(const String &str) {