public new void Initialize() { vm = new ScripterNet.ScripterVM(); vm.RegisterFunction("print", GetType().GetMethod("writeln")); vm.RegisterFunction("graph", GetType().GetMethod("debuggraph")); ShouldBeScaled = false; Layer = 90000; tbLog = new Elements.TextBox(0, 0, 800, 20 * 20); tbLog.Editable = false; tbLog.ShouldOffset = false; tbLog.Font = ResourceManager.Load<SpriteFont>("Fonts/CourierNew_14"); tbLog.BackgroundColor = tbLog.BackgroundColor * 0.7f; controls.Add(tbLog); tbinput = new Elements.TextBox(0, OutputEngine.LOG_LENGTH * 20, 800, 30); tbinput.Font = ResourceManager.Load<SpriteFont>("Fonts/CourierNew_14"); tbinput.BackgroundColor = tbinput.BackgroundColor * 0.7f; tbinput.Multiline = true; controls.Add(tbinput); logoffset = 1000; CheckLogRange(); base.Initialize(); if (File.Exists("console.txt")) { string s = File.ReadAllText("console.txt"); try { DoCommand(s); } catch (Exception e) { } } }
public new void Initialize() { vm = new ScripterNet.ScripterVM(); vm.RegisterFunction("print", GetType().GetMethod("writeln")); vm.RegisterFunction("graph", GetType().GetMethod("debuggraph")); ShouldBeScaled = false; Layer = 90000; tbLog = new Elements.TextBox(0, 0, 800, 20 * 20); tbLog.Editable = false; tbLog.ShouldOffset = false; tbLog.Font = ResourceManager.Load <SpriteFont>("Fonts/CourierNew_14"); tbLog.BackgroundColor = tbLog.BackgroundColor * 0.7f; controls.Add(tbLog); tbinput = new Elements.TextBox(0, OutputEngine.LOG_LENGTH * 20, 800, 30); tbinput.Font = ResourceManager.Load <SpriteFont>("Fonts/CourierNew_14"); tbinput.BackgroundColor = tbinput.BackgroundColor * 0.7f; tbinput.Multiline = true; controls.Add(tbinput); logoffset = 1000; CheckLogRange(); base.Initialize(); if (File.Exists("console.txt")) { string s = File.ReadAllText("console.txt"); try { DoCommand(s); } catch (Exception e) { } } }