aegis41 / carrots-or-garbage

A game about carrots and garbage
2 stars 0 forks source link

Better Betting Button Solution #4

Open aegis41 opened 8 years ago

aegis41 commented 8 years ago

Currently the betting buttons are an object called objBtnSmall and they have an image index property that starts them on the image in the sprite stack that correlates to their amount. They also have a betting amount property. Also, each one needs a specialized instance name to be controlled.

This would work so much better if there were a way to draw the number on or over the sprite based on the betAmount property, and just leave the instance names alone so that the whole stack could be handled by a with(objBtnSmall) instead. the more buttons that get added, the more jumbled and cumbersome the code is becoming.

It would be nice if in the onCreate event that the betting amount were drawn on top of just a generic button object with a three state sprite for standard, hover, and pressed states.

aegis41 commented 8 years ago

Style that damn button. Do it. DO IT!