diff options
-rw-r--r-- | gui/InterfaceManager.cpp | 3 | ||||
-rw-r--r-- | gui/ThemeDefaultXML.cpp | 8 | ||||
-rw-r--r-- | gui/ThemeParser.cpp | 8 |
3 files changed, 15 insertions, 4 deletions
diff --git a/gui/InterfaceManager.cpp b/gui/InterfaceManager.cpp index 43d2aa7864..cbaf1bbf5b 100644 --- a/gui/InterfaceManager.cpp +++ b/gui/InterfaceManager.cpp @@ -257,7 +257,8 @@ void InterfaceManager::drawScrollbar(const Common::Rect &r, int sliderY, int sli int InterfaceManager::runGUI() { Common::EventManager *eventMan = _system->getEventManager(); - loadTheme("modern_theme.xml"); + if (!loadTheme("modern_theme.xml")) + return 0; _system->showOverlay(); diff --git a/gui/ThemeDefaultXML.cpp b/gui/ThemeDefaultXML.cpp index 6067a44545..0d9faf0768 100644 --- a/gui/ThemeDefaultXML.cpp +++ b/gui/ThemeDefaultXML.cpp @@ -43,14 +43,20 @@ bool InterfaceManager::loadDefaultXML() { "<color name = 'green' rgb = '0, 255, 0' />" "<color name = 'blue' rgb = '0, 0, 255' />" "</palette>" + "<default fill = 'gradient' fg_color = '255, 255, 255' />" + "<drawdata id = 'mainmenu_bg' cache = false>" "<drawstep func = 'fill' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' />" "</drawdata>" + "<drawdata id = 'button_idle' cache = false>" "<drawstep func = 'roundedsq' radius = '8' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' size = 'auto' />" "</drawdata>" -"</render_info>"; +"</render_info>" + +"<layout_info>" +"</layout_info>"; if (!parser()->loadBuffer(defaultXML, true)) return false; diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index 6665154cd2..671a4a543e 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -233,8 +233,12 @@ bool ThemeParser::parserCallback_DRAWDATA() { if (id == -1) return parserError("%s is not a valid DrawData set identifier.", drawdataNode->values["id"].c_str()); - if (drawdataNode->values.contains("cached") && drawdataNode->values["cached"] == "true") { - cached = true; + if (drawdataNode->values.contains("cache")) { + if (drawdataNode->values["cache"] == "true") + cached = true; + else if (drawdataNode->values["cache"] == "false") + cached = false; + else return parserError("'Parsed' value must be either true or false."); } // Both Max and Johannes suggest using a non-platform specfic approach based on available |