aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.h
diff options
context:
space:
mode:
authorJohannes Schickel2009-01-02 21:24:13 +0000
committerJohannes Schickel2009-01-02 21:24:13 +0000
commit1d2c446395abe6c8e4bc5639259204701a42b4d9 (patch)
tree9988951d8c7f9388768574017a7d7be25cc426f5 /gui/ThemeEngine.h
parent105d2189124cd7993cf13725fec4d52a4d253586 (diff)
downloadscummvm-rg350-1d2c446395abe6c8e4bc5639259204701a42b4d9.tar.gz
scummvm-rg350-1d2c446395abe6c8e4bc5639259204701a42b4d9.tar.bz2
scummvm-rg350-1d2c446395abe6c8e4bc5639259204701a42b4d9.zip
- Moved theme listing code from GuiManager to ThemeEngine
- Only show builtin theme in theme list if GUI_ENABLE_BUILTIN_THEME is defined - Introduced _themeFile to ThemeEngine again and changed _themeId to store the basename of the theme svn-id: r35684
Diffstat (limited to 'gui/ThemeEngine.h')
-rw-r--r--gui/ThemeEngine.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 1067d11b11..434730da51 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -235,7 +235,7 @@ public:
static const char *findModeConfigName(GraphicsMode mode);
/** Default constructor */
- ThemeEngine(Common::String fileName, GraphicsMode mode);
+ ThemeEngine(Common::String id, GraphicsMode mode);
/** Default destructor */
~ThemeEngine();
@@ -584,15 +584,30 @@ protected:
void debugWidgetPosition(const char *name, const Common::Rect &r);
public:
+ struct ThemeDescriptor {
+ Common::String name;
+ Common::String id;
+ Common::String filename;
+ };
/**
+ * Lists all theme files useable.
+ */
+ static void listUsableThemes(Common::List<ThemeDescriptor> &list);
+private:
+ static bool themeConfigUsable(const Common::FSNode &node, Common::String &themeName);
+ static bool themeConfigParseHeader(Common::String header, Common::String &themeName);
+
+ 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);
+
+public:
+ /**
* @name LEGACY: Old GUI::Theme API
*/
//@{
- static bool themeConfigUseable(const Common::FSNode &node, Common::String &themeName);
- static bool themeConfigParseHeader(Common::String header, Common::String &themeName);
-
int getTabSpacing() const { return 0; }
int getTabPadding() const { return 3; }
@@ -656,6 +671,7 @@ protected:
Common::String _themeName; //!< Name of the currently loaded theme
Common::String _themeId;
+ Common::String _themeFile;
Common::Archive *_themeArchive;
bool _useCursor;