godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.14k stars 93 forks source link

ItemList item-activated signal -- single-click mode #1967

Open Robin-Wils opened 3 years ago

Robin-Wils commented 3 years ago

Describe the project you are working on

I am working on a dialogue based game, and everything in it is single-click, only the ItemList options are not.

Describe the problem or limitation you are having in your project

The options which the user can select in a ItemList in the game are double-click.

This is not consistent with the rest of the game. We would like this to be single-click too. I get that double-click is likely better for UX, but other frameworks seem to have this option available.

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

A single-click mode option for the "item-activated" signal of the ItemList.

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

The same as the current functionality, only that it listens for single-click instead of double-click. It would be nice to have a "active mode" option which can be set to double-click or single-click.

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

Yes, see previous "active mode" suggestion.

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

Other frameworks have this as well, and it seems to be a often used feature in some cases. It is also something which users don't have to use, so it would just be one more optional feature.

Calinou commented 3 years ago

I'm not sure if this option should be presented as a per-node setting or a project setting ("toggle between single-click and double click to open folders"). For instance, Windows lets you change this in a system-wide manner.

Robin-Wils commented 3 years ago

I am not sure either. I think that per-node would be the most useful one, in case people don't want some behaviour everywhere. Maybe both, one global one to set the default behaviour plus a changeable dropdown or something on the node itself.

Global would work for me personally, but I am not sure of it would apply for everyone.