Parcourir la source

added hideChildren

Nicolas Cannasse il y a 4 ans
Parent
commit
902406b45e
2 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 1 1
      hide/comp/SceneEditor.hx
  2. 1 0
      hide/prefab/HideProps.hx

+ 1 - 1
hide/comp/SceneEditor.hx

@@ -456,7 +456,7 @@ class SceneEditor {
 				value : o,
 				text : o.name,
 				icon : "fa fa-"+icon,
-				children : o.children.length > 0 || (ref != null && @:privateAccess ref.editMode),
+				children : (o.children.length > 0 && !p.hideChildren) || (ref != null && @:privateAccess ref.editMode),
 				state: state
 			};
 			return r;

+ 1 - 0
hide/prefab/HideProps.hx

@@ -3,6 +3,7 @@ package hide.prefab;
 typedef HideProps = {
 	var icon : String;
 	var name : String;
+	@:optional var hideChildren : Bool;
 	@:optional var fileSource : Array<String>;
 	@:optional dynamic function allowChildren( type : String ) : Bool;
 	@:optional dynamic function allowParent( p : hrt.prefab.Prefab ) : Bool;