mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
Center button label vertically, too (possible now that the GUI scaling is off)
svn-id: r18117
This commit is contained in:
parent
ac215285d7
commit
8c3085eb2b
@ -169,11 +169,8 @@ void ButtonWidget::handleMouseUp(int x, int y, int button, int clickCount) {
|
||||
|
||||
void ButtonWidget::drawWidget(bool hilite) {
|
||||
NewGui *gui = &g_gui;
|
||||
// HACK: Subtracting 1 from _y isn't very nice when we don't know
|
||||
// anything about the size of the font. But we can't use the size of
|
||||
// the font either, because we don't know how the coordinates will be
|
||||
// scaled.
|
||||
gui->drawString(_font, _label, _x, _y - 1, _w,
|
||||
const int off = (_h - _font->getFontHeight()) / 2;
|
||||
gui->drawString(_font, _label, _x, _y + off, _w,
|
||||
!isEnabled() ? gui->_color :
|
||||
hilite ? gui->_textcolorhi : gui->_textcolor, _align);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user