Skip to content

Commit

Permalink
Event Pass Through Fixes
Browse files Browse the repository at this point in the history
This fixes a few problems with event pass through.
  • Loading branch information
greenfire27 committed Feb 27, 2024
1 parent e329e35 commit 6a7798a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/source/2d/gui/SceneWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ bool SceneWindow::sendWindowInputEvent( StringTableEntry name, const GuiEvent& e
dSprintf(argBuffer[2], 64, "%d", event.mouseClickCount);

// Call Scripts.
consumed = Con::executef(this, 4, name, argBuffer[0], argBuffer[1], argBuffer[2]);
consumed = dAtob(Con::executef(this, 4, name, argBuffer[0], argBuffer[1], argBuffer[2]));

// Iterate listeners.
for( SimSet::iterator listenerItr = mInputListeners.begin(); listenerItr != mInputListeners.end(); ++listenerItr )
Expand Down
12 changes: 10 additions & 2 deletions engine/source/gui/guiCanvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,11 @@ void GuiCanvas::rootMouseUp(const GuiEvent &event)
mMouseCapturedControl->onTouchUp(event);
else
{
handleTouchUp(event, event.mousePoint);
findMouseControl(event);
if (bool(mMouseControl))
{
handleTouchUp(event, event.mousePoint);
}
}
}

Expand Down Expand Up @@ -850,7 +854,11 @@ void GuiCanvas::rootMouseMove(const GuiEvent &event)
}
else
{
handleTouchMove(event, event.mousePoint);
findMouseControl(event);
if (bool(mMouseControl))
{
handleTouchMove(event, event.mousePoint);
}
}
}

Expand Down

0 comments on commit 6a7798a

Please sign in to comment.