diff options
-rw-r--r-- | graphics/macgui/mactextwindow.cpp | 5 | ||||
-rw-r--r-- | graphics/macgui/mactextwindow.h | 2 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 4 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index 553592382d..8aabaed125 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -43,7 +43,7 @@ enum { static void cursorTimerHandler(void *refCon); -MacTextWindow::MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu) : +MacTextWindow::MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu, bool cursorHandler) : MacWindow(wm->getLastId(), true, true, true, wm) { _font = font; @@ -72,7 +72,8 @@ MacTextWindow::MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgco _cursorSurface = new ManagedSurface(1, kCursorHeight); _cursorSurface->fillRect(*_cursorRect, _wm->_colorBlack); - g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "textWindowCursor"); + if (cursorHandler) + g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "textWindowCursor"); } void MacTextWindow::resize(int w, int h) { diff --git a/graphics/macgui/mactextwindow.h b/graphics/macgui/mactextwindow.h index 5791da3496..942fdd4fab 100644 --- a/graphics/macgui/mactextwindow.h +++ b/graphics/macgui/mactextwindow.h @@ -48,7 +48,7 @@ struct SelectedText { class MacTextWindow : public MacWindow { public: - MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu); + MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu, bool cursorHandler = true); virtual ~MacTextWindow(); virtual void resize(int w, int h); diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index e37332c814..57da02299a 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -201,8 +201,8 @@ MacWindow *MacWindowManager::addWindow(bool scrollable, bool resizable, bool edi return w; } -MacTextWindow *MacWindowManager::addTextWindow(const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu) { - MacTextWindow *w = new MacTextWindow(this, font, fgcolor, bgcolor, maxWidth, textAlignment, menu); +MacTextWindow *MacWindowManager::addTextWindow(const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu, bool cursorHandler) { + MacTextWindow *w = new MacTextWindow(this, font, fgcolor, bgcolor, maxWidth, textAlignment, menu, cursorHandler); addWindowInitialized(w); diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index 0a8a5a4b33..97272d386f 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -115,7 +115,7 @@ public: * @return Pointer to the newly created window. */ MacWindow *addWindow(bool scrollable, bool resizable, bool editable); - MacTextWindow *addTextWindow(const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu); + MacTextWindow *addTextWindow(const MacFont *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment, MacMenu *menu, bool cursorHandler = true); /** * Adds a window that has already been initialized to the registry. |