allow to cycle through available styles
This commit is contained in:
parent
34dd362fd7
commit
02ca61961d
1 changed files with 17 additions and 0 deletions
|
@ -90,6 +90,23 @@ Widget = {
|
|||
};
|
||||
|
||||
|
||||
|
||||
########################################################################
|
||||
# GUI theming
|
||||
########################################################################
|
||||
|
||||
nextStyle = func {
|
||||
numStyles = size(props.globals.getNode("/sim").getChildren("gui"));
|
||||
curr = getprop("/sim/current-gui") + 1;
|
||||
if (curr >= numStyles) {
|
||||
curr = 0;
|
||||
}
|
||||
setprop("/sim/current-gui", curr);
|
||||
fgcommand("reinit", props.Node.new({ "subsystem" : "gui"}))
|
||||
}
|
||||
|
||||
|
||||
|
||||
########################################################################
|
||||
# Dialog Boxes
|
||||
########################################################################
|
||||
|
|
Loading…
Add table
Reference in a new issue