Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Improved checklisting for files and FileSelector (WIP)

Author
Message
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 23rd Feb 2011 02:39 Edited at: 23rd Feb 2011 02:40
As I was working on a mapeditor for a future game I felt like it would be nice to have a FileSelector to easily select files to SAVE and LOAD...
Therefore I started coding this little snippet, and I thought it might be useful to someone else aswell...



The FileSelector function is not done, but the first function might be useful as a replacement for the PERFORM CHECKLIST FOR FILES command. It makes sure that FOLDERs are listed at the top, and you can specify a FileExtension to only show those files. You can also skip the FOLDERs completely and only generate a list with the FILEs you want.

Hope this is useful to someone. Comment away...

PS: I know the FileSelector function is a mess, but it's a WorkInProgress...

enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 23rd Feb 2011 20:36 Edited at: 23rd Feb 2011 20:39
An updated version... Now with codesnippet friendly comments...

You can now strip the extensions, and also you can get the selected file in the FileSelector by pressing ENTER...



Login to post a reply

Server time is: 2026-07-17 13:58:58
Your offset time is: 2026-07-17 13:58:58