Open
Description
Goal
A player should be able to choose a file or path on system, to support following use cases:
- choose save location for save files
- load a save file
- load an image as avatar
Main features
- Should provide a class interface like
UIMessageBox
- A callback should be called, with the chosen file/path
- Callback should receive None if no file/path was chosen
- Dialogue should close itself
- Developer can restrict which filetypes can be selected
- To start with: Single file selection
- Callback receives a list of selected files, which is for now always max 1 entry
- Should have a visual representation as a dialogue (border, some bg color)
- Should be scrollable
- Should provide buttons for home directory (and maybe other useful locations if available)
What should be available
- Example within
arcade.gui.examples
- Tests to test the general setup and interaction
- Documentation how to use the file dialogue
Active development
https://github.com/Ibrahim2750mi/arcade/blob/UIFileChooser/arcade/gui/widgets/layout.py#L365
Discussion summary
Main window vs separate window
We go for a a rendered dialogue within the main window, because:
- extra window can be achieved with tkinter or QT
- handling multiple windows within arcade requires a lot of changes to the whole window handling code
Drag
Start without drag support, go for the main features.
Modal
Start without any special modal features, go for the main features.