move gui styles from /sim/gui[n] to /sim/gui/style[n] to make /sim/gui
free for other gui related properties
This commit is contained in:
parent
f4a7766013
commit
357dfb3934
3 changed files with 11 additions and 9 deletions
|
@ -140,12 +140,12 @@ Widget = {
|
|||
########################################################################
|
||||
|
||||
nextStyle = func {
|
||||
numStyles = size(props.globals.getNode("/sim").getChildren("gui"));
|
||||
curr = getprop("/sim/current-gui") + 1;
|
||||
numStyles = size(props.globals.getNode("/sim/gui").getChildren("style"));
|
||||
curr = getprop("/sim/gui/current-style") + 1;
|
||||
if (curr >= numStyles) {
|
||||
curr = 0;
|
||||
}
|
||||
setprop("/sim/current-gui", curr);
|
||||
setprop("/sim/gui/current-style", curr);
|
||||
fgcommand("gui-redraw", props.Node.new());
|
||||
}
|
||||
|
||||
|
|
|
@ -147,9 +147,9 @@ window = {
|
|||
log = nil;
|
||||
|
||||
settimer(func {
|
||||
setlistener("/sim/current-gui", func {
|
||||
var theme = getprop("/sim/current-gui");
|
||||
theme_font = getprop("/sim/gui[" ~ theme ~ "]/fonts/message-display/name");
|
||||
setlistener("/sim/gui/current-style", func {
|
||||
var theme = getprop("/sim/gui/current-style");
|
||||
theme_font = getprop("/sim/gui/style[" ~ theme ~ "]/fonts/message-display/name");
|
||||
}, 1);
|
||||
|
||||
log = window.new(nil, -30, 10, 10);
|
||||
|
|
|
@ -349,9 +349,11 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<default include="gui/menubar.xml"/>
|
||||
</menubar>
|
||||
|
||||
<current-gui type="int" userarchive="y">0</current-gui>
|
||||
<gui n="0" include="gui/styles/default.xml"/>
|
||||
<gui n="1" include="gui/styles/anthrax.xml"/>
|
||||
<gui>
|
||||
<current-style type="int" userarchive="y">0</current-style>
|
||||
<style n="0" include="gui/styles/default.xml"/>
|
||||
<style n="1" include="gui/styles/anthrax.xml"/>
|
||||
</gui>
|
||||
|
||||
<mouse>
|
||||
<hide-cursor>true</hide-cursor>
|
||||
|
|
Loading…
Add table
Reference in a new issue