ncannasse 8 éve
szülő
commit
230eee5fa6
2 módosított fájl, 12 hozzáadás és 2 törlés
  1. 2 2
      h2d/Console.hx
  2. 10 0
      h3d/scene/CameraController.hx

+ 2 - 2
h2d/Console.hx

@@ -55,8 +55,8 @@ class Console extends h2d.Sprite {
 		addAlias("?", "help");
 	}
 
-	public function addCommand( name, help, args, callb : Dynamic ) {
-		commands.set(name, { help : help, args:args, callb:callb } );
+	public function addCommand( name, ?help, args, callb : Dynamic ) {
+		commands.set(name, { help : help == null ? "" : help, args:args, callb:callb } );
 	}
 
 	public function addAlias( name, command ) {

+ 10 - 0
h3d/scene/CameraController.hx

@@ -118,6 +118,16 @@ class CameraController extends h3d.scene.Object {
 	}
 
 	function onEvent( e : hxd.Event ) {
+
+		var p : Object = this;
+		while( p != null ) {
+			if( !p.visible ) {
+				e.propagate = true;
+				return;
+			}
+			p = p.parent;
+		}
+
 		switch( e.kind ) {
 		case EWheel:
 			if( hxd.Key.isDown(hxd.Key.CTRL) ) {