summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-08-05 16:20:30 +0200
committerDees Troy <dees_troy@teamw.in>2014-08-07 15:37:01 +0200
commit96acb3d14d42931a5157ff283d74a60cdb62c685 (patch)
tree1bb9cb75ba80b6cfc668d0e6dd40348cfda31131 /gui
parentStop memory management on blanking overlay graphics (diff)
downloadandroid_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.tar
android_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.tar.gz
android_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.tar.bz2
android_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.tar.lz
android_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.tar.xz
android_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.tar.zst
android_bootable_recovery-96acb3d14d42931a5157ff283d74a60cdb62c685.zip
Diffstat (limited to '')
-rw-r--r--gui/devices/800x1280/res/ui.xml35
-rw-r--r--gui/pages.cpp27
2 files changed, 44 insertions, 18 deletions
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
index 328b31f69..b074931b6 100644
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -58,24 +58,25 @@
<variable name="row4_y" value="905" />
<variable name="row_queue_y" value="710" />
<variable name="row1_header_y" value="131" />
+ <variable name="text_row_height" value="50" />
<variable name="row1_text_y" value="170" />
- <variable name="row2_text_y" value="220" />
- <variable name="row3_text_y" value="270" />
- <variable name="row4_text_y" value="320" />
- <variable name="row5_text_y" value="370" />
- <variable name="row6_text_y" value="420" />
- <variable name="row7_text_y" value="470" />
- <variable name="row8_text_y" value="520" />
- <variable name="row9_text_y" value="570" />
- <variable name="row10_text_y" value="620" />
- <variable name="row11_text_y" value="670" />
- <variable name="row12_text_y" value="720" />
- <variable name="row13_text_y" value="770" />
- <variable name="row14_text_y" value="820" />
- <variable name="row15_text_y" value="870" />
- <variable name="row16_text_y" value="920" />
- <variable name="row17_text_y" value="970" />
- <variable name="row18_text_y" value="1020" />
+ <variable name="row2_text_y" value="%row1_text_y%+%text_row_height%" />
+ <variable name="row3_text_y" value="%row2_text_y%+%text_row_height%" />
+ <variable name="row4_text_y" value="%row3_text_y%+%text_row_height%" />
+ <variable name="row5_text_y" value="%row4_text_y%+%text_row_height%" />
+ <variable name="row6_text_y" value="%row5_text_y%+%text_row_height%" />
+ <variable name="row7_text_y" value="%row6_text_y%+%text_row_height%" />
+ <variable name="row8_text_y" value="%row7_text_y%+%text_row_height%" />
+ <variable name="row9_text_y" value="%row8_text_y%+%text_row_height%" />
+ <variable name="row10_text_y" value="%row9_text_y%+%text_row_height%" />
+ <variable name="row11_text_y" value="%row10_text_y%+%text_row_height%" />
+ <variable name="row12_text_y" value="%row11_text_y%+%text_row_height%" />
+ <variable name="row13_text_y" value="%row12_text_y%+%text_row_height%" />
+ <variable name="row14_text_y" value="%row13_text_y%+%text_row_height%" />
+ <variable name="row15_text_y" value="%row14_text_y%+%text_row_height%" />
+ <variable name="row16_text_y" value="%row15_text_y%+%text_row_height%" />
+ <variable name="row17_text_y" value="%row16_text_y%+%text_row_height%" />
+ <variable name="row18_text_y" value="%row17_text_y%+%text_row_height%" />
<variable name="zip_status_y" value="640" />
<variable name="tz_selected_y" value="160" />
<variable name="tz_set_y" value="955" />
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 1bc15c6cd..72ffda3d5 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -783,7 +783,32 @@ int PageSet::LoadVariables(xml_node<>* vars)
if(name && value)
{
p = persist ? atoi(persist->value()) : 0;
- DataManager::SetValue(name->value(), value->value(), p);
+ string temp = value->value();
+ string valstr = gui_parse_text(temp);
+
+ if (valstr.find("+") != string::npos) {
+ string val1str = valstr;
+ val1str = val1str.substr(0, val1str.find('+'));
+ string val2str = valstr;
+ val2str = val2str.substr(val2str.find('+') + 1, string::npos);
+ int val1 = atoi(val1str.c_str());
+ int val2 = atoi(val2str.c_str());
+ int val = val1 + val2;
+
+ DataManager::SetValue(name->value(), val, p);
+ } else if (valstr.find("-") != string::npos) {
+ string val1str = valstr;
+ val1str = val1str.substr(0, val1str.find('-'));
+ string val2str = valstr;
+ val2str = val2str.substr(val2str.find('-') + 1, string::npos);
+ int val1 = atoi(val1str.c_str());
+ int val2 = atoi(val2str.c_str());
+ int val = val1 - val2;
+
+ DataManager::SetValue(name->value(), val, p);
+ } else {
+ DataManager::SetValue(name->value(), valstr, p);
+ }
}
child = child->next_sibling("variable");