Display an image when two separate buttons are clicked

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:

  1. Button
  2. Cutoff
  3. Highjack
  4. Lowjack
  5. Big Blind
  6. 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.


This is really funny! My first project on Bubble was going to be a preflop advisor like this one: PreflopAdvisor - Optimize preflop strategy with PokerSnowie PreflopAdvisor but I’d use the results of a solver instead.

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”

Good luck!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.