mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
GUI: Widget: redraw when setAlign() called
This commit is contained in:
parent
60b763bd4c
commit
e55ec6c6ca
@ -263,9 +263,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…
x
Reference in New Issue
Block a user