A simple GUI library for pygame
Project description
py-GameUI
A Python package to use GUI Widgets like Button, Textinput & Slider in pygame.
Install using:
pip install py-GameUI
Documentation
You could check out the docs at https://aman333nolawz.github.io/py-GameUI/
Usage
import pygame
import py_GameUI
W, H = 600, 600
screen = pygame.display.set_mode((W, H))
elements = [
py_GameUI.Button(
[10, 10, 100, 100],
text="Hello world",
function=lambda: print("You clicked on the button"),
),
py_GameUI.Input_box([10, 150, 150, 20]),
py_GameUI.Slider(10, 210, 10, 30),
]
while True:
screen.fill("#1c1c1c")
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
for element in elements:
element.events(event)
for element in elements:
element.draw(screen)
pygame.display.flip()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-GameUI-1.0.8.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-GameUI-1.0.8.tar.gz.
File metadata
- Download URL: py-GameUI-1.0.8.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
396c4fb1135465dd3c377bc64a5f01c20eb65de1d0a436ab41c3dc0bada4798b
|
|
| MD5 |
837be200c1b20908fa1ef6657e80cfd2
|
|
| BLAKE2b-256 |
b85bf91a0d9d81cae33c8c464a3f3b27fb43579faaf9cc7d835d622d6435f0e6
|
File details
Details for the file py_GameUI-1.0.8-py3-none-any.whl.
File metadata
- Download URL: py_GameUI-1.0.8-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
395766e311b90bc203a06a1bac19630b2fd739f2b04c7f328a2ce2ec17912a7f
|
|
| MD5 |
727102708f2eb3537b2b7a2f8a1c63ed
|
|
| BLAKE2b-256 |
1e42ef40ec18be4b6aad9f0240f66964d6694d8ebc02e6a4e1635dd03bbb3340
|