From 0bbdaab69c9df14d0e98ce72755520adf2ebe327 Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 30 Jul 2008 21:54:42 +0000 Subject: [PATCH] add "var" keywords and other cosmetics --- gui/dialogs/joystick-info.xml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gui/dialogs/joystick-info.xml b/gui/dialogs/joystick-info.xml index af0658c9e..8d4e62ef1 100644 --- a/gui/dialogs/joystick-info.xml +++ b/gui/dialogs/joystick-info.xml @@ -33,11 +33,11 @@ - value = func(p, default = "") { + var value = func(p, default = "") { return p != nil and (var v = p.getValue()) != nil ? v : default; } - items = func(it, name) { + var items = func(it, name) { var t = ""; foreach (var x; it) { t ~= " ["; @@ -63,9 +63,9 @@ if (size(names)) { t ~= " Used for: "; var last = pop(names); - foreach (var n; names) { + foreach (var n; names) t ~= '"' ~ value(n) ~ '", '; - } + t ~= '"' ~ value(last) ~ '"'; } t ~= "\n\n"; @@ -74,13 +74,11 @@ t ~= items(js.getChildren("button"), "Button"); var help = value(js.getNode("help"), nil); - if (help != nil) { + if (help != nil) t ~= "\n\n" ~ help; - } - if (numjs > 1 and i < numjs - 1) { + if (numjs > 1 and i < numjs - 1) t ~= "\n\n\n----------------------------------------\n\n\n"; - } } var text = props.globals.getNode("/sim/gui/dialogs/joystick-info/text", 1);