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

Add "show all files" option for filesystem menu #2579

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatusGuy
Copy link
Member

For example: choosing the sprite for a bonus block will show a gigantic list mostly of pngs when only the sprites matter

Fix this by only showing the pngs optionally via checkbox

@Vankata453
Copy link
Member

Sometimes, .png and .jpg files are needed for sprites and surfaces. This PR makes it, so those file types could be selected using the "Show all files" option, but that will also show other file types which are not valid for selecting neither sprites or surfaces.

My proposal is that this PR makes it, so FileSystemMenu takes two vectors on initialization: One to indicate required file types to show, and another for additional file types. This way, less commonly used file types would be hidden by default, but still accessible, without invalid file types showing alongside them.

@MatusGuy
Copy link
Member Author

if only it COMPILED!! 😁😁😁😁😁

@MatusGuy MatusGuy requested a review from mrkubax10 August 19, 2023 13:36
@@ -410,13 +410,15 @@ FileObjectOption::FileObjectOption(const std::string& text, std::string* pointer
std::vector<std::string> filter,
const std::string& basedir,
bool path_relative_to_basedir,
std::vector<std::string> additional_filter,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass additional_filter as const reference.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do same for filter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@@ -279,7 +279,8 @@ class FileObjectOption : public ObjectOption
std::vector<std::string> filter,
const std::string& basedir,
bool path_relative_to_basedir,
unsigned int flags);
std::vector<std::string> additional_filter = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

@mrkubax10
Copy link
Member

Could you fix compilation issues?

@MatusGuy MatusGuy marked this pull request as draft December 2, 2023 14:50
@MatusGuy MatusGuy added status:needs-work In progress, but no one is currently working on it (New volunteers welcome) and removed status:needs-review Work needs to be reviewed by other people labels Jan 27, 2024
@MatusGuy MatusGuy closed this May 12, 2024
@MatusGuy MatusGuy removed the status:needs-work In progress, but no one is currently working on it (New volunteers welcome) label May 12, 2024
@MatusGuy MatusGuy reopened this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants