[Scummvm-cvs-logs] SF.net SVN: scummvm:[49773] scummvm/trunk/graphics
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Jun 15 12:51:26 CEST 2010
Revision: 49773
http://scummvm.svn.sourceforge.net/scummvm/?rev=49773&view=rev
Author: sev
Date: 2010-06-15 10:51:26 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
GUI: Added default names for builtin fonts.
Modified Paths:
--------------
scummvm/trunk/graphics/fontman.cpp
scummvm/trunk/graphics/fontman.h
Modified: scummvm/trunk/graphics/fontman.cpp
===================================================================
--- scummvm/trunk/graphics/fontman.cpp 2010-06-15 10:51:10 UTC (rev 49772)
+++ scummvm/trunk/graphics/fontman.cpp 2010-06-15 10:51:26 UTC (rev 49773)
@@ -57,7 +57,19 @@
g_consolefont = 0;
}
+const char *builtinFontNames[] = {
+ "builtinOSD",
+ "builtinConsole",
+ "builtinGUI",
+ "builtinBigGUI",
+ 0
+};
+
const Font *FontManager::getFontByName(const Common::String &name) const {
+ for (int i = 0; builtinFontNames[i]; i++)
+ if (!strcmp(name.c_str(), builtinFontNames[i]))
+ return getFontByUsage((FontUsage)i);
+
if (!_fontMap.contains(name))
return 0;
return _fontMap[name];
Modified: scummvm/trunk/graphics/fontman.h
===================================================================
--- scummvm/trunk/graphics/fontman.h 2010-06-15 10:51:10 UTC (rev 49772)
+++ scummvm/trunk/graphics/fontman.h 2010-06-15 10:51:26 UTC (rev 49773)
@@ -38,10 +38,10 @@
class FontManager : public Common::Singleton<FontManager> {
public:
enum FontUsage {
- kOSDFont,
- kConsoleFont,
- kGUIFont,
- kBigGUIFont
+ kOSDFont = 0,
+ kConsoleFont = 1,
+ kGUIFont = 2,
+ kBigGUIFont = 3
};
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list