From 91a8e2869573388406ddee7d2c89b8f733e2ac2b Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 7 Nov 2018 18:12:39 +0100 Subject: [PATCH] Corrected issue --- src/raygui.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index db35d8c..7e607d7 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -2866,7 +2866,7 @@ RAYGUIDEF bool GuiListViewEx(Rectangle bounds, const char **text, int *enabledEl bool pressed = false; int focusElement = -1; - int startIndex = (scrollIndex == NULL) ? 1 : *scrollIndex; + int startIndex = (scrollIndex == NULL) ? 0 : *scrollIndex; bool useScrollBar = true; bool pressedKey = false; @@ -3093,9 +3093,10 @@ RAYGUIDEF bool GuiListViewEx(Rectangle bounds, const char **text, int *enabledEl } //-------------------------------------------------------------------- - *scrollIndex = startIndex; + if (scrollIndex != NULL) *scrollIndex = startIndex; if (focus != NULL) *focus = focusElement; *active = auxActive; + return pressed; }