aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorTravis Howell2009-08-17 01:42:39 +0000
committerTravis Howell2009-08-17 01:42:39 +0000
commit445b01676ee13fde91042094585376c2674fe606 (patch)
tree090a5a882974933d42866cd615dbb78a2e920494 /gui
parentcbffcb609f752edcc3f086521c9e0c75b5ee4cc4 (diff)
parent0d4fc8169879e0ec476b45fa58601d69e6e0db3c (diff)
downloadscummvm-rg350-445b01676ee13fde91042094585376c2674fe606.tar.gz
scummvm-rg350-445b01676ee13fde91042094585376c2674fe606.tar.bz2
scummvm-rg350-445b01676ee13fde91042094585376c2674fe606.zip
Merged revisions 43417,43420,43425-43426,43428,43431,43434,43436-43438,43440-43441,43444-43447,43449-43452 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r43417 | Kirben | 2009-08-16 10:53:55 +1000 (Sun, 16 Aug 2009) | 1 line Fix overflow in convertFilePath(). ........ r43420 | mthreepwood | 2009-08-16 11:43:18 +1000 (Sun, 16 Aug 2009) | 1 line Fix using the backspace key on Mac OS X in HE games. ........ r43425 | lordhoto | 2009-08-16 15:38:03 +1000 (Sun, 16 Aug 2009) | 1 line Fix options dialog's reflowLayout. ........ r43426 | lordhoto | 2009-08-16 15:38:16 +1000 (Sun, 16 Aug 2009) | 1 line Added Ninteno DS specific hack, which takes care of tab button width problems. This actually is not a NDS specific problem, but so far the NDS seems to be the only backend, which has a custom (hardcoded) dialog, which makes problems with our theme layouts. Instead of r43423, which enabled auto width calculaction for tab buttons on all platforms, this commit limits this to the Nintendo DS backend. This takes care of possible layout changes, caused by the changes of the commit. I also added a comment with possible solutions to this problem. ........ r43428 | lordhoto | 2009-08-16 16:33:34 +1000 (Sun, 16 Aug 2009) | 1 line Fix valgrind warnings. ........ r43431 | lordhoto | 2009-08-16 21:28:59 +1000 (Sun, 16 Aug 2009) | 1 line Fix bug #2838464 "SCUMM: GUI messages misaligned". ........ r43434 | dreammaster | 2009-08-16 22:03:48 +1000 (Sun, 16 Aug 2009) | 1 line Added detection entry for the UK 16 colour version ........ r43436 | lordhoto | 2009-08-16 22:10:37 +1000 (Sun, 16 Aug 2009) | 1 line Fix F5's save button in DOTT CD for me. Actually I was able to reproduce the issue before I wrote this code, after reverting it for more testing, I couldn't reproduce it anymore. Probably it was some random problem, at least this code should now assure the "Save" button's state is always matching the return value of ScummEngine::canSaveGameStateCurrently. ........ r43437 | lordhoto | 2009-08-16 22:10:51 +1000 (Sun, 16 Aug 2009) | 1 line For a better user experience, clear all meta infos, when clicking on an unused slot in the GMM save/load dialog. ........ r43438 | lordhoto | 2009-08-16 22:11:45 +1000 (Sun, 16 Aug 2009) | 1 line Cleanup. ........ r43440 | mthreepwood | 2009-08-16 23:47:48 +1000 (Sun, 16 Aug 2009) | 1 line Fix for bug #2838517 (FF: backspace does not work when typing save game name). ........ r43441 | mthreepwood | 2009-08-17 00:04:54 +1000 (Mon, 17 Aug 2009) | 1 line Introduce a better fix for the Mac OS X backspace problem by adding the workaround to default-events.cpp. ........ r43444 | lordhoto | 2009-08-17 03:35:59 +1000 (Mon, 17 Aug 2009) | 1 line Fix format arugments in LoL code. (triggered via -Wformat-security) ........ r43445 | lordhoto | 2009-08-17 03:36:16 +1000 (Mon, 17 Aug 2009) | 1 line Fix warning caused by -Wformat-security, also fixed a possible buffer overflow along with it. ........ r43446 | lordhoto | 2009-08-17 03:36:31 +1000 (Mon, 17 Aug 2009) | 1 line Fix warning caused by -Wformat-security. ........ r43447 | lordhoto | 2009-08-17 03:38:09 +1000 (Mon, 17 Aug 2009) | 1 line Fix for bug #2838568 "AMIGAOS4: Compiler error in audiostream.cpp" ........ r43449 | waltervn | 2009-08-17 05:18:19 +1000 (Mon, 17 Aug 2009) | 3 lines SCI: Stage 1 of the game detection overhaul. The end goal is to autodetect as much as possible. All SCI_VERSION_* information was removed from detection.cpp (much of it was incorrect anyway). ........ r43450 | waltervn | 2009-08-17 05:19:26 +1000 (Mon, 17 Aug 2009) | 1 line SCI: Fix regression in previous commit (QFG2). ........ r43451 | waltervn | 2009-08-17 05:20:09 +1000 (Mon, 17 Aug 2009) | 1 line SCI: Fix whitespace. ........ r43452 | sev | 2009-08-17 05:48:13 +1000 (Mon, 17 Aug 2009) | 2 lines Fix bug #2838551: "PSP: AGI games are unbearably slow" ........ svn-id: r43457
Diffstat (limited to 'gui')
-rw-r--r--gui/TabWidget.cpp34
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/saveload.cpp27
3 files changed, 44 insertions, 21 deletions
diff --git a/gui/TabWidget.cpp b/gui/TabWidget.cpp
index 9b77b2f00c..3eb45297f3 100644
--- a/gui/TabWidget.cpp
+++ b/gui/TabWidget.cpp
@@ -91,7 +91,37 @@ int TabWidget::addTab(const String &title) {
int numTabs = _tabs.size();
+ // HACK: Nintendo DS uses a custom config dialog. This dialog does not work with
+ // our default "Globals.TabWidget.Tab.Width" setting.
+ //
+ // TODO: Add proper handling in the theme layout for such cases.
+ //
+ // There are different solutions to this problem:
+ // - offer a "Tab.Width" setting per tab widget and thus let the Ninteno DS
+ // backend set a default value for its special dialog.
+ //
+ // - change our themes to use auto width calculaction by default
+ //
+ // - change "Globals.TabWidget.Tab.Width" to be the minimal tab width setting and
+ // rename it accordingly.
+ // Actually this solution is pretty similar to our HACK for the Nintendo DS
+ // backend. This hack enables auto width calculation by default with the
+ // "Globals.TabWidget.Tab.Width" value as minimal width for the tab buttons.
+ //
+ // - we might also consider letting every tab button having its own width.
+ //
+ // - other solutions you can think of, which are hopefully less evil ;-).
+ //
+ // Of course also the Ninteno DS' dialog should be in our layouting engine, instead
+ // of being hard coded like it is right now.
+ //
+ // There are checks for __DS__ all over this source file to take care of the
+ // aforemnetioned problem.
+#ifdef __DS__
+ if (true) {
+#else
if (g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Width") == 0) {
+#endif
if (_tabWidth == 0)
_tabWidth = 40;
// Determine the new tab width
@@ -217,6 +247,10 @@ void TabWidget::reflowLayout() {
if (_tabWidth == 0) {
_tabWidth = 40;
+#ifdef __DS__
+ }
+ if (true) {
+#endif
int maxWidth = _w / _tabs.size();
for (uint i = 0; i < _tabs.size(); ++i) {
diff --git a/gui/options.cpp b/gui/options.cpp
index e941cd6244..a0e1f0d9fe 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -744,10 +744,10 @@ int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) {
}
void OptionsDialog::reflowLayout() {
- Dialog::reflowLayout();
-
if (_graphicsTabId != -1 && _tabWidget)
_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX");
+
+ Dialog::reflowLayout();
}
#pragma mark -
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index f859c706fb..ce700c181e 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -235,6 +235,11 @@ void SaveLoadChooser::updateSelection(bool redraw) {
bool isWriteProtected = false;
bool startEditMode = _list->isEditable();
+ _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB);
+ _date->setLabel("No date saved");
+ _time->setLabel("No time saved");
+ _playtime->setLabel("No playtime saved");
+
if (selItem >= 0 && !_list->getSelectedString().empty() && _metaInfoSupport) {
SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), atoi(_saveList[selItem].save_slot().c_str()));
@@ -250,36 +255,20 @@ void SaveLoadChooser::updateSelection(bool redraw) {
if (thumb) {
_gfxWidget->setGfx(thumb);
_gfxWidget->useAlpha(256);
- } else {
- _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB);
}
}
if (_saveDateSupport) {
- Common::String date = "Date: ";
if (desc.contains("save_date"))
- date += desc.getVal("save_date");
- else
- date = "No date saved";
+ _date->setLabel("Date: " + desc.getVal("save_date"));
- Common::String time = "Time: ";
if (desc.contains("save_time"))
- time += desc.getVal("save_time");
- else
- time = "No time saved";
-
- _date->setLabel(date);
- _time->setLabel(time);
+ _time->setLabel("Time: " + desc.getVal("save_time"));
}
if (_playTimeSupport) {
- Common::String time = "Playtime: ";
if (desc.contains("play_time"))
- time += desc.getVal("play_time");
- else
- time = "No playtime saved";
-
- _playtime->setLabel(time);
+ _playtime->setLabel("Playtime: " + desc.getVal("play_time"));
}
}