mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
WINTERMUTE: add UIButton::setTextAlign
This commit is contained in:
parent
417bf3db02
commit
2a977dec8c
@ -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());
|
||||
|
@ -1226,4 +1226,10 @@ void UIButton::putImagePress(BaseSprite *sprite) {
|
||||
_imagePress = sprite;
|
||||
}
|
||||
|
||||
void UIButton::setTextAlign(TTextAlign align) {
|
||||
_align = align;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // End of namespace Wintermute
|
||||
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user