![]() |
Blamite Game Engine - Keystone
00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
|
#include "themes.h"
#include <qstylefactory.h>
#include <Strings/components/3rdparty/rapidxml/rapidxml.hpp>
#include <Strings/components/utils/io/io.h>
#include <Strings/components/utils/string/string.h>
#include <Strings/components/classes/events/events.h>
#include <Strings/components/classes/events/editor_events/EditorThemeChange/EditorThemeChange.h>
#include <Strings/components/logger/logger.h>
#include <fstream>
#include "components/editor_data/editor_data.h"
Functions | |
bool | load_xml_theme (rapidxml::xml_document<> *theme_document, std::string folder_path, std::string xml_file_path, BlamEditorThemeType theme_type) |
Loads a theme from an XML file. More... | |
bool | load_themes_in_folder (std::string theme_dir, BlamEditorThemeType theme_type) |
Loads all XML themes in a given directory. More... | |
Variables | |
std::vector< BlamEditorTheme > | themes |
The current list of loaded themes. More... | |
int | active_theme_index = -1 |
The index of the currently active theme. More... | |
bool load_themes_in_folder | ( | std::string | theme_dir, |
BlamEditorThemeType | theme_type | ||
) |
Loads all XML themes in a given directory.
theme_dir | - The directory to read themes from. |
theme_type | - The type of theme being loaded. |
true
if all themes were loades successfully, otherwise returns false
. bool load_xml_theme | ( | rapidxml::xml_document<> * | theme_document, |
std::string | folder_path, | ||
std::string | xml_file_path, | ||
BlamEditorThemeType | theme_type | ||
) |
Loads a theme from an XML file.
theme_document | - The xml document to read theme information from. |
folder_path | - The root folder of the theme. Used for log messages, and is written in place of {theme_root} in the stylesheet. |
xml_file_path | - The path to the theme's XML file. |
theme_type | - The type of theme being loaded. |
true
if the theme was loaded successfully, otherwise returns false
. int active_theme_index = -1 |
The index of the currently active theme.
std::vector<BlamEditorTheme> themes |
The current list of loaded themes.