Forráskód Böngészése

- update treeview when hidding object
- update "help keys"

bstouls 9 éve
szülő
commit
b6c7865675
2 módosított fájl, 8 hozzáadás és 3 törlés
  1. 5 1
      tools/fbx/TreeView.hx
  2. 3 2
      tools/fbx/Viewer.hx

+ 5 - 1
tools/fbx/TreeView.hx

@@ -156,8 +156,10 @@ class TreeView
 
 	public function onKey(e:hxd.Event) {
 		if( selected == null ) return;
-		if( e.keyCode == "V".code )
+		if( e.keyCode == "V".code ) {
 			selected.obj.visible = !selected.obj.visible;
+			draw();
+		}
 	}
 
 	function setHighligth(e : TreeView) {
@@ -293,6 +295,8 @@ class TreeView
 		tf = new h2d.Text(font, cont);
 		var str = obj.toString();
 		tf.text = str.indexOf("Joint") != -1 ? str.substr(5, str.length - 6) : str;
+
+		tf.color.setColor(obj.visible ? 0xFFFFFFFF : 0xFF808080);
 		tf.x = 5 + dx;
 		tf.y = 5 + minHeight;
 

+ 3 - 2
tools/fbx/Viewer.hx

@@ -758,8 +758,9 @@ class Viewer extends hxd.App {
 			"[I] Lights = " + props.lights,
 			"[C] Use HMD model = " + props.convertHMD,
 			"[Q] Queue anims = "+props.queueAnims,
-			"[O] Show objects = "+props.treeview,
-			"[G] Show ground = "+props.checker,
+			"[O] Show/Hide treeview = "+props.treeview,
+			"[V] Show/Hide selected object",
+			"[G] Show/Hide ground = "+props.checker,
 			"",
 			"[F] Default camera",
 			"[Space/P] Pause Animation",