Added [theme] hidden= attribute...
...that makes a theme unavailable for selection in Preferences or :theme (defaults to no) The many "null" themes, and the editor theme make use of this now. This could be useful for campaign cutscene themes, for example, which shouldn't be used by users for regular gameplay.
This commit is contained in:
parent
999bf89835
commit
1f276a1b80
7 changed files with 9 additions and 1 deletions
|
@ -91,6 +91,8 @@ Version 1.9.9+svn:
|
|||
[note]
|
||||
* Implemented red=, green=, and blue= for [objective], [gold_carryover], and
|
||||
[note]
|
||||
* Added [theme] hidden= attribute that makes a theme unavailable for selection
|
||||
in Preferences or :theme (defaults to no)
|
||||
* Miscellaneous and bug fixes:
|
||||
* Add --language/-L commandline option to set the language for that session
|
||||
* Fixed: Avoid copying of singular iterators in the whiteboard code
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
[theme]
|
||||
name=null
|
||||
hidden=yes
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
[theme]
|
||||
name=null
|
||||
hidden=yes
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
[theme]
|
||||
name=null
|
||||
hidden=yes
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
|
@ -16,6 +17,7 @@
|
|||
|
||||
[theme]
|
||||
name=editor
|
||||
hidden=yes
|
||||
|
||||
#define DEFAULT_EDITOR_FONT_NORMAL
|
||||
14 #enddef
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
[theme]
|
||||
name=null
|
||||
hidden=yes
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
[theme]
|
||||
name=null
|
||||
hidden=yes
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
|
|
|
@ -761,7 +761,7 @@ void theme::set_known_themes(const config* cfg)
|
|||
foreach (const config &thm, cfg->child_range("theme"))
|
||||
{
|
||||
std::string thm_name = thm["name"];
|
||||
if (thm_name != "null" && thm_name != "editor")
|
||||
if (!thm["hidden"].to_bool(false))
|
||||
known_themes[thm_name] = thm;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue