/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. try { spriteBatch = new SpriteBatch(GraphicsDevice); TQMG.Init(graphics, GraphicsDevice, spriteBatch, JCR); MousePointer = TQMG.GetImage("Mouse.png"); Assert(MousePointer, JCR6.JERROR); Font = TQMG.GetFont("DosFont.JFBF"); Assert(Font, JCR6.JERROR); Back = TQMG.GetImage("Back.png"); VoidBack = TQMG.GetImage("Void.png"); Stage.GoTo(new Editor()); foreach (string prj in Config.GetL("Projects")) { if (System.IO.Directory.Exists(prj)) { Project.ProjMap[prj] = new Project(prj); } else { Confirm.Annoy($"Project directory \"{prj}\" has not been found!"); } } new LexNIL(); } catch (Exception QuelleCatastrophe) { #if DEBUG FatalError($"Exception Thrown:\n{QuelleCatastrophe.Message}\n\n{QuelleCatastrophe.StackTrace}"); #else FatalError($"Exception Thrown:\n{QuelleCatastrophe.Message}"); #endif } // TODO: use this.Content to load your game content here }
static public void Error(Game1 getgame, string ErrorMessage) { Game = getgame; var fnt = TQMG.GetFont("fonts/SulphurPoint-Regular.12.jfbf"); TextList.Add(fnt.Text("Error!")); foreach (string l in ErrorMessage.Split('\n')) { TextList.Add(fnt.Text(l)); } TextList.Add(fnt.Text("Hit enter or click the mouse to leave this program!")); ProjectData.Log($"{(char)27}[31mERROR!!!{(char)27}[0m\n{ErrorMessage}"); Game.SetStage(new Crash()); }