Ver código fonte

fix when moving over element: check if we go out (currently no check for out->over on move)

ncannasse 11 anos atrás
pai
commit
9f601a0dc9
1 arquivos alterados com 10 adições e 0 exclusões
  1. 10 0
      h2d/Interactive.hx

+ 10 - 0
h2d/Interactive.hx

@@ -37,6 +37,16 @@ class Interactive extends Drawable {
 		}
 	}
 	
+	override function calcAbsPos() {
+		super.calcAbsPos();
+		// force a move event if we update the current over interactive
+		if( scene != null && scene.currentOver == this ) {
+			var stage = hxd.Stage.getInstance();
+			var e = new hxd.Event(EMove, stage.mouseX, stage.mouseY);
+			@:privateAccess scene.onEvent(e);
+		}
+	}
+	
 	override function onDelete() {
 		if( scene != null ) {
 			scene.removeEventTarget(this);