Drag[en]gine Script Module DragonScript
1.23
|
Public Member Functions | |
void | forEachNamedGuiTheme (Block ablock) |
Visit named gui themes with block with parameters String and GuiTheme. More... | |
void | forEachWidgetDesigner (Block ablock) |
Visit widget designers with block. More... | |
GuiTheme | getNamedGuiTheme (String name) |
Get named gui theme or null if absent. More... | |
int | getNamedGuiThemeCount () |
Number of named gui themes. More... | |
WidgetDesigner | getNamedWidgetDesigner (String name) |
Set named widget designer. More... | |
WidgetDesigner | getWidgetDesigner (String selector) |
Widget designer matching selector. More... | |
int | getWidgetDesignerCount () |
Number of widget designers. More... | |
Font | getWidgetFont () |
Font for widgets. More... | |
GuiTheme | new () |
Creates default gui theme. More... | |
GuiTheme | new (GuiTheme guitheme) |
Create copy of gui theme. More... | |
void | removeAllNamedGuiThemes () |
Remove all named gui themes. More... | |
void | removeNamedGuiTheme (String name) |
Remove named gui theme. More... | |
void | setNamedGuiTheme (String name, GuiTheme guitheme) |
Set named gui theme. More... | |
void | setWidgetDesigner (String name, WidgetDesigner designer) |
Set widget designer. More... | |
void | setWidgetFont (Font font) |
Set font for widgets. More... | |
Gui theme.
Contains widget designers and some global parameters to design widgets. Gui themes are shared both while loading and while assigning to widgets. Do not directly modify gui themes attached to widgets or received from LoadGuiTheme. If you need to modify them create a copy first using copy constructor.
void Dragengine.Gui.GuiTheme.forEachNamedGuiTheme | ( | Block | ablock | ) |
Visit named gui themes with block with parameters String and GuiTheme.
void Dragengine.Gui.GuiTheme.forEachWidgetDesigner | ( | Block | ablock | ) |
Visit widget designers with block.
First parameter String name. Second parameter WidgetDesigner designer.
GuiTheme Dragengine.Gui.GuiTheme.getNamedGuiTheme | ( | String | name | ) |
Get named gui theme or null if absent.
int Dragengine.Gui.GuiTheme.getNamedGuiThemeCount | ( | ) |
Number of named gui themes.
WidgetDesigner Dragengine.Gui.GuiTheme.getNamedWidgetDesigner | ( | String | name | ) |
Set named widget designer.
WidgetDesigner Dragengine.Gui.GuiTheme.getWidgetDesigner | ( | String | selector | ) |
Widget designer matching selector.
Selector composes of alphanumeric identifier. A chain of identifiers can be specified separated by periods. If a chain is defined the full chain is first checked to find the designer. If not found the right most identifier is stripped and the remaining chain checked for a match. The first match is used. This allows to add optional quallifier identifers at the end of the chain for future use while still matching broader designers in the mean time.
As rule of thumb selector is the widget class name (for example Button) with optional qualifiers appended if necessary.
Returned widget designer is shared. Do not modify directly. If you need to modify using setParameter() call first copyDesigner().
int Dragengine.Gui.GuiTheme.getWidgetDesignerCount | ( | ) |
Number of widget designers.
GuiTheme Dragengine.Gui.GuiTheme.new | ( | ) |
Creates default gui theme.
Create copy of gui theme.
Widget designers are shared across copied gui themes. If you need to modify a widget designer using setParameter() you have to call copyDesigner() first and replace the entry in this dictionary.
void Dragengine.Gui.GuiTheme.removeAllNamedGuiThemes | ( | ) |
Remove all named gui themes.
void Dragengine.Gui.GuiTheme.removeNamedGuiTheme | ( | String | name | ) |
Remove named gui theme.
void Dragengine.Gui.GuiTheme.setNamedGuiTheme | ( | String | name, |
GuiTheme | guitheme | ||
) |
Set named gui theme.
void Dragengine.Gui.GuiTheme.setWidgetDesigner | ( | String | name, |
WidgetDesigner | designer | ||
) |
Set widget designer.
void Dragengine.Gui.GuiTheme.setWidgetFont | ( | Font | font | ) |
Set font for widgets.