NAT flixel playground multiple playground views
This commit is contained in:
@@ -146,6 +146,8 @@
|
||||
(method getSelectedEntries []
|
||||
(_selectedEntries.copy))
|
||||
|
||||
(prop &mut :PlaygroundSystem playgroundSystem null)
|
||||
|
||||
(defNew [&prop :Archive archive
|
||||
&prop :ArchiveUI ui]
|
||||
[&mut :Array<Entry> _selectedEntries []
|
||||
@@ -163,14 +165,14 @@
|
||||
(archive.addSystem (new KeyShortcutSystem this))
|
||||
(archive.addSystem (new DLSystem))
|
||||
(whenLet [ps (ui.playgroundSystem)]
|
||||
(set playgroundSystem ps)
|
||||
(archive.addSystem ps)
|
||||
// TODO allow saving a different default playground
|
||||
(ps.switchPlaygroundKey "Playground-MAIN"))
|
||||
(ps.switchPlaygroundKey (dictGet archive.playgrounds "default")))
|
||||
|
||||
// Just for testing:
|
||||
// (archive.addSystem (new AttachmentSystem ["jpg" "jpeg" "png"] ->[archive e files] ~files))
|
||||
|
||||
(archive.processSystems)
|
||||
(archive.processSystems ui)
|
||||
|
||||
(defCommand Help []
|
||||
(ui.displayMessage
|
||||
@@ -261,4 +263,12 @@
|
||||
(withWritableComponents archive e [scaleComponent Scale]
|
||||
(set scaleComponent scale))
|
||||
(addComponent archive e Scale scale)))
|
||||
entries))
|
||||
entries)
|
||||
|
||||
(defCommand CreatePlayground [name (Text null) catsMatchExp (Text null)]
|
||||
(archive.changePlaygrounds ->:Void [:DynamicAccess<Dynamic> p]
|
||||
(dictSet p name (object catsMatch catsMatchExp))))
|
||||
|
||||
(defCommand SwitchPlayground [name (Text null)]
|
||||
(archive.changePlaygrounds ->:Void [:DynamicAccess<Dynamic> p] (dictSet p "default" name))
|
||||
(when playgroundSystem (playgroundSystem.switchPlaygroundKey name))))
|
||||
|
Reference in New Issue
Block a user