summaryrefslogtreecommitdiffstats
path: root/gui/listbox.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-28 18:44:49 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-12-19 15:31:01 +0100
commit74db157b9406594a549a70415668dd6cbe17d1d3 (patch)
treed47451181a77cc1b03a55d63d49a9fecc98eb044 /gui/listbox.cpp
parentgui: stock theme rework (diff)
downloadandroid_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.gz
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.bz2
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.lz
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.xz
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.tar.zst
android_bootable_recovery-74db157b9406594a549a70415668dd6cbe17d1d3.zip
Diffstat (limited to 'gui/listbox.cpp')
-rw-r--r--gui/listbox.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index d2973bb6e..eeddff954 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -26,6 +26,9 @@ extern "C" {
#include "rapidxml.hpp"
#include "objects.hpp"
#include "../data.hpp"
+#include "pages.hpp"
+
+extern std::vector<language_struct> Language_List;
GUIListBox::GUIListBox(xml_node<>* node) : GUIScrollList(node)
{
@@ -56,6 +59,21 @@ GUIListBox::GUIListBox(xml_node<>* node) : GUIScrollList(node)
DataManager::SetValue(mVariable, attr->value());
// Get the currently selected value for the list
DataManager::GetValue(mVariable, currentValue);
+ if (mVariable == "tw_language") {
+ std::vector<language_struct>::iterator iter;
+ for (iter = Language_List.begin(); iter != Language_List.end(); iter++) {
+ ListItem data;
+ data.displayName = (*iter).displayvalue;
+ data.variableValue = (*iter).filename;
+ data.action = NULL;
+ if (currentValue == (*iter).filename) {
+ data.selected = 1;
+ DataManager::SetValue("tw_language_display", (*iter).displayvalue);
+ } else
+ data.selected = 0;
+ mListItems.push_back(data);
+ }
+ }
}
else
allowSelection = false; // allows using listbox as a read-only list or menu