public override void Draw(GameTime gameTime) { const int ident = 5; int DY = 0; if (Death.Height < TQMG.ScrHeight) { DY = TQMG.ScrHeight - Death.Height; } TQMG.Color(0, 18, 25); TQMG.SetAlpha(255); TQMG.DrawRectangle(0, 0, TQMG.ScrWidth, TQMG.ScrHeight); TQMG.Color(0, 36, 50); Death.Draw(0, DY); TQMG.Color(255, 180, 100); SysFont.DrawText("OOPS!", ident, 0); TQMG.Color(255, 255, 0); SysFont.DrawText("You tried something we didn't think of!", 50, 25); TQMG.Color(0, 180, 255); SysFont.DrawText(sct, ident, 75); TQMG.Color(0, 200, 255); SysFont.DrawText(smsg, ident, 125); TQMG.Color(0, 220, 255); SysFont.DrawText(strace, ident, 250); TQMG.Color(0, 255, 255); SysFont.DrawText("Hit Escape to exit this application", 50, TQMG.ScrHeight - 30); }
public override void Draw(Game1 game, GameTime gameTime) { TQMG.Color(0, 180, 255); // This effect was originall a bug, but in stead of fixing it, I decided to "seal" it in :P TQMG.SimpleTile(UI.back, 0, 0, UI.ScrWidth, UI.ScrHeight); TQMG.Color(255, 180, 0); UI.font32.DrawText($"All Textures! Starting at {spot.ToString("X2")}", UI.ScrWidth / 2, 50, TQMG_TextAlign.Center); TQMG.Color(180, 0, 255); UI.font20.DrawText("Prefix:", 10, 100); TQMG.Color(0, 18, 25); TQMG.DrawRectangle(10, 125, UI.ScrWidth - 20, 22); TQMG.Color(0, 180, 255); UI.font20.DrawText($"{prefix}|", 12, 126); }
public override void Draw(Game1 game, GameTime gameTime) { var d = DateTime.Now.Second; var c = "|"; var y = 100; if (d % 2 == 0) { c = ""; } TQMG.Color(127, 127, 127); TQMG.SimpleTile(UI.back, 0, 0, UI.ScrWidth, UI.ScrHeight); TQMG.Color(255, 180, 0); font32.DrawText($"Object ({x},{y}): {obj.Cl("TeddyID")}", UI.ScrWidth / 2, 50, TQMG_TextAlign.Center); foreach (string key in ProjectData.ProjectConfig.List($"OBJECT.{obj.ObjType}")) { if (curField == "") { curField = key; } var cur = ""; var r = (byte)180; var g = (byte)0; var b = (byte)255; if (key == curField) { cur = c; r = 0; g = 180; b = 255; } TQMG.Color((byte)(r / 10), (byte)(g / 10), (byte)(b / 10)); TQMG.DrawRectangle(250, y, UI.ScrWidth - 300, 21); TQMG.Color(r, g, b); font20.DrawText($"{obj.Cl(key)}{cur}", 252, y); TQMG.Color((byte)(255 - r), (byte)(255 - g), (byte)(255 - b)); font20.DrawText(key, 240, y, TQMG_TextAlign.Right); if (muis.LeftButton == ButtonState.Pressed && muis.Y > y && muis.Y < y + 20) { curField = key; } y += 23; } }
static public void Draw() { TQMG.Color(Color.White); Void.Back.Draw(0, 0, 0, 0, TQMG.ScrWidth, 20); var nix = 5; foreach (Heads h in (Heads[])Enum.GetValues(typeof(Heads))) { if (Top[h] == null) { new PullDownMenus(h); Top[h].TopX = nix; Top[h].Caption = $"{h}"; Top[h].CaptGraph = Void.Font.Text(Top[h].Caption, true); } if (Selected == Top[h]) { TQMG.Color(0, 255, 255); TQMG.DrawRectangle(nix - 5, 0, Top[h].CaptGraph.Width + 10, 20); TQMG.Color(Color.Black); } else { TQMG.Color(0, 255, 255); } Top[h].CaptGraph.Draw(nix, 4); if (Void.ms.LeftButton == ButtonState.Pressed) { if (Void.ms.X > nix && Void.ms.Y < 20 && Void.ms.X < nix + Top[h].CaptGraph.Width + 10) { Selected = Top[h]; } } nix += Top[h].CaptGraph.Width + 10; } }
public override void Draw() { if (lchr < 256) { Void.Font.DrawText($"{(char)lchr}!", 0, 0); lchr++; } // Positions var StatY = TQMG.ScrHeight - 20; var OutX = TextX + TextW; var OutW = TQMG.ScrWidth - (TextX + TextW); // Document Content if (Doc != null) { TQMG.Color(127, 127, 127); } Void.VoidBack.Draw((TextX + (TextW / 2)) - (Void.VoidBack.Width / 2), (TextY + (TextH / 2)) - (Void.VoidBack.Height / 2)); if (Doc != null) { for (int lnnr = 0; lnnr < Doc.Lines.Count; lnnr++) { var py = lnnr - Doc.scrolly; var ty = TextY + (py * 16); if (ty >= TextY && ty < StatY) { TQMG.Color(127, 127, 127); Void.Font.DrawText($"{lnnr + 1} {(char)186}", TextX + (144), ty, TQMG_TextAlign.Right); } var tx = 172; if (Doc.Lines[lnnr].Letters == null) { Doc.Lexer.Chop(Doc.Lines[lnnr]); } if (Doc.Lines[lnnr].Letters != null) { for (int psnr = 0; psnr < Doc.Lines[lnnr].Letters.Count(); psnr++) { if (psnr >= Doc.scrollx && tx < TextW) { var let = Doc.Lines[lnnr].Letters[psnr]; TQMG.Color(let.Col); if (psnr == Doc.posx && lnnr == Doc.posy) { TQMG.DrawRectangle(tx, ty, let.cl * 8, 16); TQMG.Color((byte)(255 - let.Col.R), (byte)(255 - let.Col.G), (byte)(255 - let.Col.B)); } if (let.str != ' ' && let.str != '\t') { Void.Font.fimg.Draw(tx, ty, (byte)let.str); } tx += let.cl * 8; } } if (Doc.PosY == lnnr && Doc.PosX == Doc.Lines[lnnr].Letters.Count()) { TQMG.Color(Color.Aquamarine); TQMG.DrawRectangle(tx, ty, 8, 16); } } } } // Project, FileList and Outline TQMG.Color(255, 255, 255); Void.Back.Draw(OutX, TextY, TextX + TextW, TextY, OutW, TextW); // Project list TQMG.Color(255, 0, 0); TQMG.SetAlpha(50); TQMG.DrawRectangle(OutX, TextY, OutW, 64); TQMG.Color(255, 255, 0); TQMG.SetAlpha(255); { var y = 0 - ProjectScroll; foreach (string n in Project.ProjMap.Keys) { if (y >= 0 && y < 4) { var n2 = Project.ProjMap[n].CFG["Title"]; if (n2.Length > 40) { n2 = $"{qstr.Left(n2, 16)}...{qstr.Right(n2, 16)}"; } var iy = TextY + (y * 16); var Txt = Void.Font.Text(n2); TQMG.Color(255, 255, 0); if (n == Project.ChosenProjectID) { TQMG.DrawRectangle(OutX, iy, Txt.Width, 16); TQMG.Color(255, 0, 0); } Txt.Draw(OutX, iy); if (Void.ms.X > OutX && Void.ms.Y > iy && Void.ms.Y < iy + 16 && Void.ms.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed) { Project.ChosenProjectID = n; } y++; } } } // File List TQMG.Color(0, 255, 0); TQMG.SetAlpha(50); TQMG.DrawRectangle(OutX, TextY + 64, OutW, 128); TQMG.Color(180, 255, 0); TQMG.SetAlpha(255); { var y = 0 - FileScroll; void PS(int tab = 0, Project.Item Item = null) { TMap <string, Project.Item> IL; if (Item == null) { IL = Project.ChosenProject.ItemMap; } else { IL = Item.SubDirectory; } foreach (string key in IL.Keys) { var V = IL[key]; var iy = TextY + 64 + (y * 16); switch (V.Type) { case Project.ItemType.NonExistent: throw new Exception($"File '{key}' appears to be marked as Non-Existent!"); case Project.ItemType.File: TQMG.Color(180, 255, 0); if (y >= 0 && y < 8) { if (V == Project.ChosenProject.CurrentItem) { TQMG.DrawRectangle(OutX, iy, TQMG.ScrWidth - OutX - 10, 16); TQMG.Color(0, 25, 0); } Void.Font.DrawText($"F> {qstr.Str(" ", tab)}{key}", OutX, iy); if (Void.ms.Y > iy && Void.ms.Y < iy + 16 && Void.ms.X > OutX && Void.ms.X < TQMG.ScrWidth - 10 && Void.ms.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed) { Project.ChosenProject.CurrentItem = V; } } y++; break; case Project.ItemType.Directory: TQMG.Color(255, 255, 0); if (y >= 0 && y < 8) { Void.Font.DrawText($"D> {qstr.Str(" ", tab)}{key}/", OutX, TextY + 64 + (y * 16)); } y++; PS(tab + 1, V); break; default: throw new Exception("Fatal Internal Error! Unknown filetype in file outline"); } } } if (Project.ChosenProject != null) { PS(); } if (FileScroll != 0) { TQMG.Color(180, 255, 0); Void.Font.DrawText($"{(char)30}", TQMG.ScrWidth, TextY + 64, TQMG_TextAlign.Right); if (Void.ms.LeftButton == ButtonState.Pressed && Void.ms.X > TQMG.ScrWidth - 8 && Void.ms.Y > TextY + 64 && Void.ms.Y < TextY + 80) { FileScroll--; } } if (y > 8) { TQMG.Color(180, 255, 0); Void.Font.DrawText($"{(char)31}", TQMG.ScrWidth, TextY + 64 + 112, TQMG_TextAlign.Right); if (Void.ms.LeftButton == ButtonState.Pressed && Void.ms.X > TQMG.ScrWidth - 8 && Void.ms.Y > TextY + 64 + 112 && Void.ms.Y < TextY + 64 + 128) { FileScroll++; } } } // Outline if (Project.ChosenProject != null && Project.ChosenProject.CurrentItem != null) { TQMG.Color(0, 180, 255); var y = 0; var ty = TextY + 64 + 128; if (Project.ChosenProject.CurrentDoc.Outline.Count == 0) { TQMG.Color(255, 0, 180); Void.Font.DrawText("Nothing to outline", OutX, ty); } foreach (string n in Project.ChosenProject.CurrentDoc.Outline.Keys) { if (y >= OutLineScroll && ty < StatY - 16) { Void.Font.DrawText(n, OutX, ty); ty += 16; } } } // Status bar TQMG.Color(Color.White); Void.Back.Draw(0, StatY, TQMG.ScrWidth, 20); if (Project.ChosenProject == null || Project.ChosenProject.CurrentItem == null) { TQMG.Color(Color.Red); Void.Font.DrawText("No document", 0, StatY); } else { Void.Font.DrawText(Project.ChosenProject.CurrentItem.filename, 0, StatY); if (Project.ChosenProject.CurrentDoc != null) { Void.Font.DrawText($"(Ln:{Project.ChosenProject.CurrentDoc.posy + 1}; Pos:{Project.ChosenProject.CurrentDoc.posx + 1})", TQMG.ScrWidth - 10, StatY, TQMG_TextAlign.Right); } else { TQMG.Color(Color.Red); Void.Font.DrawText("Doc Failure!", TQMG.ScrWidth - 10, StatY, TQMG_TextAlign.Right); } if (Insert) { TQMG.Color(Color.White); Void.Font.DrawText("Insert", TQMG.ScrWidth - 300, StatY, TQMG_TextAlign.Center); } else { TQMG.Color(Color.Violet); Void.Font.DrawText("Overwrite", TQMG.ScrWidth - 300, StatY, TQMG_TextAlign.Center); } if (Void.kb.CapsLock) { TQMG.Color(Color.Tomato); Void.Font.DrawText("Caps Lock", TQMG.ScrWidth - 400, StatY, TQMG_TextAlign.Center); } } // PullDown PullDownMenus.Draw(); }