null
US
Sign In
Sign Up for Free
Sign Up
We have detected that Javascript is not enabled in your browser. The dynamic nature of our site means that Javascript must be enabled to function properly. Please read our
terms and conditions
for more information.
Next up
Copy and Edit
You need to log in to complete this action!
Register for Free
5262364
Implementing Buttons
Description
Map about how button class should work.
No tags specified
tic-tac-toe
game-development
sdl
class
sdl game development
self learning
Mind Map by
Tanay Karnik
, updated more than 1 year ago
More
Less
Created by
Tanay Karnik
over 8 years ago
4
0
0
Resource summary
Implementing Buttons
Drawing Buttons
Create the text texture with the point size, color and font
Query the texture for its width and height
Add the padding to its width and height to get the size of the background rectangle
Draw the background rectangle
Draw the text on top
Variables
Private Variables
bgColor
textColor
width
height
Public Variables
bgColorActivated
bgColorNormal
x
y
textColorNormal
textColorActivated
text
Updating Buttons
When the user clicks on the button
toggle the bgColor
toggle the textColor
toggle the state of the button
Show full summary
Hide full summary
Want to create your own
Mind Maps
for
free
with GoConqr?
Learn more
.
Similar
HISTOGRAMS
Elliot O'Leary
SCLY 2 - Education - Topic 1 - Class (AQA AS sociology)
Tahlie
Class Differences In Educational Achievement
phoebebutler
English Functional Grammar Section 2 (Basics) Quiz
Martin Tilney
Bible Mind Map
moffahe
CAGE and Crime
Gabzay
Kingdom Animalia
9.schilleraldino
Explanations Class inequalities
Yasmine King
Inequalities
Yasmine King
Explanations of class inequalities
Yasmine King
Class differences in education
Phoebe Fletcher
Browse Library