summaryrefslogtreecommitdiffstats
path: root/gui/console.cpp
diff options
context:
space:
mode:
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);
+ }
+ }
}
}
}