mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 00:45:10 +00:00
Do not autoscale about dialog, rather let it scale itself properly
svn-id: r18061
This commit is contained in:
parent
79241d323f
commit
cccbb52e1e
@ -88,7 +88,15 @@ AboutDialog::AboutDialog()
|
||||
|
||||
int i;
|
||||
|
||||
_lineHeight = g_gui.getFontHeight() + 3;
|
||||
_w = g_system->getOverlayWidth() - 2 * 10;
|
||||
_h = g_system->getOverlayHeight() - 20 - 16;
|
||||
|
||||
if (_w < 450)
|
||||
_font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
|
||||
else
|
||||
_font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
|
||||
|
||||
_lineHeight = _font->getFontHeight() + 3;
|
||||
|
||||
for (i = 0; i < 1; i++)
|
||||
_lines.push_back("");
|
||||
@ -199,7 +207,7 @@ void AboutDialog::drawDialog() {
|
||||
while (*str && *str == ' ')
|
||||
str++;
|
||||
|
||||
g_gui.drawString(str, _x + kXOff, y, _w - 2 * kXOff, color, align);
|
||||
_font->drawString(&g_gui.getScreen(), str, _x + kXOff, y, _w - 2 * kXOff, color, align);
|
||||
y += _lineHeight;
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include "common/str.h"
|
||||
#include "graphics/surface.h"
|
||||
|
||||
namespace Graphics {
|
||||
class Font;
|
||||
}
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class AboutDialog : public Dialog {
|
||||
@ -37,6 +41,7 @@ protected:
|
||||
byte _modifiers;
|
||||
bool _willClose;
|
||||
Graphics::Surface _canvas;
|
||||
const Graphics::Font *_font;
|
||||
|
||||
public:
|
||||
AboutDialog();
|
||||
@ -49,6 +54,9 @@ public:
|
||||
void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
void handleKeyDown(uint16 ascii, int keycode, int modifiers);
|
||||
void handleKeyUp(uint16 ascii, int keycode, int modifiers);
|
||||
|
||||
// disable scaling
|
||||
bool wantsScaling() const { return false; }
|
||||
};
|
||||
|
||||
} // End of namespace GUI
|
||||
|
Loading…
x
Reference in New Issue
Block a user