file picker: enforce scroll

fixes a bug where the file list scrolls randomly when it takes longer than 1 frame to load
This commit is contained in:
tildearrow 2025-10-04 19:39:13 -05:00
parent dc87bc489f
commit d6569a40f5
2 changed files with 32 additions and 5 deletions

View file

@ -116,6 +116,8 @@ class FurnaceFilePicker {
bool isPathBookmarked, isSearch;
int scheduledSort, imguiFlags;
size_t curFilterType;
float lastScrollY;
int enforceScrollY;
SortModes sortMode;
FilePickerStatus curStatus;
FilePickerSelectCallback selCallback;
@ -148,7 +150,7 @@ class FurnaceFilePicker {
void filterFiles();
void clearAllFiles();
void updateEntryName();
void readDirectory(String path);
bool readDirectory(String path);
String normalizePath(const String& which);
bool isPathAbsolute(const String& p);
void addBookmark(const String& p, String n="");