GUI: Added SVG support to theme parser
This commit is contained in:
parent
37982f9eb4
commit
55ae2e4367
4 changed files with 8 additions and 3 deletions
|
@ -298,7 +298,11 @@ bool ThemeParser::parserCallback_bitmap(ParserNode *node) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!_theme->addBitmap(node->values["filename"]))
|
||||
Common::String scalableFile;
|
||||
if (node->values.contains("scalable_file"))
|
||||
scalableFile = node->values["scalable_file"];
|
||||
|
||||
if (!_theme->addBitmap(node->values["filename"], scalableFile))
|
||||
return parserError("Error loading Bitmap file '" + node->values["filename"] + "'");
|
||||
|
||||
return true;
|
||||
|
|
|
@ -91,6 +91,7 @@ protected:
|
|||
XML_KEY(bitmap)
|
||||
XML_PROP(filename, true)
|
||||
XML_PROP(resolution, false)
|
||||
XML_PROP(scalable_file, false)
|
||||
KEY_END()
|
||||
XML_KEY(alphabitmap)
|
||||
XML_PROP(filename, true)
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
</palette>
|
||||
|
||||
<bitmaps>
|
||||
<bitmap filename = 'logo.bmp'/>
|
||||
<bitmap filename = 'logo.bmp' scalable_file = 'logo.svg'/>
|
||||
<bitmap filename = 'cursor.bmp'/>
|
||||
<bitmap filename = 'cursor_small.bmp'/>
|
||||
<bitmap filename = 'checkbox.bmp'/>
|
||||
|
|
|
@ -5,7 +5,7 @@ import re
|
|||
import os
|
||||
import zipfile
|
||||
|
||||
THEME_FILE_EXTENSIONS = ('.stx', '.bmp', '.fcc', '.ttf', '.png')
|
||||
THEME_FILE_EXTENSIONS = ('.stx', '.bmp', '.fcc', '.ttf', '.png', '.svg')
|
||||
|
||||
def buildTheme(themeName):
|
||||
if not os.path.isdir(themeName) or not os.path.isfile(os.path.join(themeName, "THEMERC")):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue