Virtual Keyboard: 'Ab'use the console font to get a font small enough to be usable on 320*240 virtual keyboards for display_area (GUI and BigGUI take up far too much space).

svn-id: r41300
This commit is contained in:
John Willis 2009-06-06 20:05:21 +00:00
parent 0989bb0b90
commit d89fbd5b75

View file

@ -116,11 +116,15 @@ void VirtualKeyboardGUI::setupDisplayArea(Rect& r, OverlayColor forecolor) {
_dispFont = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
if (!fontIsSuitable(_dispFont, r)) {
_dispFont = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
if (!fontIsSuitable(_dispFont, r)) {
/* FIXME: We 'ab'use the kConsoleFont to get a font that fits in a small display_area on 320*240 keyboard images */
_dispFont = FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont);
if (!fontIsSuitable(_dispFont, r)) {
_displayEnabled = false;
return;
}
}
}
_dispX = _kbdBound.left + r.left;
_dispY = _kbdBound.top + r.top + (r.height() - _dispFont->getFontHeight()) / 2;
_dispI = 0;