improved reactive ui and events
This commit is contained in:
15
src/lib/ui/UIEvents.hx
Normal file
15
src/lib/ui/UIEvents.hx
Normal file
@@ -0,0 +1,15 @@
|
||||
package lib.ui;
|
||||
|
||||
import util.Vec.Vec2;
|
||||
import kernel.ButtonType;
|
||||
using tink.CoreApi;
|
||||
|
||||
typedef UIEvents = {
|
||||
public var ?onClick:Callback<{button:ButtonType, pos:Vec2<Int>}>;
|
||||
public var ?onKey:Callback<{keyCode:Int, isHeld:Bool}>;
|
||||
public var ?onKeyUp:Callback<Int>;
|
||||
public var ?onMouseDrag:Callback<{button:ButtonType, pos:Vec2<Int>}>;
|
||||
public var ?onMouseScroll:Callback<{dir:Int, pos:Vec2<Int>}>;
|
||||
public var ?onMouseUp:Callback<{button:ButtonType, pos:Vec2<Int>}>;
|
||||
public var ?onPaste:Callback<String>;
|
||||
}
|
||||
Reference in New Issue
Block a user