From 758d9c405aa91dca204a511e31ef0daabc63c2ce Mon Sep 17 00:00:00 2001 From: vurtun Date: Wed, 15 Jun 2016 21:34:49 +0200 Subject: [PATCH] Fixed copy & paste bug in scrollbar implementation It should now be possible to just click on one of the empty spaces inside scrollbars to jump one window frame down or up. --- nuklear.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuklear.h b/nuklear.h index 9f6090f9..965df0b4 100644 --- a/nuklear.h +++ b/nuklear.h @@ -12561,7 +12561,7 @@ nk_do_scrollbarv(nk_flags *state, empty_north.x = scroll.x; empty_north.y = scroll.y; empty_north.w = scroll.w; - empty_north.h = cursor.x - scroll.w; + empty_north.h = cursor.y - scroll.y; empty_south.x = scroll.x; empty_south.y = cursor.y + cursor.h; @@ -12649,7 +12649,7 @@ nk_do_scrollbarh(nk_flags *state, /* calculate empty space around cursor */ empty_west.x = scroll.x; empty_west.y = scroll.y; - empty_west.w = cursor.y - scroll.y; + empty_west.w = cursor.x - scroll.x; empty_west.h = scroll.h; empty_east.x = cursor.x + cursor.w;