blue-lock-94355
07/07/2022, 3:26 PMxml
<vbox width="100%" height="100%">
<style>
#hierarchy {
width: 100%;
height: 100%;
/* min-width: 30px; */
background-color: red;
}
#workspace {
width: 100%;
height: 100%;
background-color: green;
}
</style>
<splitter width="100%" height="100%">
<box id="hierarchy" />
<box id="workspace" />
</splitter>
</vbox>blue-lock-94355
07/07/2022, 3:27 PMblue-lock-94355
07/07/2022, 6:56 PMaddCustomNode() function add empty fields? In my opinion this should be equal to the addDefaultNode() function, but it is not
xml
<vbox width="100%" height="100%">
<script>
function addDefaultNode() {
hierarchy.addNode({text: "10", icon: "haxeui-core/styles/default/haxeui_small.png"});
}
function addCustomNode() {
hierarchy.addNode({picture: "haxeui-core/styles/default/haxeui_small.png", count: "10"});
}
</script>
<tree-view id="hierarchy" width="300px" height="100%">
<item-renderer id="expandable" layoutName="horizontal" width="100%">
<image id="picture" verticalAlign="center" width="40px" height="40px" />
<label id="count" verticalAlign="center" style="color:#888888;font-size: 11px;" />
</item-renderer>
</tree-view>
<button text="Add default node" onClick="addDefaultNode()"/>
<button text="Add custom node" onClick="addCustomNode()"/>
</vbox>bright-gpu-74537
07/07/2022, 7:01 PMhallowed-ocean-84954
07/08/2022, 3:08 AMbright-gpu-74537
07/08/2022, 6:37 AMicy-zebra-52882
07/10/2022, 11:06 PMicy-zebra-52882
07/10/2022, 11:07 PMicy-zebra-52882
07/10/2022, 11:07 PMhallowed-ocean-84954
07/11/2022, 3:47 AMbright-gpu-74537
07/11/2022, 6:00 AMbright-gpu-74537
07/11/2022, 6:01 AMmyDialog.destroyOnClose = falsebright-gpu-74537
07/11/2022, 6:02 AMicy-zebra-52882
07/11/2022, 6:03 AMbright-gpu-74537
07/11/2022, 6:03 AMicy-zebra-52882
07/11/2022, 6:03 AMicy-zebra-52882
07/11/2022, 6:04 AMbright-gpu-74537
07/11/2022, 6:05 AMicy-zebra-52882
07/11/2022, 6:05 AMbright-gpu-74537
07/11/2022, 6:06 AMbright-gpu-74537
07/11/2022, 6:06 AMbright-gpu-74537
07/11/2022, 6:56 AMicy-zebra-52882
07/11/2022, 6:58 AMbright-gpu-74537
07/11/2022, 7:03 AMxml
<item-renderer for="expandableNode">
...
...
...bright-gpu-74537
07/11/2022, 7:06 AM<item-renderer for="button"> is alot clearer. (?)bright-gpu-74537
07/11/2022, 7:09 AMicy-zebra-52882
07/11/2022, 7:10 AMbright-gpu-74537
07/11/2022, 7:11 AMicy-zebra-52882
07/11/2022, 7:11 AMhx
public static function findCameras(member:FlxBasic, group:FlxTypedGroup<FlxBasic> = null):Array<FlxCamera> {
if (group == null) {
group = currentState;
}
if (group == null || group.members == null) {
return null;
}
for (m in group.members) {
if (m.cameras != null && m.cameras.length > 0) { // <----- this line
if (m == member || ((m is FlxTypedGroup) && hasMember(member, cast m))) {
return m.cameras;
}
}
}
return null;
}
Null Object Reference