aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-04 20:22:59 +0200
committerEugene Sandulenko2019-10-04 20:22:59 +0200
commit94e543c5c8ec77a20261554d8c22af65bfc5ac0d (patch)
treee797aa30a89217b05570a5d58685bb6b71f1d988 /graphics/macgui
parentc5f3e126165815c67c2fba1f7c9cc0faa84a4384 (diff)
downloadscummvm-rg350-94e543c5c8ec77a20261554d8c22af65bfc5ac0d.tar.gz
scummvm-rg350-94e543c5c8ec77a20261554d8c22af65bfc5ac0d.tar.bz2
scummvm-rg350-94e543c5c8ec77a20261554d8c22af65bfc5ac0d.zip
GRAPHICS: MACGUI: Implement enforcing built-in fonts
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macfontmanager.h2
-rw-r--r--graphics/macgui/macwindowmanager.cpp8
-rw-r--r--graphics/macgui/macwindowmanager.h11
3 files changed, 16 insertions, 5 deletions
diff --git a/graphics/macgui/macfontmanager.h b/graphics/macgui/macfontmanager.h
index ddd928234b..62972026dc 100644
--- a/graphics/macgui/macfontmanager.h
+++ b/graphics/macgui/macfontmanager.h
@@ -134,6 +134,8 @@ public:
void registerFontMapping(uint16 id, Common::String name);
void clearFontMapping();
+ void forceBuiltinFonts() { _builtInFonts = true; }
+
private:
void loadFontsBDF();
void loadFonts();
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 57da02299a..65a5da5322 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -191,6 +191,14 @@ MacWindowManager::~MacWindowManager() {
g_system->getTimerManager()->removeTimerProc(&menuTimerHandler);
}
+void MacWindowManager::setMode(uint32 mode) {
+ _mode = mode;
+
+ if (mode & kWMModeForceBuiltinFonts)
+ _fontMan->forceBuiltinFonts();
+}
+
+
MacWindow *MacWindowManager::addWindow(bool scrollable, bool resizable, bool editable) {
MacWindow *w = new MacWindow(_lastId, scrollable, resizable, editable, this);
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index 97272d386f..967a5cde2f 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -57,10 +57,11 @@ enum {
};
enum {
- kWMModeNone = 0,
- kWMModeNoDesktop = (1 << 0),
- kWMModeAutohideMenu = (1 << 1),
- kWMModalMenuMode = (1 << 2)
+ kWMModeNone = 0,
+ kWMModeNoDesktop = (1 << 0),
+ kWMModeAutohideMenu = (1 << 1),
+ kWMModalMenuMode = (1 << 2),
+ kWMModeForceBuiltinFonts= (1 << 3)
};
}
@@ -211,7 +212,7 @@ public:
void pauseEngine(bool pause);
- void setMode(uint32 mode) { _mode = mode; }
+ void setMode(uint32 mode);
void setEnginePauseCallback(void *engine, void (*pauseCallback)(void *engine, bool pause));