1
0
Fork 0

- s/Btn/Button/

- simplification
This commit is contained in:
mfranz 2006-10-21 11:46:43 +00:00
parent b840984965
commit d31c5389ef

View file

@ -40,9 +40,8 @@
items = func(it, name) { items = func(it, name) {
var t = ""; var t = "";
foreach (var x; it) { foreach (var x; it) {
var n = value(x.getNode("name"), nil);
t ~= " ["; t ~= " [";
t ~= n != nil ? n : name ~ " #" ~ x.getIndex(); t ~= value(x.getNode("name"), name ~ " #" ~ x.getIndex());
t ~= "] "; t ~= "] ";
t ~= value(x.getNode("desc"), "???"); t ~= value(x.getNode("desc"), "???");
t ~= "\n"; t ~= "\n";
@ -55,8 +54,7 @@
var numjoysticks = size(joysticks); var numjoysticks = size(joysticks);
forindex (var i; joysticks) { forindex (var i; joysticks) {
var js = joysticks[i]; var js = joysticks[i];
t ~= "Joystick #" ~ js.getIndex() ~ ": \"" ~ value(js.getNode("id"), "[unnamed]") t ~= "Joystick #" ~ js.getIndex() ~ ": \"" ~ value(js.getNode("id"), "[unnamed]") ~ "\"\n\n";
~ "\"\n\n";
t ~= " Configuration: " ~ value(js.getNode("source"), "[user defined]") ~ "\n"; t ~= " Configuration: " ~ value(js.getNode("source"), "[user defined]") ~ "\n";
var names = js.getChildren("name"); var names = js.getChildren("name");
if (size(names)) { if (size(names)) {
@ -69,7 +67,8 @@
} }
t ~= "\n\n"; t ~= "\n\n";
t ~= items(js.getChildren("axis"), "Axis"); t ~= items(js.getChildren("axis"), "Axis");
t ~= items(js.getChildren("button"), "Btn"); t ~= "\n";
t ~= items(js.getChildren("button"), "Button");
if (numjoysticks > 1 and i < numjoysticks - 1) { if (numjoysticks > 1 and i < numjoysticks - 1) {
t ~= "\n\n\n----------------------------------------\n\n\n"; t ~= "\n\n\n----------------------------------------\n\n\n";