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; }