Open main menu

Difference between revisions of "GUI Themes/Specs"

749 bytes added ,  01:22, 29 October 2007
adding section on disabling widgets
(→‎Widget properties: -- describe .enable)
(adding section on disabling widgets)
Line 501: Line 501:


Only present sections are loaded. If a section is not defined no error message is generated.
Only present sections are loaded. If a section is not defined no error message is generated.
== Disabling Widgets ==
Widgets can be disabled. This is especially useful on platforms that lack certain features and can be used without modifying the main theme configuration.
The function in the base OSystem is <tt>Common::String getExtraThemeConfig();</tt> and it can be used as such:
<pre>
Common::String OSystem_SDL::getExtraThemeConfig() {
        Common::String myConfigINI(""
          "[XxY]\n"
          "mcFontButton.enabled=false\n"
          "mcFontPath.enabled=false\n"
          "mcFontClearButton.enabled=false\n"
          );
        return myConfigINI;
}
</pre>
This code would disable those three widgets. The string will be treated like a separate configuration, so you would have to specify resolution sections in there.


== Widget name conventions ==
== Widget name conventions ==
2,051

edits