bouncing_box.button module¶
A module that contains the class and functions for the Button.
Bases:
object
This class contains all of the functions and variables that is used by the Button.
A function to check if the mouse is over the button.
- Returns
If the mouse is over the button.
- Return type
bool
A function to draw the Button to the screen.
- Parameters
screen (class pygame.Surface) – The screen to draw to.
The Button Dimensions getter.
- Returns
The Button’s dimensions..
- Return type
class:pygame.math.Vector2
The Button height getter.
- Returns
The Button’s height.
- Return type
float
The Button position getter.
- Returns
The Button’s position.
- Return type
class:pygame.math.Vector2
The Button width getter.
- Returns
The Button’s width.
- Return type
float
The Button x position getter.
- Returns
The Button’s x position.
- Return type
float
The Button y position getter.
- Returns
The Button’s y position.
- Return type
float
A function to handle the Button’s input.
- Returns
The input event.
- Return type
class Event
The Button position setter.
- Parameters
pos (class:pygame.math.Vector2) – The new value of the Button’s position.
The Button x position setter.
- Parameters
x (float) – The new value of the Button’s x position.
The Button y position setter.
- Parameters
y (float) – The new value of the Button’s y position.