diff options
Diffstat (limited to '')
-rw-r--r-- | gui/slider.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/slider.cpp b/gui/slider.cpp index 2fd114d88..a3884474b 100644 --- a/gui/slider.cpp +++ b/gui/slider.cpp @@ -68,6 +68,12 @@ GUISlider::GUISlider(xml_node<>* node) : GUIObject(node) mRenderW = sSlider->GetWidth(); mRenderH = sSlider->GetHeight(); + if (TextPlacement == CENTER || TextPlacement == CENTER_X_ONLY) { + mRenderX = mRenderX - (mRenderW / 2); + if (TextPlacement == CENTER) { + mRenderY = mRenderY - (mRenderH / 2); + } + } if (sSliderLabel) { int sTextX = mRenderX + (mRenderW / 2); int w, h; |