mach: implement setCursorMode for wasm

This commit is contained in:
Ali Chraghi 2022-10-21 15:34:37 +03:30 committed by Stephen Gutekanst
parent 3ea1dea4f7
commit a27121c00a
2 changed files with 13 additions and 2 deletions

View file

@ -123,8 +123,9 @@ pub const Platform = struct {
js.machSetMouseCursor(cursor_name.ptr, cursor_name.len);
}
pub fn setCursorMode(_: *Platform, _: enums.CursorMode) !void {
@panic("TODO: Implement setCursorMode for wasm");
pub fn setCursorMode(_: *Platform, mode: enums.CursorMode) !void {
const mode_name = @tagName(mode);
js.machSetCursorMode(mode_name.ptr, mode_name.len);
}
fn pollChanges(platform: *Platform) void {