Fix nuklear input processing
This commit is contained in:
@@ -692,10 +692,12 @@ NK_API void nk_raylib_input_mouse(struct nk_context * ctx)
|
||||
// Mouse Wheel
|
||||
float mouseWheel = GetMouseWheelMove();
|
||||
if (mouseWheel != 0.0f) {
|
||||
struct nk_vec2 mouseWheelMove;
|
||||
mouseWheelMove.x = 0.0f;
|
||||
mouseWheelMove.y = mouseWheel;
|
||||
nk_input_scroll(ctx, mouseWheelMove);
|
||||
if (nk_input_is_mouse_hovering_rect(&ctx->input, ctx->active->bounds)) {
|
||||
struct nk_vec2 mouseWheelMove;
|
||||
mouseWheelMove.x = 0.0f;
|
||||
mouseWheelMove.y = mouseWheel;
|
||||
nk_input_scroll(ctx, mouseWheelMove);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user