Browse Source

save trace color.

Nicolas Cannasse 19 years ago
parent
commit
39fe51cef6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/flash/Boot.hx

+ 4 - 0
std/flash/Boot.hx

@@ -26,6 +26,8 @@ package flash;
 
 
 class Boot {
 class Boot {
 
 
+	private static var def_color = 0;
+
 	private static function __string_rec(o : Dynamic,s : String) {
 	private static function __string_rec(o : Dynamic,s : String) {
 		untyped {
 		untyped {
 			if( s.length >= 20 )
 			if( s.length >= 20 )
@@ -158,6 +160,7 @@ class Boot {
 			root.createTextField("__trace_txt",1048500,0,0,Stage.width,Stage.height+30);
 			root.createTextField("__trace_txt",1048500,0,0,Stage.width,Stage.height+30);
 			tf = root.__trace_txt;
 			tf = root.__trace_txt;
 			tf.selectable = false;
 			tf.selectable = false;
+			tf.textColor = def_color;
 			root.__trace_lines = new Array<String>();
 			root.__trace_lines = new Array<String>();
 		}
 		}
 		return tf;
 		return tf;
@@ -165,6 +168,7 @@ class Boot {
 
 
 	private static function __set_trace_color( rgb : Int ) {
 	private static function __set_trace_color( rgb : Int ) {
 		getTrace().textColor = rgb;
 		getTrace().textColor = rgb;
+		def_color = rgb;
 	}
 	}
 
 
 	private static function __trace(v,inf : haxe.PosInfos) {
 	private static function __trace(v,inf : haxe.PosInfos) {