Added setMouseScrollCallback
This commit is contained in:
@ -148,6 +148,11 @@ pub fn Window(comptime TUserData: type) type {
|
||||
c.mfb_set_mouse_move_callback(self.cwin, @ptrCast(c.mfb_mouse_move_func, callback));
|
||||
}
|
||||
|
||||
pub const MouseScrollFunc = fn (win: Window(TUserData), key_mod: KeyMod, delta_x: f32, delty_y: f32) callconv(.C) void;
|
||||
pub fn setMouseScrollCallback(self: Window(TUserData), callback: MouseScrollFunc) void {
|
||||
c.mfb_set_mouse_scroll_callback(self.cwin, @ptrCast(c.mfb_mouse_scroll_func, callback));
|
||||
}
|
||||
|
||||
pub fn setViewport(self: Window(TUserData), offset_x: u32, offset_y: u32, width: u32, height: u32) bool {
|
||||
return c.mfb_set_viewport(self.cwin, offset_x, offset_y, width, height);
|
||||
}
|
||||
|
Reference in New Issue
Block a user