Skip to content

Commit 5650148

Browse files
authored
Merge pull request #169 from prashere/documentation/button_pygame
Added a README.md file
2 parents 9e2fb0b + 7081ac3 commit 5650148

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

B/button-in-pygame/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Pygame Button Example
2+
3+
This Python program demonstrates a simple GUI using the Pygame library. It creates a window with two buttons that respond to mouse clicks. When you click a button, it triggers a function.
4+
5+
## Prerequisites
6+
7+
Before running this program, you need to have Python and Pygame installed on your system. You can install Pygame using pip:
8+
9+
```bash
10+
pip install pygame
11+
```
12+
13+
## Usage
14+
15+
- After running the program, a window will open with two buttons.
16+
- The first button, "Button One (onePress)," responds to a single click.
17+
- The second button, "Button Two (multiPress)," allows multiple clicks.
18+
19+
## Customization
20+
21+
You can customize the buttons by modifying the `Button` class in your Python code. You can change button text, dimensions, and behavior by adjusting the class constructor parameters.
22+

0 commit comments

Comments
 (0)