0 votes

I'm creating a game in which I need to create a list of colors, but the player can only choose 4 colors at once, how can I do that?

obs: I've tried ItemList and PopupMenu so far, and both didn't work as intended yet... And if you guys know any other way of doing it please feel free to share

Godot version 3.2.3
in Engine by (19 points)

3 Answers

0 votes
Best answer

I've already solved it. I've created 4 OptionButtons, that will accept only one color option each, and created an error message that shows up everytime two or more buttons have the same option checked :) Idon't know if it's the best solutions, but it has been working fine so far.

But anyway, thanks for the great ideas and investing your time on helping me.

by (19 points)
0 votes

Would four separate colorpickerbuttons or colorpickers nodes help in your case?
This does mean that the same color could be chosen.

by (244 points)
0 votes

You could try creating a list yourself with a bunch of buttons. Just keep track of which ones are selected and if more than four are selected, deselect the latest one.

by (8,528 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 Frequently asked questions and 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 [email protected] with your username.