summaryrefslogtreecommitdiffstats
path: root/gui/listbox.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2013-07-25 22:53:02 +0200
committerGerrit Code Review <gerrit@198.50.184.117>2013-08-24 14:56:48 +0200
commitfafb0c541bb4b24515c57251a44d87825eec90fb (patch)
tree9cddb55ceef8912c8fafe618c98147ff6df19ef6 /gui/listbox.cpp
parentClean-up in partitions.hpp (diff)
downloadandroid_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.gz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.bz2
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.lz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.xz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.zst
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.zip
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;
}