aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/wintermute/ad/ad_response_box.cpp2
-rw-r--r--engines/wintermute/ui/ui_button.cpp6
-rw-r--r--engines/wintermute/ui/ui_button.h6
3 files changed, 11 insertions, 3 deletions
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp
index 8454f213b7..267a207eaa 100644
--- a/engines/wintermute/ad/ad_response_box.cpp
+++ b/engines/wintermute/ad/ad_response_box.cpp
@@ -171,7 +171,7 @@ bool AdResponseBox::createButtons() {
}
btn->putFontHover((_fontHover == nullptr) ? _gameRef->getSystemFont() : _fontHover);
btn->putFontPress(btn->getFontHover());
- btn->_align = _align;
+ btn->setTextAlign(_align);
if (_gameRef->_touchInterface) {
btn->putFontHover(btn->getFont());
diff --git a/engines/wintermute/ui/ui_button.cpp b/engines/wintermute/ui/ui_button.cpp
index 1d266740a1..a299603b25 100644
--- a/engines/wintermute/ui/ui_button.cpp
+++ b/engines/wintermute/ui/ui_button.cpp
@@ -1226,4 +1226,10 @@ void UIButton::putImagePress(BaseSprite *sprite) {
_imagePress = sprite;
}
+void UIButton::setTextAlign(TTextAlign align) {
+ _align = align;
+}
+
+
+
} // End of namespace Wintermute
diff --git a/engines/wintermute/ui/ui_button.h b/engines/wintermute/ui/ui_button.h
index bf2144f18e..ea41435a6b 100644
--- a/engines/wintermute/ui/ui_button.h
+++ b/engines/wintermute/ui/ui_button.h
@@ -38,7 +38,6 @@ namespace Wintermute {
class UIButton : public UIObject {
public:
- uint32 _oneTimePressTime;
DECLARE_PERSISTENT(UIButton, UIObject)
void press();
virtual bool display() { return display(0, 0); }
@@ -58,12 +57,13 @@ public:
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
virtual const char *scToString() override;
- TTextAlign _align;
void putFontHover(BaseFont *font);
BaseFont *getFontHover();
void putFontPress(BaseFont *font);
+ void setTextAlign(TTextAlign align);
+
void putImageHover(BaseSprite *sprite);
void putImagePress(BaseSprite *sprite);
@@ -86,6 +86,8 @@ private:
BaseSprite *_imagePress;
BaseSprite *_imageDisable;
BaseSprite *_imageFocus;
+ uint32 _oneTimePressTime;
+ TTextAlign _align;
};