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 a clear button to the item list editor #1975

Closed
Animus-Surge opened this issue Dec 11, 2020 · 2 comments · Fixed by godotengine/godot#44352
Closed

Add a clear button to the item list editor #1975

Animus-Surge opened this issue Dec 11, 2020 · 2 comments · Fixed by godotengine/godot#44352
Milestone

Comments

@Animus-Surge
Copy link

Animus-Surge commented Dec 11, 2020

Describe the project you are working on

I'm working on an RPG, and I had a traits list that I was just going to hard code in all the possible traits that affect certain features of the game into an OptionButton.

Describe the problem or limitation you are having in your project

I ended up deciding that was a bad idea and not expandable by addons for my game, so I decided to clear out all the itemlists. However, I have to keep clicking the text box of an item, followed by the delete button at the top of the item list editor, and that gets really tedious if you have a whole lot of items for each item list.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I think there should be a clear button in the item list editor so you can quickly remove every item for an OptionButton or similar. Maybe even a dialogue confirming that you would like to do that so it's idiot proof.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

concept

I just copy-pasted the delete icon to the clear button, but you can definitely change that.

I didn't mess with code, I just did a little bit of image editing to get that

If this enhancement will not be used often, can it be worked around with a few lines of script?

I'm not sure, I guess you could write a tool script or something, but I have zero experience with them. You could also just... delete the OptionButton or something, but I feel like adding this would be pretty useful so you don't have to keep deleting/re-adding the OptionButton if you keep changing things.

Is there a reason why this should be core and not an add-on in the asset library?

It's one button, and I feel that it could be quite useful

@Calinou
Copy link
Member

Calinou commented Dec 12, 2020

To distinguish the "clear" option from "delete", I'd rename them to "delete all" and "delete" respectively.

Also, we don't need to offer a confirmation if this operation is undoable (which it should be).

@Animus-Surge
Copy link
Author

I like that naming schemem better, feel like it suits the engine a little. And yeah, should definitely be undoable, making the dialogue redundant

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

Successfully merging a pull request may close this issue.

3 participants