mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Make a nice bitmap cursor.
It's rendered as two CharacterBitmaps right now because I don't have a good primitive for this and I wanted it right away. I should add 2-color bitmaps.. Also make a neat little effect where the cursor becomes inverted on press.
This commit is contained in:
parent
1d914cbd84
commit
8e96cba7ef
3 changed files with 56 additions and 8 deletions
|
@ -60,7 +60,7 @@ void AbstractScreen::on_receive_mouse_data(int dx, int dy, bool left_button, boo
|
|||
auto event = make<MouseEvent>(right_button ? Event::MouseDown : Event::MouseUp, m_cursor_location.x(), m_cursor_location.y(), MouseButton::Right);
|
||||
EventLoop::main().postEvent(&WindowManager::the(), move(event));
|
||||
}
|
||||
if (m_cursor_location != prev_location)
|
||||
if (m_cursor_location != prev_location || prev_left_button != left_button)
|
||||
WindowManager::the().redraw_cursor();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue