This project is read-only.

Mouse & redrawing frame

Topics: Using Cosmos (Developing your own OS, projects, etc)
Feb 11 at 7:50 PM
Edited Feb 11 at 7:50 PM
Hi, how would I effectively put whatever was behind the mouse back when I move the mouse?
so for eg, if there is a black box on my screen, when I move my mouse over the black box, it overlaps it and when I move my mouse off of the black box, I want to see the black box again.
sorry if im really confusing lol, but I pretty much want to redraw what was behind the mouse when I move the mouse.
 public void drawMouse ()
            screen.SetPixel((uint)m.X, (uint)m.Y, 3);
            screen.SetPixel((uint)m.X + 1, (uint)m.Y, 3);
            screen.SetPixel((uint)m.X + 2, (uint)m.Y, 3);
            screen.SetPixel((uint)m.X, (uint)m.Y + 1, 3);
            screen.SetPixel((uint)m.X, (uint)m.Y + 2, 3);
            screen.SetPixel((uint)m.X + 1, (uint)m.Y + 1, 3);
            screen.SetPixel((uint)m.X + 2, (uint)m.Y + 2, 3);
            screen.SetPixel((uint)m.X + 3, (uint)m.Y + 3, 3);
 // kernel.cs:
            display.reDrawPreviousFrame(); // <<<<< This is what I need, but I don't want to redraw  the entire frame. Just what was behind the mouse
once again, sorry for being confusing, if you dont understand something I said please quote it and I will try to make it sound better lol