Close #128: ArchiveUI defines cursorPosition() which is used to place entries
This commit is contained in:
@@ -25,6 +25,8 @@ import kiss_tools.FlxKeyShortcutHandler;
|
||||
import nat.systems.PlaygroundSystem;
|
||||
import flash.desktop.Clipboard;
|
||||
import flash.desktop.ClipboardFormats;
|
||||
import haxe.ds.Option;
|
||||
import nat.components.Position;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class PlayState extends FlxState implements ArchiveUI {}
|
||||
|
@@ -330,4 +330,8 @@
|
||||
(method :Void onSelectionChanged [:Array<Entry> selectedEntries :Array<Entry> lastSelectedEntries]
|
||||
(doFor e (selectedEntries.concat lastSelectedEntries)
|
||||
(whenLet [sprite (dictGet spriteSystem.sprites e.id)]
|
||||
(sprite.updateColor))))
|
||||
(sprite.updateColor))))
|
||||
|
||||
(method :Option<Position> cursorPosition []
|
||||
(let [pos (FlxG.mouse.getWorldPosition FlxG.camera)]
|
||||
(Some (object x pos.x y pos.y z 0.0))))
|
Reference in New Issue
Block a user