summaryrefslogtreecommitdiffstats
path: root/gui/console.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-03-11 17:17:15 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-03-13 00:41:34 +0100
commit591b9205365e6bc1cefece2e0a05f29b9cddee32 (patch)
tree23f9902b89fd368efe0fd5e661426c4bac6cb06c /gui/console.cpp
parentHandle sdk version 22 as lollipop (diff)
downloadandroid_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.gz
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.bz2
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.lz
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.xz
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.zst
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.zip
Diffstat (limited to 'gui/console.cpp')
-rw-r--r--gui/console.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index b1b025c48..1544d77a1 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -130,7 +130,7 @@ GUIConsole::GUIConsole(xml_node<>* node) : GUIScrollList(node)
{
mSlideout = 1;
mSlideoutState = hidden;
- LoadPlacement(child, &mSlideoutX, &mSlideoutY);
+ LoadPlacement(child, &mSlideoutX, &mSlideoutY, &mSlideoutW, &mSlideoutH, &mPlacement);
mSlideoutImage = LoadAttrImage(child, "resource");
@@ -138,6 +138,12 @@ GUIConsole::GUIConsole(xml_node<>* node) : GUIScrollList(node)
{
mSlideoutW = mSlideoutImage->GetWidth();
mSlideoutH = mSlideoutImage->GetHeight();
+ if (mPlacement == CENTER || mPlacement == CENTER_X_ONLY) {
+ mSlideoutX = mSlideoutX - (mSlideoutW / 2);
+ if (mPlacement == CENTER) {
+ mSlideoutY = mSlideoutY - (mSlideoutH / 2);
+ }
+ }
}
}
}