removed breaking changes

This commit is contained in:
ShaharMS
2022-09-18 09:18:44 +03:00
parent 716c90eef1
commit 4421d2daf0
3 changed files with 14 additions and 7 deletions

View File

@@ -336,18 +336,21 @@ class NativeApplication
switch (mouseEventInfo.type)
{
case MOUSE_DOWN:
window.onMouseDown.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button, mouseEventInfo.clickCount);
window.onMouseDown.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
window.clickCount = mouseEventInfo.clickCount;
case MOUSE_UP:
window.onMouseUp.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button, mouseEventInfo.clickCount);
window.onMouseUp.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
window.clickCount = mouseEventInfo.clickCount;
case MOUSE_MOVE:
window.onMouseMove.dispatch(mouseEventInfo.x, mouseEventInfo.y);
window.onMouseMoveRelative.dispatch(mouseEventInfo.movementX, mouseEventInfo.movementY);
window.clickCount = mouseEventInfo.clickCount;
case MOUSE_WHEEL:
window.onMouseWheel.dispatch(mouseEventInfo.x, mouseEventInfo.y, UNKNOWN);
window.clickCount = mouseEventInfo.clickCount;
default:
}
}

View File

@@ -260,7 +260,7 @@ class Application extends Module
@param y The current y coordinate of the mouse
@param button The ID of the mouse button that was pressed
**/
public function onMouseDown(x:Float, y:Float, button:MouseButton, clickCount:Int):Void {}
public function onMouseDown(x:Float, y:Float, button:MouseButton):Void {}
/**
Called when a mouse move event is fired on the primary window
@@ -282,7 +282,7 @@ class Application extends Module
@param y The current y coordinate of the mouse
@param button The ID of the button that was released
**/
public function onMouseUp(x:Float, y:Float, button:MouseButton, clickCount:Int):Void {}
public function onMouseUp(x:Float, y:Float, button:MouseButton):Void {}
/**
Called when a mouse wheel event is fired on the primary window

View File

@@ -67,10 +67,10 @@ class Window
public var onLeave(default, null) = new Event<Void->Void>();
public var onMaximize(default, null) = new Event<Void->Void>();
public var onMinimize(default, null) = new Event<Void->Void>();
public var onMouseDown(default, null) = new Event<Float->Float->MouseButton->Int->Void>();
public var onMouseDown(default, null) = new Event<Float->Float->MouseButton->Void>();
public var onMouseMove(default, null) = new Event<Float->Float->Void>();
public var onMouseMoveRelative(default, null) = new Event<Float->Float->Void>();
public var onMouseUp(default, null) = new Event<Float->Float->Int->Int->Void>();
public var onMouseUp(default, null) = new Event<Float->Float->Int->Void>();
public var onMouseWheel(default, null) = new Event<Float->Float->MouseWheelMode->Void>();
public var onMove(default, null) = new Event<Float->Float->Void>();
public var onRender(default, null) = new Event<RenderContext->Void>();
@@ -92,6 +92,10 @@ class Window
public var x(get, set):Int;
public var y(get, set):Int;
@:allow(openfl.display.Stage)
@:allow(lime.app.Application)
private var clickCount:Int = 0;
@:noCompletion private var __attributes:WindowAttributes;
@:noCompletion private var __backend:WindowBackend;
@:noCompletion private var __borderless:Bool;