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 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(); } }
private static void DrawTaskbar() { VGAGraphics.DrawFilledRect(0, 300, 200, 20, VGAColor.Gray3); }