protected override void BeforeRun() { VGADriverII.Initialize(VGAMode.Pixel320x200DB); draw.FromByteArray(System.Graphics.Images.BootScreen); VGAGraphics.DrawImage(0, 0, draw); VGAGraphics.Display(); draw.FromByteArray(System.Graphics.Images.Cursor); }
public static void Run() { VGAGraphics.Clear(VGAColor.Black); //draw current window (windows are always fullscreen for now) if (!(windows.Count == 0)) { windows[RunningIndex].Run(); } //draw mouse VGAGraphics.DrawImage((int)MouseManager.X, (int)MouseManager.Y, VGAColor.Magenta, ImgCursor); VGADriverII.Display(); }
public override void Run() { //draw gets called before run if (MouseOver) { VGAGraphics.DrawFilledRect(X, Y, Width, Height, HoverColor); } if (MouseOver && MouseManager.MouseState == MouseState.Left && !MousePreviouslyPressed) { MousePreviouslyPressed = true; VGAGraphics.DrawFilledRect(X, Y, Width, Height, ClickColor); EventArgs eventArgs = new EventArgs(); OnMouseClick(eventArgs); } }
public static void Run() { VGAGraphics.Clear(VGAColor.Black); foreach (var window in windows) { window.Draw(); } if (windows.Count != 0) { windows[RunningIndex].Run(); } //draw mouse VGAGraphics.DrawImage((int)MouseManager.X, (int)MouseManager.Y, VGAColor.Magenta, ImgCursor); VGADriverII.Display(); }
public override void Draw() { //called by window MouseOver = Intersect((int)MouseManager.X, (int)MouseManager.Y); if (MouseOver) { if (MouseManager.MouseState != MouseState.Left) { MousePreviouslyPressed = false; } } else { VGAGraphics.DrawFilledRect(X, Y, Width, Height, Color); } }
public static void Run() { VGADriverII.Clear(247); VGAGraphics.DrawString(0, 0, "Cosix Graphics Manager", VGAColor.Black, VGAFont.Font8x8); VGAGraphics.DrawFilledRect(300, 180, 20, 20, VGAColor.Red); VGAGraphics.DrawFilledRect((int)MouseManager.X, (int)MouseManager.Y, 2, 2, VGAColor.Blue); if (vstate == 2) { VGAGraphics.Display(); } if ((MouseManager.X > 300) & (MouseManager.Y > 180) & (MouseManager.MouseState == MouseState.Left)) { GoText(); Terminal.TextColor = ConsoleColor.White; Terminal.BackColor = ConsoleColor.Black; Terminal.Clear(); } }
public static void Crash(Exception e) { if (Modules.CGM.VStateGet() == 0) { Terminal.Clear(ConsoleColor.DarkRed); Terminal.WriteLine("A fatal exception occured!"); Terminal.WriteLine(e.ToString()); Terminal.WriteLine("Please report this to the Cosix devs."); Terminal.DisableCursor(); while (true) { if (Sys.KeyboardManager.ControlPressed) { Terminal.BackColor = ConsoleColor.Black; Terminal.Clear(); Terminal.EnableCursor(); break; } if (Sys.KeyboardManager.ShiftPressed) { Restart(); } } } else { VGADriverII.Clear(229); VGAGraphics.DrawString(0, 0, "A fatal exception occured!\n" + e.ToString() + "\nPlease report this to the Cosix devs.", VGAColor.White, VGAFont.Font8x8); if (Modules.CGM.VStateGet() == 2) { VGADriverII.Display(); } while (true) { } } }
protected override void Run() { VGADriverII.Clear(206); VGAGraphics.DrawImage((int)Sys.MouseManager.X, (int)Sys.MouseManager.Y, draw); VGADriverII.Display(); }
private static void DrawTaskbar() { VGAGraphics.DrawFilledRect(0, 300, 200, 20, VGAColor.Gray3); }
private static void DrawWallpaper() { VGAGraphics.Clear(VGAColor.Cyan7); }
private static void DrawBackground() { VGAGraphics.Clear(VGAColor.Blue3); }