"Select File" action
caelaThinx opened this issue ยท 0 comments
My actually really cool idea
Just like when you want to open/select a file in a program and it opens this "Open/Select File" window of File Explorer where it lets you browse and select the file you want to open. This action would open the same OS-specific Open/Select File popup as extra window, and would talk back to Minecraft/FancyMenu when a file got selected or the selection got cancelled.
The action should have a setting to customize the file type that the Open/Select File window is looking for - The box with the label: All Files (*.*). With that capability I could have it only look for .png files if I'm doing something like a wallpaper.
How would this work?
You should be able to specify in the action where the selected file is copied to (inside the MC instance directory AND .minecraft, exact same logic as all other file-related actions). The target path would include the file name, just like the Copy File action.
It is important that the Open/Select File popup has full access to the whole OS and is not sandboxed like the target path, because the user has to select the file, so it can't be abused by automating it. The popup should be cross-OS compatible (showing native Windows select popup on Window, native macOS one on macOS, etc. -- LWJGL maybe has a helper for that).
Next, I'm gonna explain how this would work when used. So, lets say that within this Open/Select File popup I select an image called "keksuccino.jpeg" from "C:\Users\User\Downloads" and I have this file set to be copied to the new file path of: /config/fancymenu/assets/background.jpeg. Now when I use the image /config/fancymenu/assets/background.jpeg it should be the same image as I'd previously uploaded ("keksuccino.jpeg").