mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
This commit addresses issues with mouse interaction reliability and build configuration in the Ncurses renderer and example. Renderer Changes: - Enable explicit xterm 1003 mouse tracking (Any Event) via escape sequences to ensure reliable hover sensing from the first frame (though not so portable). - Refactor `Clay_Ncurses_ProcessInput` to: - Correctly order `Clay_SetPointerState` calls to ensure the "Pressed" state is registered before the function returns. - Detect and return a new `CLAY_NCURSES_KEY_MOUSE_CLICK` event code for single, double, and triple clicks. - Make `Clay_Ncurses_OnClick` as a semantic wrapper around `Clay_OnHover`. - Add empty switch cases for `CLAY_RENDER_COMMAND_TYPE_IMAGE` and `CLAY_RENDER_COMMAND_TYPE_CUSTOM` to prevent unhandled enumeration warnings. Example Application Changes: - Update `main.c` to break the input processing loop immediately upon receiving `CLAY_NCURSES_KEY_MOUSE_CLICK`, ensuring the "Pressed" state is processed by the layout engine for that frame. Build System: - Update `CMakeLists.txt` to replace `FindCurses` with `find_library` and `find_path` for `ncursesw`. |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| main.c | ||