Skip to main content

Simple UI Library for pygame

Project description

PyGameUI Is a PyGame UI Library that adds simple UI for with the use of PyGame

Setting up a simple setup:

in your Main Class write:

if __name__ == "__main__":
  pygameui.setup(YourMainScene())

and also make a Script and add a class to that script in my Case "YourMainScene"

class YourMainScene(PyGameScene):
  def update(self):
    # Write your Code here that Should only run when the Window is updated
  def render(self,screen,events):
    # Write your Rendering Code here

now lets say you want to add a Button then write a snippet like this in update:

self.drawables.append(Button("Here Goes the Button Text",
  (Here Goes a tuple of 2 ints that is the center of the button),
  (Here Goes a tuple of 2 ints that is the size of the button),
  heres a reference for what should happen when the button gets clicked(lamda supported),
  [Heres a list of values that should be passed onto the on_clicked methode]))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_pygame_ui-0.1.7.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_pygame_ui-0.1.7-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file simple_pygame_ui-0.1.7.tar.gz.

File metadata

  • Download URL: simple_pygame_ui-0.1.7.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for simple_pygame_ui-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b1ac633205cf4de49f52cfc0a7de3ed4e268de6c5498974040beb4a406db0291
MD5 1d0b9cfdb437282314e8f8941240001c
BLAKE2b-256 41010c90be6f6ebb889a5a2405d5484b357b63cbdc0e450a4710eeda8cb2b4af

See more details on using hashes here.

File details

Details for the file simple_pygame_ui-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_pygame_ui-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cb5a31c58e572fe8d2d5168a91750a2e2b771c3e10cf40cabe69faecf17e2efa
MD5 54d130bb8cb613bbe74d886e8b36a466
BLAKE2b-256 a5d6f854bee52414a7ac3ece255b4d60c3d8190dd8e20ab6372090dfc7d0e1ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page