not-fl3/egui-miniquad

Mouse cursor handling

smokku opened this issue · 0 comments

There are two issues with how egui-miniquad handles mouse cursor currently.

  1. It unconditionally enables mouse cursor on each end_frrame:
    mq_ctx.show_mouse(true);

    My game shows system cursor only when mouse is over UI, other case custom sprite cursor is drawn on the game screen. After integrating egui-miniquad mouse cursor is always visible.
  2. It calls mq_ctx.show_mouse() every frame, which makes the cursor change very laggy (at least on Windows). My experiments show if I call show_mouse() only when mouse cursor state needs to change, the cursor change is instant. I guess the OS event queue gets stuck by setting the mouse cursor so often.