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

UX for the Items of OptionButton could be improved #368

Closed
QbieShay opened this issue Jan 9, 2020 · 10 comments · Fixed by godotengine/godot#55823
Closed

UX for the Items of OptionButton could be improved #368

QbieShay opened this issue Jan 9, 2020 · 10 comments · Fixed by godotengine/godot#55823
Milestone

Comments

@QbieShay
Copy link

QbieShay commented Jan 9, 2020

Describe the project you are working on:
Irrelevant to the issue, but worth to mention it's a project done by a number of people.

Describe the problem or limitation you are having in your project:
This is the first time for me where I am using an option button, and the original scene containing the option button was not done by me. I had to modify the options of the option button. Took me solid 30 minutes to find where the options are added to the option button, because they were not present in the inspector so I assumed they were added via code.

Describe how this feature / enhancement will help you overcome this problem or limitation:
I think the UX of adding items to an OptionButton should be unified with the rest of Godot's, which is generally to have a property in the inspector panel on the right. In the case of the OptionButton, I would expect it to show an array that accept Items.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
What I would imagine is for the content of the popup that shows when you press on "items" to show instead in the inspector. This could be a minor change (not sure as I'm not super familiar with the editor code organization). What would be better is to treat the items of an option button as an array/list of dictionaries/resources.

Current look:
optionbuttoncurrent
Items are defined by clicking on the Items button, close to the "anchors" button on the top part of the central view. Clicking that buttons opens this popup:
optionbuttonitem

What I would expect is something similar to this:
items

It would be even better (from a consistency perspective) if it was a regular Array of Dictionaries or Array of Items.

Describe implementation detail for your proposal (in code), if possible:
Not sure, I'm not familiar with that part of the editor code.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't think so.

Is there a reason why this should be core and not an add-on in the asset library?:
I'm not sure this could be implemented with an add-on.

@lentsius-bark
Copy link

I like this idea.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 11, 2020

I think the UX of adding items to an OptionButton should be unified with the rest of Godot's, which is generally to have a property in the inspector panel on the right.

Actually, there are lots of nodes that add buttons to the top toolbar. Sprite, Particles2D, Polygon... to name a few. The actual problem might be that the toolbar isn't really visible/obvious to use for beginners, see #14

@arkology
Copy link

+1. I hate this button (and non-resizable editor). It's not intuitive at all. Item list editor should be in inspector dock.

@stijn-h
Copy link

stijn-h commented Jun 28, 2020

Adding it to the inspector seems too cluttered. We can also open the list upon selecting a node (ItemList/OptionButton/etc.):
il_plugin
Other nodes with toolbar options usually have less essential functionality hidden there. Editing the items is very often a use case, so it can be justified to automatically open the list and take up a portion of the screen.

Let me know if this looks good, then I will open a PR.

@groud
Copy link
Member

groud commented Aug 31, 2021

Thanks to godotengine/godot#52277, it will be easy to move the ItemList items to the inspector. We should likely go that route.

@Calinou
Copy link
Member

Calinou commented Nov 23, 2021

This was implemented by godotengine/godot#54342, closing.

@Calinou Calinou closed this as completed Nov 23, 2021
@Calinou Calinou added this to the 4.0 milestone Nov 23, 2021
@groud
Copy link
Member

groud commented Nov 24, 2021

This was implemented by godotengine/godot#54342, closing.

No, this PR was for ItemList items, not for OptionButton ones.

@groud groud reopened this Nov 24, 2021
@groud
Copy link
Member

groud commented Nov 24, 2021

Ah but it was implemented in godotengine/godot#54533 in fact, so closing again!
Sorry for the spam.

@groud groud closed this as completed Nov 24, 2021
@KoBeWi
Copy link
Member

KoBeWi commented Nov 24, 2021

For some reason I don't see Items property in the OptionButton inspector, nor on the toolbar.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 26, 2021

Yep, ADD_ARRAY_COUNT wasn't implemented for OptionButton (MenuButton is a different node). Right now you can't edit the items at all.

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.

7 participants