Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy File Picker #36

Closed
marth8880 opened this issue Aug 9, 2018 · 1 comment
Closed

Easy File Picker #36

marth8880 opened this issue Aug 9, 2018 · 1 comment
Assignees
Milestone

Comments

@marth8880
Copy link
Collaborator

The goal is to make easier the process of selecting files to add to the File List.

How do we do that? With a tree view, of course!

Logic Flow

  1. User clicks "Easy File Picker" button.
  2. "Easy File Picker" form is shown.
  3. User is prompted to browse for a mod project directory.
    a. This directory path is saved to the user prefs and remembered each time the picker is opened.
  4. Zero Munge creates a nested tree of the entire project by scouring the directory for munge scripts for sides, worlds, common, sound, addme, and shell.
    a. For sides, it looks for munge.bat in all folders located inside data_***\_BUILD\Sides.
    b. For worlds, it looks for munge.bat in all folders located inside data_***\_BUILD\Worlds. Each world will probably also want to check for an existing REQ file in the data_***\Worlds\<world> directory since all of the stock worlds are usually present and unused in data_***\_BUILD\Worlds.
    c. For common, it looks for munge.bat in data_***\_BUILD\Common.
    d. For sound, it looks for munge.bat in data_***\_BUILD\Sound.
    e. For addme, it looks for mungeAddme.bat in data_***\addme.
    f. For shell, it looks for munge.bat in data_***\_BUILD\Shell.
    g. The items in the tree are organized the same way as in the project directory; all the sides are located in a folder called "Sides", worlds in a folder called "Worlds", etc. Sound is treated a bit differently since in most cases there's just one munge.bat file that munges all sound folders.
    h. Each item and folder in the tree view has an associated checkbox. Checking/unchecking a folder checks/unchecks all of its child items. I suspect .NET handles this functionality automatically.
  5. When the user clicks the "OK" button in the form, each checked item's munge script is added to the File List.
    a. Optionally, the user can add more project directories with the "Add Project" button, which goes back to step 3.

Components

  • "Easy File Picker" form containing a TreeView, "OK"/"Cancel" buttons, an "Add Project" button, and a folder select dialog.
  • List of munge script file paths that the picker returns to the main form after closing via the "OK" button. Alternatively we could use a struct but it shouldn't be necessary.
  • Logic for scouring the project directory for the munge scripts.

Wireframes

Form layout:

easyfilepicker_01

Tree view example:

easyfilepicker_02

@marth8880 marth8880 self-assigned this Aug 9, 2018
@marth8880 marth8880 added this to the v1.1.0-beta milestone Aug 10, 2018
marth8880 added a commit that referenced this issue Aug 26, 2018
marth8880 added a commit that referenced this issue Aug 26, 2018
marth8880 added a commit that referenced this issue Aug 26, 2018
marth8880 added a commit that referenced this issue Aug 26, 2018
marth8880 added a commit that referenced this issue Aug 26, 2018
marth8880 added a commit that referenced this issue Aug 26, 2018
@marth8880
Copy link
Collaborator Author

Completed as of b40ad92 - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant