EZSGAME
ezsgame is a library that aims to make the process of creating and manipulating 2D graphics or game development simple, easy, fun, and comfortable as possible for the user.
Instalation
pip install ezsgame
Manual install
Sample
window = Window()
# current count value
current_value = [0] # We use a list so the value can be modified from other scopes
container = Rect(
Pos("center", "center"), Size("30%", "2/4"), styles=Styles(color="white", stroke=1)
)
counter_text = Text(
f"Count is {current_value[0]}", 23, Pos(0, 0), parent=container
).center_at() # This method centers the objects inside it's parent
# Let's make buttons to modify the count
increase_button = Rect(
pos=Pos("right-center", "center"),
size=Size(50, 50),
styles=Styles(border_radius=[5], color="green"),
)
# Lets add an event listerner to the button
@add_event(event="click", object=increase_button)
def increase_count():
# This method will only be called when `increase_button` is clicked
current_value[0] += 1
# We also need to update the text in the counter
counter_text.update(text=f"Count is {current_value[0]}")
decrease_button = Rect(
pos=Pos("left-center", "center"),
size=Size(50, 50),
styles=Styles(border_radius=[5], color="red"),
)
@add_event(event="click", object=decrease_button)
def decrease_count():
# This method will only be called when `decrease_button` is clicked
current_value[0] -= 1
# We also need to update the text in the counter
counter_text.update(text=f"Count is {current_value[0]}")
# Group everthing so you don't have to call draw method one-by-one
counter = Group(container, counter_text, decrease_button, increase_button)
while True:
window.check_events()
window.fill("black")
# Draw the counter
counter.draw()
window.update()
Metadata
Release files for ezsgame 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ezsgame-0.6.tar.gz | 27.7 kB | Without provenance | Details for ezsgame-0.6.tar.gz |
Release files / ezsgame-0.6.tar.gz
| Download URL | ezsgame-0.6.tar.gz |
|---|---|
| Size | 27.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b137d76ff3ea4151e5b5d69fc058d2b69bd7e6b5293b6dcd17992fcc04ccfc7d
|
|
BLAKE2b-256 checksum How to use checksums |
94d72246486708b2446df75a686c179d5649e5f1a75eb219c45b9a63186dde8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.7
|
Security for ezsgame 0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.