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

Make ItemList multi-select easy on mobile devices #7055

Open
ondesic opened this issue Jun 10, 2023 · 3 comments
Open

Make ItemList multi-select easy on mobile devices #7055

ondesic opened this issue Jun 10, 2023 · 3 comments

Comments

@ondesic
Copy link

ondesic commented Jun 10, 2023

Describe the project you are working on

Inventory list on android device

Describe the problem or limitation you are having in your project

Currently the only way to multiselect an item in an ItemList is to press the SHIFT or CTRL button first before clicking on the item. The problem is, you can't press SHIFT or CTRL on a mobile device and so you lose the cross-platform of a Multi-Selectable ItemList.

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

By adding a way for the ItemList to be multi-selectable without SHIFT or CTRL, now all mobile devices or those without a keyboard can use a multi-select ItemList.

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

There are a few ways this could be addressed.

  1. Add to the SelectMode enum a SELECT_MULTI_ONLY mode. This mode makes the ItemList operate as if the SHIFT or CTRL is pressed all the time.

  2. Make a signal that gives the index of the selection WITHOUT selecting the item. This way the uses can choose to use the Select(int idx, single = true) to make the selection manually depending on the platform.

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

Multi-select is a basic function/use of an ItemList and will be used frequently.

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

Single and multi-select is a basic feature of an ItemList node. My project's biggest feature is that it is cross-platform. I use many multi-select ItemLists in my project to organize inventory. To the end user, the ItemList's basic select ability needs to operate the same on the Desktop as the mobile. Any mobile developer hoping to create a game with an ItemList will run into this problem if not fixed.

@havi05
Copy link

havi05 commented Nov 18, 2024

I think the proposal of a toggle mode (#6371) would solve this, but you would have to select each item one at a time.
If you think this is too much work for the user, I could start implementing an additional SELECT_MULTI_ONLY mode.

@ondesic
Copy link
Author

ondesic commented Nov 18, 2024 via email

@havi05
Copy link

havi05 commented Nov 18, 2024

I have implemented the new mode, but now I have noticed that it is impossible (with my current implementation) to select items that are not next to each other. @ondesic Do you have any idea how this new mode should behave in these situations?

2024-11-18.18-58-23.mp4

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

3 participants