aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp2
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/ThemeParser.cpp58
-rw-r--r--gui/ThemeParser.h5
-rw-r--r--gui/credits.h1
-rw-r--r--gui/themes/default.inc16
-rw-r--r--gui/themes/scummclassic.zipbin53162 -> 53146 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx8
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx8
-rw-r--r--gui/themes/scummmodern.zipbin157839 -> 157823 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx8
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx8
12 files changed, 60 insertions, 56 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 4628ec436b..166b11afe3 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1447,7 +1447,7 @@ void ThemeEngine::listUsableThemes(Common::List<ThemeDescriptor> &list) {
output.clear();
}
-void ThemeEngine::listUsableThemes(Common::FSNode node, Common::List<ThemeDescriptor> &list, int depth) {
+void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<ThemeDescriptor> &list, int depth) {
if (!node.exists() || !node.isReadable() || !node.isDirectory())
return;
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index a8e63098fb..fd2d9c65fd 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -529,7 +529,7 @@ private:
static Common::String getThemeFile(const Common::String &id);
static Common::String getThemeId(const Common::String &filename);
- static void listUsableThemes(Common::FSNode node, Common::List<ThemeDescriptor> &list, int depth=-1);
+ static void listUsableThemes(const Common::FSNode &node, Common::List<ThemeDescriptor> &list, int depth = -1);
protected:
OSystem *_system; /** Global system object. */
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 2e7e2d3214..8897eef9d7 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -23,17 +23,11 @@
*
*/
-#include "common/util.h"
-#include "common/system.h"
-#include "common/events.h"
-#include "common/hashmap.h"
-#include "common/hash-str.h"
-#include "common/xmlparser.h"
-
#include "gui/ThemeEngine.h"
#include "gui/ThemeEval.h"
#include "gui/ThemeParser.h"
#include "gui/GuiManager.h"
+
#include "graphics/VectorRenderer.h"
namespace GUI {
@@ -86,19 +80,6 @@ static GUI::ThemeEngine::TextAlignVertical parseTextVAlign(const Common::String
ThemeParser::ThemeParser(ThemeEngine *parent) : XMLParser() {
-
- _drawFunctions["circle"] = &Graphics::VectorRenderer::drawCallback_CIRCLE;
- _drawFunctions["square"] = &Graphics::VectorRenderer::drawCallback_SQUARE;
- _drawFunctions["roundedsq"] = &Graphics::VectorRenderer::drawCallback_ROUNDSQ;
- _drawFunctions["bevelsq"] = &Graphics::VectorRenderer::drawCallback_BEVELSQ;
- _drawFunctions["line"] = &Graphics::VectorRenderer::drawCallback_LINE;
- _drawFunctions["triangle"] = &Graphics::VectorRenderer::drawCallback_TRIANGLE;
- _drawFunctions["fill"] = &Graphics::VectorRenderer::drawCallback_FILLSURFACE;
- _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;
_theme = parent;
@@ -107,8 +88,6 @@ ThemeParser::ThemeParser(ThemeEngine *parent) : XMLParser() {
ThemeParser::~ThemeParser() {
delete _defaultStepGlobal;
delete _defaultStepLocal;
- _palette.clear();
- _drawFunctions.clear();
}
void ThemeParser::cleanup() {
@@ -281,15 +260,44 @@ bool ThemeParser::parserCallback_color(ParserNode *node) {
}
+static Graphics::DrawingFunctionCallback getDrawingFunctionCallback(const Common::String &name) {
+
+ if (name == "circle")
+ return &Graphics::VectorRenderer::drawCallback_CIRCLE;
+ if (name == "square")
+ return &Graphics::VectorRenderer::drawCallback_SQUARE;
+ if (name == "roundedsq")
+ return &Graphics::VectorRenderer::drawCallback_ROUNDSQ;
+ if (name == "bevelsq")
+ return &Graphics::VectorRenderer::drawCallback_BEVELSQ;
+ if (name == "line")
+ return &Graphics::VectorRenderer::drawCallback_LINE;
+ if (name == "triangle")
+ return &Graphics::VectorRenderer::drawCallback_TRIANGLE;
+ if (name == "fill")
+ return &Graphics::VectorRenderer::drawCallback_FILLSURFACE;
+ if (name == "tab")
+ return &Graphics::VectorRenderer::drawCallback_TAB;
+ if (name == "void")
+ return &Graphics::VectorRenderer::drawCallback_VOID;
+ if (name == "bitmap")
+ return &Graphics::VectorRenderer::drawCallback_BITMAP;
+ if (name == "cross")
+ return &Graphics::VectorRenderer::drawCallback_CROSS;
+
+ return 0;
+}
+
+
bool ThemeParser::parserCallback_drawstep(ParserNode *node) {
Graphics::DrawStep *drawstep = newDrawStep();
Common::String functionName = node->values["func"];
- if (_drawFunctions.contains(functionName) == false)
- return parserError("%s is not a valid drawing function name", functionName.c_str());
+ drawstep->drawingCall = getDrawingFunctionCallback(functionName);
- drawstep->drawingCall = _drawFunctions[functionName];
+ if (drawstep->drawingCall == 0)
+ return parserError("%s is not a valid drawing function name", functionName.c_str());
if (!parseDrawStep(node, drawstep, true))
return false;
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index 7c9d39030b..e261b6b842 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -27,7 +27,6 @@
#define THEME_PARSER_H
#include "common/scummsys.h"
-#include "common/system.h"
#include "common/xmlparser.h"
namespace GUI {
@@ -35,8 +34,6 @@ namespace GUI {
class ThemeEngine;
class ThemeParser : public Common::XMLParser {
- typedef void (Graphics::VectorRenderer::*DrawingFunctionCallback)(const Common::Rect &, const Graphics::DrawStep &);
-
public:
ThemeParser(ThemeEngine *parent);
@@ -249,8 +246,6 @@ protected:
Graphics::DrawStep *_defaultStepGlobal;
Graphics::DrawStep *_defaultStepLocal;
- Common::HashMap<Common::String, DrawingFunctionCallback, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _drawFunctions;
-
struct PaletteColor {
uint8 r, g, b;
};
diff --git a/gui/credits.h b/gui/credits.h
index 4bfd788172..869adec827 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -61,6 +61,7 @@ static const char *credits[] = {
"C1""Cinematique evo 2",
"C0""Vincent Hamm",
"C2""original CruisE engine author",
+"C0""Paul Gilbert",
"",
"C1""FOTAQ",
"C0""Gregory Montoir",
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index d23c7ff060..d2fe7dade5 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -334,9 +334,9 @@
"<def var='ShowGlobalMenuLogo' value='0'/> "
"<def var='ShowSearchPic' value='0'/> "
"<def var='ScummSaveLoad.ExtInfo.Visible' value='1'/> "
-"<def var='KeyRemapper.Spacing' value='10'/> "
-"<def var='KeyRemapper.LabelWidth' value='100'/> "
-"<def var='KeyRemapper.ButtonWidth' value='80'/> "
+"<def var='KeyMapper.Spacing' value='10'/> "
+"<def var='KeyMapper.LabelWidth' value='100'/> "
+"<def var='KeyMapper.ButtonWidth' value='80'/> "
"<widget name='OptionsLabel' "
"size='110,Globals.Line.Height' "
"textalign='right' "
@@ -1055,7 +1055,7 @@
"</layout> "
"</layout> "
"</dialog> "
-"<dialog name='KeyRemapper' overlays='screen_center' shading='dim'> "
+"<dialog name='KeyMapper' overlays='screen_center' shading='dim'> "
"<layout type='vertical' padding='8,8,32,8' spacing='10' center='true'> "
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
"<widget name='PopupDesc' "
@@ -1087,9 +1087,9 @@
"<def var='ShowGlobalMenuLogo' value='0'/> "
"<def var='ShowSearchPic' value='0'/> "
"<def var='ScummSaveLoad.ExtInfo.Visible' value='0'/> "
-"<def var='KeyRemapper.Spacing' value='5'/> "
-"<def var='KeyRemapper.LabelWidth' value='80'/> "
-"<def var='KeyRemapper.ButtonWidth' value='60'/> "
+"<def var='KeyMapper.Spacing' value='5'/> "
+"<def var='KeyMapper.LabelWidth' value='80'/> "
+"<def var='KeyMapper.ButtonWidth' value='60'/> "
"<widget name='Button' "
"size='72,16' "
"/> "
@@ -1812,7 +1812,7 @@
"</layout> "
"</layout> "
"</dialog> "
-"<dialog name='KeyRemapper' overlays='screen_center' shading='dim'> "
+"<dialog name='KeyMapper' overlays='screen_center' shading='dim'> "
"<layout type='vertical' padding='8,8,8,8' spacing='10' center='true'> "
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
"<widget name='PopupDesc' "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 9f2701fcd0..cd686aaf1e 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 567b0f0d9e..0256fc7dd6 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -37,9 +37,9 @@
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
- <def var = 'KeyRemapper.Spacing' value = '10'/>
- <def var = 'KeyRemapper.LabelWidth' value = '100'/>
- <def var = 'KeyRemapper.ButtonWidth' value = '80'/>
+ <def var = 'KeyMapper.Spacing' value = '10'/>
+ <def var = 'KeyMapper.LabelWidth' value = '100'/>
+ <def var = 'KeyMapper.ButtonWidth' value = '80'/>
<widget name = 'OptionsLabel'
size = '110, Globals.Line.Height'
@@ -786,7 +786,7 @@
</layout>
</layout>
</dialog>
- <dialog name = 'KeyRemapper' overlays = 'screen_center' shading = 'dim'>
+ <dialog name = 'KeyMapper' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 32, 8' spacing = '10' center = 'true'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'PopupDesc'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 809ceccf9f..d4a92b831e 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -38,9 +38,9 @@
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/>
- <def var = 'KeyRemapper.Spacing' value = '5'/>
- <def var = 'KeyRemapper.LabelWidth' value = '80'/>
- <def var = 'KeyRemapper.ButtonWidth' value = '60'/>
+ <def var = 'KeyMapper.Spacing' value = '5'/>
+ <def var = 'KeyMapper.LabelWidth' value = '80'/>
+ <def var = 'KeyMapper.ButtonWidth' value = '60'/>
<widget name = 'Button'
size = '72, 16'
@@ -791,7 +791,7 @@
</layout>
</layout>
</dialog>
- <dialog name = 'KeyRemapper' overlays = 'screen_center' shading = 'dim'>
+ <dialog name = 'KeyMapper' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '10' center = 'true'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'PopupDesc'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 8a1739adb5..a133723d99 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index d3cd048f1d..8c13217c65 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -44,9 +44,9 @@
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
- <def var = 'KeyRemapper.Spacing' value = '10'/>
- <def var = 'KeyRemapper.LabelWidth' value = '100'/>
- <def var = 'KeyRemapper.ButtonWidth' value = '80'/>
+ <def var = 'KeyMapper.Spacing' value = '10'/>
+ <def var = 'KeyMapper.LabelWidth' value = '100'/>
+ <def var = 'KeyMapper.ButtonWidth' value = '80'/>
<widget name = 'OptionsLabel'
size = '110, Globals.Line.Height'
@@ -801,7 +801,7 @@
</layout>
</dialog>
- <dialog name = 'KeyRemapper' overlays = 'screen_center' shading = 'dim'>
+ <dialog name = 'KeyMapper' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 32, 8' spacing = '10' center = 'true'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'PopupDesc'
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 6f7f25db20..13346a1d6f 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -44,9 +44,9 @@
size = '85, 12'
/>
- <def var = 'KeyRemapper.Spacing' value = '5'/>
- <def var = 'KeyRemapper.LabelWidth' value = '80'/>
- <def var = 'KeyRemapper.ButtonWidth' value = '60'/>
+ <def var = 'KeyMapper.Spacing' value = '5'/>
+ <def var = 'KeyMapper.LabelWidth' value = '80'/>
+ <def var = 'KeyMapper.ButtonWidth' value = '60'/>
<widget name = 'OptionsLabel'
size = '100, Globals.Line.Height'
@@ -780,7 +780,7 @@
</layout>
</layout>
</dialog>
- <dialog name = 'KeyRemapper' overlays = 'screen_center' shading = 'dim'>
+ <dialog name = 'KeyMapper' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '10' center = 'true'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'PopupDesc'