GUI: Support styles in xml to reduce xml file size
Also allow sliders to have their own text label instead of
requiring a whole separate text object for the label in the xml.
Change-Id: I6e314efb4bb454d496555ff7e003d743063a1308
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index 7c7afa9..625b4b7 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -37,7 +37,7 @@
mUpdate = 0;
// Get the icons, if any
- child = node->first_node("icon");
+ child = FindNode(node, "icon");
if (child) {
mIconSelected = LoadAttrImage(child, "selected");
mIconUnselected = LoadAttrImage(child, "unselected");
@@ -47,7 +47,7 @@
SetMaxIconSize(iconWidth, iconHeight);
// Handle the result variable
- child = node->first_node("data");
+ child = FindNode(node, "data");
if (child) {
attr = child->first_attribute("name");
if (attr)
@@ -60,7 +60,7 @@
}
// Get the data for the list
- child = node->first_node("listitem");
+ child = FindNode(node, "listitem");
if (!child) return;
while (child) {
ListData data;