[Scummvm-cvs-logs] CVS: scummvm/gui about.cpp,1.31,1.32 about.h,1.11,1.12
Max Horn
fingolfin at users.sourceforge.net
Wed May 11 12:35:06 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui widget.h,1.40,1.41 widget.cpp,1.44,1.45 newgui.h,1.56,1.57 dialog.h,1.32,1.33 dialog.cpp,1.51,1.52
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.132,1.133
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2512
Modified Files:
about.cpp about.h
Log Message:
Do not autoscale about dialog, rather let it scale itself properly
Index: about.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- about.cpp 16 Apr 2005 16:56:16 -0000 1.31
+++ about.cpp 11 May 2005 19:31:23 -0000 1.32
@@ -88,7 +88,15 @@
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 @@
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;
}
Index: about.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- about.h 16 Apr 2005 13:09:34 -0000 1.11
+++ about.h 11 May 2005 19:31:23 -0000 1.12
@@ -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 @@
byte _modifiers;
bool _willClose;
Graphics::Surface _canvas;
+ const Graphics::Font *_font;
public:
AboutDialog();
@@ -49,6 +54,9 @@
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
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui widget.h,1.40,1.41 widget.cpp,1.44,1.45 newgui.h,1.56,1.57 dialog.h,1.32,1.33 dialog.cpp,1.51,1.52
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.132,1.133
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list