Queue a pointer move to (x, y) in points.
- ui: the UI to queue the event on.
- x: the new horizontal position.
- y: the new vertical position.
ui := headless(.{ width = 320, height = 200 });
defer free_ui(*ui);
count := 0;
build := (n: *int) {
for column(.{ gap = 8, padding = 16 }) {
label(tprint("Clicked % times", n.*));
if button("Add") n.* += 1;
}
};
frame(*ui, *count, build);
send_mouse_move(*ui, 20, 20);
frame(*ui, *count, build);send_mouse_move :: (ui: *UI_State, x: float, y: float)
Queue a pointer move to (x, y) in points.
Parameters
- ui: *UI_State
- the UI to queue the event on.
- x: float
- the new horizontal position.
- y: float
- the new vertical position.
ui := headless(.{ width = 320, height = 200 });
defer free_ui(*ui);
count := 0;
build := (n: *int) {
for column(.{ gap = 8, padding = 16 }) {
label(tprint("Clicked % times", n.*));
if button("Add") n.* += 1;
}
};
frame(*ui, *count, build);
send_mouse_move(*ui, 20, 20);
frame(*ui, *count, build);