Hello, I’m working on a poker app which has 6 different clickable buttons. I want to show different images when two combinations of the buttons are selected.
Button names:
Button
Cutoff
Highjack
Lowjack
Big Blind
Small Blind
If button #1 and button #2 are selected, I want to display one image.
If button #1 and button #3 are selected, I want to display a different image.
And so on for every single combination of buttons.
What’s the best way to approach this? I’m also trying to optimize for speed, where different images load very quickly.
I decided to abandon the project because there are just so many different preflop combinations. Right now, you’re just talking about simple single raised pots but you’re forgetting all the combinations of 3bets, 4bets, multiway, etc.
BUT… if you have the guts to take this on, it’s actually not that hard.
You’ll do this with custom states. When buttons are clicked, set their states to “yes” and then for each image, make a conditional statement that makes it visible only when specific combinations of buttons are in the state of “yes”