There is only one function, so it's not too involved. Which is the point.
makeMenu(x1,y1,x2,y2, _path,_noFiles,_noFolders,_noCD,_noSelectFolders)
Let me explain.
- x1 and y1: Numbers. These are the TOP LEFT coordinates of the file manager interface. Defaults to the top-left corner of the screen.
- x2 and y2: Numbers. The same thing, but for the BOTTOM RIGHT coordinates. Defaults to the bottom-right corner of the screen.
- _path: String. The directory that the file manager starts out in. Defaults to root. ("/")
- _noFiles: Boolean. If true, will filter out all files from the list. I just added this feature just in case. Defaults to false, of course.
- _noFolders: Boolean. Same thing, but filters out all folders instead. Again, if you need it. Also prevents you from selecting the current directory. Defaults to false.
- _noCD: Boolean. If true, then you won't be able to change directories, as well as selecting the current directory. Defaults to false.
- _noSelectFolders: Boolean. Pretty self-explanatory; if true, will prevent you from selecting any folders. You can still navigate them. Defaults to false.
- _doHidden: Boolean. If true, will display hidden files and folders (starts with '.'). Defaults to false.
- _p: Table. This is where you could add a custom table of colors. Look inside the code to see which table entries you have to change.
- _canClose: Boolean. If true, a button labeled 'close' will be at the top-right part of the screen to click. Defaults to false.
It is impossible to have _noFiles and _noFolders true at once, so don't try.
If anything goes wrong, or if you click 'close', then it will return false instead of a string.
CONTROLS:
Use the mouse to select items on the menu.
Use LEFT/RIGHT CLICK to select files or navigate in folders.
Use MIDDLECLICK to return folders instead of going in them.
Use MOUSEWHEEL or UPARROW and DOWNARROW to scroll up and down.
Use PAGEUP or PAGEDOWN to go up and down exactly one page's worth.
Use HOME and END to go to the top and bottom, respectively.
Use ENTER to return the current directory.
makeMenu(
insert arguments here) will return the path of the file/folder selected.