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 {
|
nextStyle = func {
|
||||||
numStyles = size(props.globals.getNode("/sim").getChildren("gui"));
|
numStyles = size(props.globals.getNode("/sim/gui").getChildren("style"));
|
||||||
curr = getprop("/sim/current-gui") + 1;
|
curr = getprop("/sim/gui/current-style") + 1;
|
||||||
if (curr >= numStyles) {
|
if (curr >= numStyles) {
|
||||||
curr = 0;
|
curr = 0;
|
||||||
}
|
}
|
||||||
setprop("/sim/current-gui", curr);
|
setprop("/sim/gui/current-style", curr);
|
||||||
fgcommand("gui-redraw", props.Node.new());
|
fgcommand("gui-redraw", props.Node.new());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,9 +147,9 @@ window = {
|
||||||
log = nil;
|
log = nil;
|
||||||
|
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setlistener("/sim/current-gui", func {
|
setlistener("/sim/gui/current-style", func {
|
||||||
var theme = getprop("/sim/current-gui");
|
var theme = getprop("/sim/gui/current-style");
|
||||||
theme_font = getprop("/sim/gui[" ~ theme ~ "]/fonts/message-display/name");
|
theme_font = getprop("/sim/gui/style[" ~ theme ~ "]/fonts/message-display/name");
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
log = window.new(nil, -30, 10, 10);
|
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"/>
|
<default include="gui/menubar.xml"/>
|
||||||
</menubar>
|
</menubar>
|
||||||
|
|
||||||
<current-gui type="int" userarchive="y">0</current-gui>
|
<gui>
|
||||||
<gui n="0" include="gui/styles/default.xml"/>
|
<current-style type="int" userarchive="y">0</current-style>
|
||||||
<gui n="1" include="gui/styles/anthrax.xml"/>
|
<style n="0" include="gui/styles/default.xml"/>
|
||||||
|
<style n="1" include="gui/styles/anthrax.xml"/>
|
||||||
|
</gui>
|
||||||
|
|
||||||
<mouse>
|
<mouse>
|
||||||
<hide-cursor>true</hide-cursor>
|
<hide-cursor>true</hide-cursor>
|
||||||
|
|
Loading…
Add table
Reference in a new issue