Fumofumotris/libs/minimal_input_interface.zig

23 lines
381 B
Zig
Raw Normal View History

2024-10-25 18:49:43 +00:00
const std = @import("std");
pub const Joystick = struct {
x: i32,
y: i32,
};
pub const Keyboard = struct {
state: u128 = 0,
last_pressed: [128]u32 = std.mem.zeroes(),
last_released: [128]u32 = std.mem.zeroes(),
};
pub const Mouse = struct {
pos: Joystick,
wheel: Joystick,
};
pub const Client = struct {
keyboard: Keyboard,
mouse: Mouse,
};