aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTobia Tesan2013-09-20 17:52:25 +0200
committerTobia Tesan2013-09-21 23:22:43 +0200
commit2a977dec8c180c297c000b3c09b068f76344c313 (patch)
treebe6f2d5e99b7d732bc63b74a27455a95ecde44e7 /engines
parent417bf3db02ec3af8184d3de7d4ed87181342367f (diff)
downloadscummvm-rg350-2a977dec8c180c297c000b3c09b068f76344c313.tar.gz
scummvm-rg350-2a977dec8c180c297c000b3c09b068f76344c313.tar.bz2
scummvm-rg350-2a977dec8c180c297c000b3c09b068f76344c313.zip
WINTERMUTE: add UIButton::setTextAlign
Diffstat (limited to 'engines')
-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;
};