#Change cursor icon?
11 messages · Page 1 of 1 (latest)
When inside the window or for the entire OS?
If it's just inside the window, you can use JS or CSS.
JS: document.documentElement.style.cursor = "wait"
CSS: html { cursor: wait; }
If you want to change the icon for a specific window from Rust:
if let Err(e) = window.set_cursor_icon(tauri::CursorIcon::Wait) {
println!("failed to set cursor icon: {}", e);
}
You can also do the same with Tauri's JS API: https://tauri.app/v1/api/js/window#setcursoricon.
@sand mulch I'm not the OP but curious to know how would you do it for the whole OS?
Call OS-api's using c/obj-c/swift or is there a more ergonomic way via Rust?