Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Button states

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ShurikeN
Advanced Cheater
Reputation: 0

Joined: 09 Jan 2008
Posts: 84

PostPosted: Sat Dec 27, 2008 2:31 am    Post subject: [C++] Button states Reply with quote

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
View user's profile Send private message
wizardolu
Newbie cheater
Reputation: 0

Joined: 01 Jun 2007
Posts: 23

PostPosted: Tue Dec 30, 2008 11:22 am    Post subject: Reply with quote

can we see your idea that you made?
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Tue Dec 30, 2008 1:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites