Select tab for current playground on start
This commit is contained in:
@@ -24,11 +24,19 @@
|
|||||||
->[archive e &opt ui]
|
->[archive e &opt ui]
|
||||||
null))
|
null))
|
||||||
|
|
||||||
|
(prop &mut :TabContainer pgTabs null)
|
||||||
(prop &mut :ScrollContainer pgScrollContainer null)
|
(prop &mut :ScrollContainer pgScrollContainer null)
|
||||||
(prop &mut :Node pgEntries null)
|
(prop &mut :Node pgEntries null)
|
||||||
|
|
||||||
(method &override :Void switchPlaygroundKey [:String key]
|
(method &override :Void switchPlaygroundKey [:String key]
|
||||||
(set pgScrollContainer (getNode rootNode.pgTabs key))
|
(set pgTabs rootNode.pgTabs)
|
||||||
|
|
||||||
|
(unless (= .name (pgTabs.getChild pgTabs.currentTab) key)
|
||||||
|
(doFor [idx :Control tab] (enumerate (collect (pgTabs.getChildren)) -1)
|
||||||
|
(when (and tab (= tab.name key))
|
||||||
|
(set pgTabs.currentTab idx))))
|
||||||
|
|
||||||
|
(set pgScrollContainer (getNode pgTabs key))
|
||||||
(set pgEntries (getNode pgScrollContainer "Entries"))
|
(set pgEntries (getNode pgScrollContainer "Entries"))
|
||||||
(super.switchPlaygroundKey key))
|
(super.switchPlaygroundKey key))
|
||||||
|
|
||||||
|
@@ -22,8 +22,6 @@ class PlaygroundEntries extends Control {
|
|||||||
public override function dropData(position:Vector2, data:Dynamic):Void {
|
public override function dropData(position:Vector2, data:Dynamic):Void {
|
||||||
var data:EntryPanel = cast(data);
|
var data:EntryPanel = cast(data);
|
||||||
data.rectPosition = position;
|
data.rectPosition = position;
|
||||||
kiss.Prelude.print(ui);
|
|
||||||
kiss.Prelude.print(data.e);
|
|
||||||
ui.playgroundSystem().savePosition(data.e, position.x, position.y, data.z);
|
ui.playgroundSystem().savePosition(data.e, position.x, position.y, data.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user