[Scummvm-git-logs] scummvm master -> 0c3e0d01f281bb0cbf23bd100ca355246398197f

sev- sev at scummvm.org
Sat May 23 14:29:59 UTC 2020


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
72bff491e4 DIRECTOR: Mark the score window as not editable
bad0e9e169 GRAPHICS: MACGUI: Properly take into account active widget for cursor selection
0c3e0d01f2 DIRECTOR: Stop execution for fewframesonly for Lingo-initated updates


Commit: 72bff491e4f0af64e2f06a535ac7556cd8ebe0db
    https://github.com/scummvm/scummvm/commit/72bff491e4f0af64e2f06a535ac7556cd8ebe0db
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-23T16:29:21+02:00

Commit Message:
DIRECTOR: Mark the score window as not editable

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 290e420630..e6c46305b9 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1535,7 +1535,7 @@ void Score::startLoop() {
 
 	initGraphics(_movieRect.width(), _movieRect.height());
 
-	_window = _vm->_wm->addWindow(false, false, true);
+	_window = _vm->_wm->addWindow(false, false, false);
 	_window->disableBorder();
 	_window->resize(_movieRect.width(), _movieRect.height());
 


Commit: bad0e9e1695449632d25fa781a415a3d2b6f1477
    https://github.com/scummvm/scummvm/commit/bad0e9e1695449632d25fa781a415a3d2b6f1477
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-23T16:29:21+02:00

Commit Message:
GRAPHICS: MACGUI: Properly take into account active widget for cursor selection

Changed paths:
    graphics/macgui/maceditabletext.h
    graphics/macgui/macwidget.cpp
    graphics/macgui/macwidget.h
    graphics/macgui/macwindow.cpp
    graphics/macgui/macwindowmanager.cpp


diff --git a/graphics/macgui/maceditabletext.h b/graphics/macgui/maceditabletext.h
index f39e7d6768..cdde33620c 100644
--- a/graphics/macgui/maceditabletext.h
+++ b/graphics/macgui/maceditabletext.h
@@ -106,7 +106,6 @@ public:
 	bool _cursorDirty;
 	Common::Rect *_cursorRect;
 	bool _cursorOff;
-	bool _editable;
 	bool _selectable;
 
 	int _scrollPos;
diff --git a/graphics/macgui/macwidget.cpp b/graphics/macgui/macwidget.cpp
index 873e4feaf5..051c45839d 100644
--- a/graphics/macgui/macwidget.cpp
+++ b/graphics/macgui/macwidget.cpp
@@ -41,6 +41,7 @@ MacWidget::MacWidget(MacWidget *parent, int x, int y, int w, int h, bool focusab
 	_composeSurface = nullptr;
 
 	_active = false;
+	_editable = false;
 }
 
 MacWidget::~MacWidget() {
diff --git a/graphics/macgui/macwidget.h b/graphics/macgui/macwidget.h
index 2310d8cabc..e919568be0 100644
--- a/graphics/macgui/macwidget.h
+++ b/graphics/macgui/macwidget.h
@@ -68,6 +68,7 @@ public:
 	virtual void blit(ManagedSurface *g, Common::Rect &dest) = 0;
 	virtual bool processEvent(Common::Event &event) = 0;
 	virtual bool hasAllFocus() { return _active; }
+	virtual bool isEditable() { return _editable; }
 
 	virtual void setDimensions(const Common::Rect &r) {
 		_dims = r;
@@ -84,6 +85,7 @@ protected:
 	bool _focusable;
 	bool _contentIsDirty;
 	bool _active;
+	bool _editable;
 
 	Common::Rect _dims;
 
diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp
index 823159b2e9..f9913a9bc8 100644
--- a/graphics/macgui/macwindow.cpp
+++ b/graphics/macgui/macwindow.cpp
@@ -547,7 +547,7 @@ bool MacWindow::processEvent(Common::Event &event) {
 		break;
 
 	case Common::EVENT_KEYDOWN:
-		if (!_editable)
+		if (!_editable && !(_wm->getActiveWidget() && _wm->getActiveWidget()->isEditable()))
 			return false;
 
 		if (_wm->getActiveWidget())
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 1ef7dc0ba0..bc5643a16c 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -434,8 +434,9 @@ bool MacWindowManager::processEvent(Common::Event &event) {
 		return true;
 
 	if (_activeWindow != -1) {
-		if (_windows[_activeWindow]->isEditable() && _windows[_activeWindow]->getType() == kWindowWindow &&
-				((MacWindow *)_windows[_activeWindow])->getInnerDimensions().contains(event.mouse.x, event.mouse.y)) {
+		if ((_windows[_activeWindow]->isEditable() && _windows[_activeWindow]->getType() == kWindowWindow &&
+				((MacWindow *)_windows[_activeWindow])->getInnerDimensions().contains(event.mouse.x, event.mouse.y))
+				|| (_activeWidget && _activeWidget->isEditable())) {
 			if (_cursorIsArrow) {
 				CursorMan.replaceCursor(macCursorBeam, 11, 16, 3, 8, 3);
 				_cursorIsArrow = false;
@@ -453,7 +454,8 @@ bool MacWindowManager::processEvent(Common::Event &event) {
 		BaseMacWindow *w = *it;
 
 		if (w->hasAllFocus() || (w->isEditable() && event.type == Common::EVENT_KEYDOWN) ||
-				w->getDimensions().contains(event.mouse.x, event.mouse.y)) {
+				w->getDimensions().contains(event.mouse.x, event.mouse.y)
+				|| (_activeWidget && _activeWidget->isEditable())) {
 			if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_LBUTTONUP)
 				setActiveWindow(w->getId());
 


Commit: 0c3e0d01f281bb0cbf23bd100ca355246398197f
    https://github.com/scummvm/scummvm/commit/0c3e0d01f281bb0cbf23bd100ca355246398197f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-23T16:29:21+02:00

Commit Message:
DIRECTOR: Stop execution for fewframesonly for Lingo-initated updates

Changed paths:
    engines/director/lingo/lingo-builtins.cpp
    engines/director/score.cpp


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index e72924e119..8b6751342a 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -1820,8 +1820,14 @@ void LB::b_updateStage(int nargs) {
 	score->renderFrame(score->getCurrentFrame(), false, true);
 	g_director->processEvents(true);
 
-	if (debugChannelSet(-1, kDebugFewFramesOnly))
+	if (debugChannelSet(-1, kDebugFewFramesOnly)) {
 		score->_framesRan++;
+
+		if (score->_framesRan > 9) {
+			warning("b_updateStage(): exiting due to debug few frames only");
+			score->_stopPlay = true;
+		}
+	}
 }
 
 
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index e6c46305b9..efdc416327 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1594,12 +1594,13 @@ void Score::startLoop() {
 		if (_currentFrame < _frames.size())
 			_vm->processEvents();
 
-		if (debugChannelSet(-1, kDebugFewFramesOnly))
+		if (debugChannelSet(-1, kDebugFewFramesOnly)) {
 			_framesRan++;
 
-		if (debugChannelSet(-1, kDebugFewFramesOnly) && _framesRan > 9) {
-			warning("Score::startLoop(): exiting due to debug few frames only");
-			break;
+			if (_framesRan > 9) {
+				warning("Score::startLoop(): exiting due to debug few frames only");
+				break;
+			}
 		}
 	}
 




More information about the Scummvm-git-logs mailing list