Merge pull request #722 from Abde-/master
GUI: Redraw Widget when setAlign() called
This commit is contained in:
commit
b46bb55444
1 changed files with 11 additions and 3 deletions
|
@ -265,9 +265,17 @@ void StaticTextWidget::setLabel(const Common::String &label) {
|
|||
}
|
||||
|
||||
void StaticTextWidget::setAlign(Graphics::TextAlign align) {
|
||||
_align = align;
|
||||
// TODO: We should automatically redraw when the alignment is changed.
|
||||
// See setLabel() for more insights.
|
||||
if (_align != align){
|
||||
_align = align;
|
||||
|
||||
// same as setLabel() actually, the text
|
||||
// would be redrawn on top of the old one so
|
||||
// we add the CLEARBG flag
|
||||
setFlags(WIDGET_CLEARBG);
|
||||
draw();
|
||||
clearFlags(WIDGET_CLEARBG);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue