Browse Source

add clear console command

deepnight 9 years ago
parent
commit
24630ce91b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      h2d/Console.hx

+ 4 - 0
h2d/Console.hx

@@ -49,6 +49,10 @@ class Console extends h2d.Sprite {
 		commands = new Map();
 		aliases = new Map();
 		addCommand("help", "Show help", [ { name : "command", t : AString, opt : true } ], showHelp);
+		addCommand("cls", "Clear console", [], function() {
+			logs = [];
+			logTxt.text = "";
+		});
 		addAlias("?", "help");
 	}