summaryrefslogtreecommitdiffstats
path: root/gui/slidervalue.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-04-16 20:43:36 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-06-04 16:13:37 +0200
commitfb1c4ffaafae4843c7edb302351b7df48e02a990 (patch)
tree284a58b5a5b9d827e409bd169a06c2a146a662be /gui/slidervalue.cpp
parentAdd options to repair or change file system (diff)
downloadandroid_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.gz
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.bz2
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.lz
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.xz
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.zst
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.zip
Diffstat (limited to '')
-rw-r--r--gui/slidervalue.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/gui/slidervalue.cpp b/gui/slidervalue.cpp
index 972d1f728..c3ef69eac 100644
--- a/gui/slidervalue.cpp
+++ b/gui/slidervalue.cpp
@@ -126,8 +126,10 @@ GUISliderValue::GUISliderValue(xml_node<>* node) : GUIObject(node)
string parsevalue = gui_parse_text(attr->value());
int def = atoi(parsevalue.c_str());
- if (def < mMin) def = mMin;
- else if (def > mMax) def = mMax;
+ if (def < mMin)
+ def = mMin;
+ else if (def > mMax)
+ def = mMax;
DataManager::SetValue(mVariable, def);
}
@@ -324,8 +326,10 @@ int GUISliderValue::Render(void)
int GUISliderValue::Update(void)
{
- if (!isConditionTrue()) return mRendered ? 2 : 0;
- if (!mRendered) return 2;
+ if (!isConditionTrue())
+ return mRendered ? 2 : 0;
+ if (!mRendered)
+ return 2;
if(mLabel)
return mLabel->Update();
@@ -345,7 +349,8 @@ float GUISliderValue::pctFromValue(int value)
int GUISliderValue::NotifyTouch(TOUCH_STATE state, int x, int y)
{
- if (!isConditionTrue()) return -1;
+ if (!isConditionTrue())
+ return -1;
static bool dragging = false;
switch (state)