Close #128: ArchiveUI defines cursorPosition() which is used to place entries
This commit is contained in:
@@ -5,6 +5,7 @@ import kiss.List;
|
||||
import nat.System;
|
||||
import nat.components.*;
|
||||
import haxe.DynamicAccess;
|
||||
import haxe.ds.Option;
|
||||
|
||||
typedef PlaygroundEntryProcessor = (Archive, Entry, Position, ?ArchiveUI) -> Dynamic; // Whatever value is returned will be dropped, but this is easier than requiring ->:Void
|
||||
typedef PlaygroundConnectionProcessor = (Archive, Entry, Position, Entry, Position, ?ArchiveUI) -> Dynamic; // Whatever value is returned will be dropped, but this is easier than requiring ->:Void
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
(method switchPlaygroundKey [key]
|
||||
(set _playgroundKey key)
|
||||
(clear (or (dictGet playgroundBGColors _playgroundKey) (object r 0.0 g 0.0 b 0.0 a 1.0)))
|
||||
(set ui.controller.archive.defaultInitializer ->e
|
||||
{
|
||||
(when (currentDefaultTags)
|
||||
(addTags ui.controller.archive e (currentDefaultTags)))
|
||||
|
||||
(whenLet [(Some position) (ui.cursorPosition)]
|
||||
(addComponent ui.controller.archive e Positions [=>_playgroundKey position]))
|
||||
})
|
||||
(process ui.controller.archive ui))
|
||||
|
||||
(method :Void clear [:Color color]
|
||||
|
||||
Reference in New Issue
Block a user