| View previous topic :: View next topic |
| Author |
Message |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Sat Dec 27, 2008 2:31 am Post subject: [C++] Button states |
|
|
what's the better algorithm for managing button states? let's say a button has 3 states, (1) Normal, (2) Highlighted, and (3) Clicked. i have made my own but it's kinda ugly. I had to create 3 separate BitBlt's for each state just to make it work. I want only 1 BitBlt but im kinda confused how to do this.
_________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
wizardolu Newbie cheater
Reputation: 0
Joined: 01 Jun 2007 Posts: 23
|
Posted: Tue Dec 30, 2008 11:22 am Post subject: |
|
|
| can we see your idea that you made?
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Tue Dec 30, 2008 1:10 pm Post subject: |
|
|
| I'm not really sure what you mean, but if you mean that you have three BitBlt's, for 3 different button-images, then instead you could have one image with all the button states on it (an image of the buttons next to each other), and then pass a RECT structure to BitBlt to tell which part of the source image it should blit.
|
|
| Back to top |
|
 |
|