summaryrefslogtreecommitdiffstats
path: root/gui/listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/listbox.cpp')
-rw-r--r--gui/listbox.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index 3af40ed5b..a4976f4e1 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -191,12 +191,12 @@ GUIListBox::GUIListBox(xml_node<>* node)
attr = child->first_attribute("highlightcolor");
memset(&mFontHighlightColor, 0, sizeof(COLOR));
- if (attr)
- {
- std::string color = attr->value();
+ if (attr)
+ {
+ std::string color = attr->value();
ConvertStrToColor(color, &mFontHighlightColor);
hasFontHighlightColor = true;
- }
+ }
}
// Load the separator if it exists
@@ -323,15 +323,15 @@ GUIListBox::GUIListBox(xml_node<>* node)
// Get the data for the list
child = node->first_node("listitem");
- if (!child) return;
+ if (!child) return;
while (child)
- {
- ListData data;
+ {
+ ListData data;
attr = child->first_attribute("name");
- if (!attr) return;
- data.displayName = attr->value();
+ if (!attr) return;
+ data.displayName = attr->value();
data.variableValue = child->value();
if (child->value() == currentValue) {
@@ -340,10 +340,10 @@ GUIListBox::GUIListBox(xml_node<>* node)
data.selected = 0;
}
- mList.push_back(data);
+ mList.push_back(data);
- child = child->next_sibling("listitem");
- }
+ child = child->next_sibling("listitem");
+ }
}
GUIListBox::~GUIListBox()
@@ -430,21 +430,21 @@ int GUIListBox::Render(void)
}
if (mList.at(line + mStart).selected != 0)
- {
- icon = mIconSelected;
+ {
+ icon = mIconSelected;
currentIconHeight = mSelectedIconHeight;
currentIconWidth = mSelectedIconWidth;
currentIconOffsetY = SelectedIconOffsetY;
currentIconOffsetX = SelectedIconOffsetX;
- }
- else
- {
- icon = mIconUnselected;
+ }
+ else
+ {
+ icon = mIconUnselected;
currentIconHeight = mSelectedIconHeight;
currentIconWidth = mSelectedIconWidth;
currentIconOffsetY = SelectedIconOffsetY;
currentIconOffsetX = SelectedIconOffsetX;
- }
+ }
if (icon && icon->GetResource())
{
@@ -758,8 +758,8 @@ int GUIListBox::NotifyVarChange(std::string varName, std::string value)
}
}
if (varName == mVariable)
- {
- int i, listSize = mList.size(), selected_index = 0;
+ {
+ int i, listSize = mList.size(), selected_index = 0;
currentValue = value;
@@ -783,8 +783,8 @@ int GUIListBox::NotifyVarChange(std::string varName, std::string value)
}
mUpdate = 1;
- return 0;
- }
+ return 0;
+ }
return 0;
}