Implementing Buttons

Tanay Karnik
Mind Map by Tanay Karnik, updated more than 1 year ago
Tanay Karnik
Created by Tanay Karnik almost 4 years ago


Map about how button class should work.

Resource summary

Implementing Buttons
1 Drawing Buttons
1.1 Create the text texture with the point size, color and font
1.2 Query the texture for its width and height
1.3 Add the padding to its width and height to get the size of the background rectangle
1.4 Draw the background rectangle
1.5 Draw the text on top
2 Variables
2.1 Private Variables
2.1.1 bgColor
2.1.2 textColor
2.1.3 width
2.1.4 height
2.2 Public Variables
2.2.1 bgColorActivated
2.2.2 bgColorNormal
2.2.3 x
2.2.4 y
2.2.5 textColorNormal
2.2.6 textColorActivated
2.2.7 text
3 Updating Buttons
3.1 When the user clicks on the button
3.1.1 toggle the bgColor
3.1.2 toggle the textColor
3.1.3 toggle the state of the button
Show full summary Hide full summary


Elliot O'Leary
SCLY 2 - Education - Topic 1 - Class (AQA AS sociology)
Class Differences In Educational Achievement
CAGE and Crime
Yasmine King
Explanations Class inequalities
Yasmine King
Kingdom Animalia
Explanations of class inequalities
Yasmine King
English Functional Grammar Section 2 (Basics) Quiz
Martin Tilney
Class differences in education
Phoebe Fletcher
unit 3: social inequality
Angel Chew