Skip to content

Commit

Permalink
Merge pull request #49 from Shallowmallow/mouseOverflag
Browse files Browse the repository at this point in the history
checking if mouseOverFlag exists && adding event.cancled
  • Loading branch information
ianharrigan authored Aug 8, 2024
2 parents 96af141 + 9b2a164 commit f2ea589
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion haxe/ui/backend/ComponentImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -873,14 +873,15 @@ class ComponentImpl extends ComponentBase {

var i = inBounds(x, y);
if (i == true) {
if (hasComponentOver(cast this, x, y) == true) {
if (_mouseOverFlag && hasComponentOver(cast this, x, y) == true) {
_mouseOverFlag = false;
var fn:UIEvent->Void = _eventMap.get(haxe.ui.events.MouseEvent.MOUSE_OUT);
if (fn != null) {
var mouseEvent = new haxe.ui.events.MouseEvent(haxe.ui.events.MouseEvent.MOUSE_OUT);
mouseEvent.screenX = x;
mouseEvent.screenY = y;
fn(mouseEvent);
event.canceled = mouseEvent.canceled;
}
return;
}
Expand Down

0 comments on commit f2ea589

Please sign in to comment.