make /sim/current-gui an integer
This commit is contained in:
parent
591001a24e
commit
036fbdb18e
1 changed files with 7 additions and 7 deletions
|
@ -278,14 +278,14 @@ NewGUI::setStyle (void)
|
||||||
|
|
||||||
//puSetDefaultStyle();
|
//puSetDefaultStyle();
|
||||||
|
|
||||||
string path = fgGetString("/sim/current-gui", "/sim/gui");
|
int which = fgGetInt("/sim/current-gui", 0);
|
||||||
string p;
|
SGPropertyNode *sim = globals->get_props()->getNode("sim");
|
||||||
|
SGPropertyNode *n = sim->getChild("gui", which);
|
||||||
|
if (!n)
|
||||||
|
n = sim->getChild("gui", 0, true);
|
||||||
|
|
||||||
p = path + "/font";
|
setupFont(n->getNode("font", true));
|
||||||
setupFont(fgGetNode(p.c_str(), true));
|
n = n->getNode("colors", true);
|
||||||
|
|
||||||
p = path + "/colors";
|
|
||||||
SGPropertyNode *n = fgGetNode(p.c_str(), true);
|
|
||||||
|
|
||||||
for (int i = 0; i < n->nChildren(); i++) {
|
for (int i = 0; i < n->nChildren(); i++) {
|
||||||
SGPropertyNode *child = n->getChild(i);
|
SGPropertyNode *child = n->getChild(i);
|
||||||
|
|
Loading…
Add table
Reference in a new issue