From 7c213ab11022ffce603099fe409d44d383ce94e7 Mon Sep 17 00:00:00 2001
From: Vicent Marti
Date: Fri, 15 Aug 2008 19:10:37 +0000
Subject: Tons of misc. GFX fixes.
svn-id: r33911
---
gui/ThemeParser.cpp | 1 +
gui/ThemeRenderer.cpp | 9 ++++-
gui/newgui.cpp | 1 +
gui/options.cpp | 8 ++++-
gui/options.h | 1 +
gui/themes/default.inc | 5 +++
gui/themes/scummclassic.zip | Bin 40072 -> 40158 bytes
gui/themes/scummclassic/classic_gfx.stx | 6 +++-
gui/themes/scummclassic/classic_layout.stx | 6 ++--
gui/themes/scummclassic/classic_layout_320.stx | 6 ++--
gui/themes/scummodern.zip | Bin 122565 -> 122840 bytes
gui/themes/scummodern/scummodern_gfx.stx | 43 +++++++++++++++---------
gui/themes/scummodern/scummodern_layout_320.stx | 6 ++--
13 files changed, 64 insertions(+), 28 deletions(-)
(limited to 'gui')
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 63fc868ba6..2656f2a898 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -52,6 +52,7 @@ ThemeParser::ThemeParser(ThemeRenderer *parent) : XMLParser() {
_drawFunctions["tab"] = &Graphics::VectorRenderer::drawCallback_TAB;
_drawFunctions["void"] = &Graphics::VectorRenderer::drawCallback_VOID;
_drawFunctions["bitmap"] = &Graphics::VectorRenderer::drawCallback_BITMAP;
+ _drawFunctions["cross"] = &Graphics::VectorRenderer::drawCallback_CROSS;
_defaultStepGlobal = defaultDrawStep();
_defaultStepLocal = 0;
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp
index 27409d8192..c24f8a6d50 100644
--- a/gui/ThemeRenderer.cpp
+++ b/gui/ThemeRenderer.cpp
@@ -29,6 +29,7 @@
#include "common/system.h"
#include "common/events.h"
#include "common/config-manager.h"
+#include "common/fs.h"
#include "graphics/imageman.h"
#include "graphics/cursorman.h"
#include "gui/launcher.h"
@@ -461,7 +462,7 @@ bool ThemeRenderer::loadThemeXML(Common::String themeName) {
if (parser()->loadStream(stream) == false || parser()->parse() == false) {
warning("Failed to load stream for zipped file '%s'", fileNameBuffer);
unzClose(zipFile);
- delete stream;
+// delete stream;
return false;
}
}
@@ -474,6 +475,9 @@ bool ThemeRenderer::loadThemeXML(Common::String themeName) {
}
}
+// FilesystemNode dir(themeName);
+// FSList files = dir.listDir(FilesystemNode::kListFilesOnly);
+
unzClose(zipFile);
return (parseCount > 0 && _themeName.empty() == false);
#else
@@ -705,6 +709,9 @@ void ThemeRenderer::drawScrollbar(const Common::Rect &r, int sliderY, int slider
r2.right -= 1;
r2.top += sliderY;
r2.bottom = r2.top + sliderHeight - 1;
+
+ r2.top += r.width() / 5;
+ r2.bottom -= r.width() / 5;
queueDD(scrollState == kScrollbarStateSlider ? kDDScrollbarHandleHover : kDDScrollbarHandleIdle, r2);
}
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 82d6b2db91..fc781f731d 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -423,6 +423,7 @@ void NewGui::screenChange() {
// redrawn before redraw() has been called.
_redrawStatus = kRedrawFull;
redraw();
+ _system->showOverlay();
_system->updateScreen();
}
diff --git a/gui/options.cpp b/gui/options.cpp
index 05b0f790a2..c24b338af6 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -88,6 +88,12 @@ const char *OptionsDialog::_subModeDesc[] = {
"Subtitles Only"
};
+const char *OptionsDialog::_lowresSubModeDesc[] = {
+ "Speech Only",
+ "Speech & Subs",
+ "Subtitles Only"
+};
+
void OptionsDialog::init() {
_enableGraphicSettings = false;
_gfxPopUp = 0;
@@ -417,7 +423,7 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
else
_subMode = 0;
- _subToggleButton->setLabel(_subModeDesc[_subMode]);
+ _subToggleButton->setLabel(g_system->getOverlayWidth() > 320 ? _subModeDesc[_subMode] : _lowresSubModeDesc[_subMode]);
_subToggleButton->draw();
_subSpeedDesc->draw();
_subSpeedSlider->draw();
diff --git a/gui/options.h b/gui/options.h
index 39f2918ce2..187e163b79 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -122,6 +122,7 @@ private:
ButtonWidget *_subToggleButton;
int _subMode;
static const char *_subModeDesc[];
+ static const char *_lowresSubModeDesc[];
StaticTextWidget *_subSpeedDesc;
SliderWidget *_subSpeedSlider;
StaticTextWidget *_subSpeedLabel;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index fd948ab3fa..ce7fc16cfc 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -282,6 +282,11 @@
"bevel = '2' "
"fill = 'none' "
"/> "
+" "
" "
" "
"
-/* TODO */
+
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 8be91e9de6..005ebb89f3 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -250,12 +250,12 @@
+
-
+
-
-
+
+
+
+
diff --git a/gui/themes/scummodern/scummodern_layout_320.stx b/gui/themes/scummodern/scummodern_layout_320.stx
index e545f5f98d..9d689e5c8d 100644
--- a/gui/themes/scummodern/scummodern_layout_320.stx
+++ b/gui/themes/scummodern/scummodern_layout_320.stx
@@ -245,12 +245,12 @@
+
-