From 036fbdb18e38e54e138fd4a85669f1907dcc3bc8 Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 13 Jul 2005 10:57:27 +0000 Subject: [PATCH] make /sim/current-gui an integer --- src/GUI/new_gui.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 0e62c99c9..5b8295ec6 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -278,14 +278,14 @@ NewGUI::setStyle (void) //puSetDefaultStyle(); - string path = fgGetString("/sim/current-gui", "/sim/gui"); - string p; - - p = path + "/font"; - setupFont(fgGetNode(p.c_str(), true)); - - p = path + "/colors"; - SGPropertyNode *n = fgGetNode(p.c_str(), true); + int which = fgGetInt("/sim/current-gui", 0); + SGPropertyNode *sim = globals->get_props()->getNode("sim"); + SGPropertyNode *n = sim->getChild("gui", which); + if (!n) + n = sim->getChild("gui", 0, true); + + setupFont(n->getNode("font", true)); + n = n->getNode("colors", true); for (int i = 0; i < n->nChildren(); i++) { SGPropertyNode *child = n->getChild(i); -- 2.39.5