+1 vote

I created an list with an ItemList container and I populate it with data that a user can type in.

I want to be able to copy the item and move it to a list so I decided to just copy the item when it's selected by a left mouse click and then paste it when the user clicks an empty area in another list.

I originally wanted to drag and drop but I couldn't find any tutorials on how to do that with text.

Anyway, I'm running into a problem with the signal not being activated. My solution works if I use itemrmbselected but I would rather use a regular left click since I want to port this to an android.

I tried deleted the connection, try it again, tried it with a different container, but none seem to work in that I just use a print statement just see if the signal gets there. No errors, but it doesn't work. Like I said, it works when I click on an empty spot and it work if I use the right mouse button.

In a different area, I was able to use this item_select function to bring focus to an input area so I'm perplexed as I can't get it to work. The only difference is on the one that works, I have a menu system set up whereas in the second one the list is generated afterwards.

Any help would be greatly appreciated!

Godot version 3.3.2
in Engine by (25 points)

1 Answer

0 votes
Best answer

I finally figured out why this was happening.

I was using an itemList and one of the options "Select Mode" in which you could choose "single" or "multi".

Since I wanted to be able to select several items to delete at once if needed, I chose "multi". It did not work for me, in that I was only able to delete one line at a time anyway, but didn't change that selection.

For whatever reason this caused the signal "item_selected" not to trigger. So, by going back to "single" on "Select Mode", the signal started to work again.

by (25 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.