6 ex_gui_cursor_8c example
gullradriel edited this page 2026-10-09 00:55:18 +02:00

ex_gui_cursor.c

The application's mouse cursor, kept by the GUI (headless). A picking tool wants a crosshair while the pointer is over what it picks from. The GUI sets the display's cursor itself, a resize cursor over a split pane divider and the default elsewhere, so a cursor the application set with Allegro was put back to the default on the next pointer move. n_gui_set_cursor() makes the application's cursor the GUI's "elsewhere": this checks it survives pointer moves, gives way to the resize cursor over a divider and comes back after, waits while a press is held, and hands back to the GUI's own behaviour when set to the default.