mach: Rename scroll -> mouse_scroll and use f32 for offsets
This commit is contained in:
parent
a2a6c2a288
commit
efe90fc64f
2 changed files with 6 additions and 6 deletions
|
|
@ -256,9 +256,9 @@ pub const Platform = struct {
|
||||||
fn callback(window: glfw.Window, xoffset: f64, yoffset: f64) void {
|
fn callback(window: glfw.Window, xoffset: f64, yoffset: f64) void {
|
||||||
const pf = (window.getUserPointer(UserPtr) orelse unreachable).platform;
|
const pf = (window.getUserPointer(UserPtr) orelse unreachable).platform;
|
||||||
pf.pushEvent(.{
|
pf.pushEvent(.{
|
||||||
.scroll = .{
|
.mouse_scroll = .{
|
||||||
.xoffset = xoffset,
|
.xoffset = @floatCast(f32, xoffset),
|
||||||
.yoffset = yoffset,
|
.yoffset = @floatCast(f32, yoffset),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ pub const Event = union(enum) {
|
||||||
mouse_release: struct {
|
mouse_release: struct {
|
||||||
button: enums.MouseButton,
|
button: enums.MouseButton,
|
||||||
},
|
},
|
||||||
scroll: struct {
|
mouse_scroll: struct {
|
||||||
xoffset: f64,
|
xoffset: f32,
|
||||||
yoffset: f64,
|
yoffset: f32,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue