aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Prykhodko2018-07-29 21:16:44 +0300
committerAndrei Prykhodko2018-07-29 21:23:04 +0300
commit75eceedfa515c652d0698de11a9f605fe23c336d (patch)
treef56b56f5f54e72c803e5bd654a1c59eb0ba0f59d
parent841e0c11d82fe784b9153d0cb6fff3063969ca41 (diff)
downloadscummvm-rg350-75eceedfa515c652d0698de11a9f605fe23c336d.tar.gz
scummvm-rg350-75eceedfa515c652d0698de11a9f605fe23c336d.tar.bz2
scummvm-rg350-75eceedfa515c652d0698de11a9f605fe23c336d.zip
GRAPHICS: MACGUI: add additional arg to MacTextWindow's constructor to disable cursor handler
-rw-r--r--graphics/macgui/mactextwindow.cpp5
-rw-r--r--graphics/macgui/mactextwindow.h2
-rw-r--r--graphics/macgui/macwindowmanager.cpp4
-rw-r--r--graphics/macgui/macwindowmanager.h2
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.