Skip to main content

Guipy

Python Version License

Pygame UI Library built by Casey (@caseyhackerman) and Jason

Installation

pip install guipylib

or with poetry

poetry add guipylib

Components

Button

Button

Dropdown

Dropdown

Live Plot

Live Plot

Plot

Plot

Slider

Slider

Switch

Switch

Textbox

Textbox

Example

import pygame

import colorsys

from guipy.components.slider import Slider
from guipy.manager import GUIManager
from guipy.utils import *

winW = 1280
winH = 720

root = pygame.display.set_mode((winW, winH))

man = GUIManager()

mySlider = Slider(height=50, width=500, thickness=5, radius=12, initial_val=0.4)
mySlider2 = Slider(height=50, width=500, thickness=5, radius=12, initial_val=0)
mySlider3 = Slider(height=50, width=500, thickness=5, radius=12, initial_val=0.5)
mySlider4 = Slider(height=50, width=500, thickness=5, radius=12, initial_val=0.5)

man.add(mySlider, (0, 25))
man.add(mySlider2, (0, 75))
man.add(mySlider3, (0, 125))
man.add(mySlider4, (0, 175))

running = True
while running:
    events = pygame.event.get()
    for event in events:
        if event.type == pygame.QUIT:
            running = False

    root.fill(DARK_GREY)

    color = tuple(
        i * 255
        for i in colorsys.hls_to_rgb(mySlider2.val, mySlider3.val, mySlider4.val)
    )
    center = (winW // 2, winH // 2)
    r = 10 + mySlider.val * 100
    pygame.draw.circle(root, color, center, r)
    pygame.draw.circle(root, BLACK, center, r, 3)

    man.update(pygame.mouse.get_pos(), events, root)
    pygame.display.update()

Documentation

Check out some helpful guides and API references here

Metadata

Release files for guipylib 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for guipylib 0.3.1
File Size Uploaded
guipylib-0.3.1.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for guipylib 0.3.1
File Interpreter ABI Platform
guipylib-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / guipylib-0.3.1.tar.gz

Download URL guipylib-0.3.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
98289c28433a3ff0457bbf2d6705a7b3138cf68fb8a2c909cfcef367065b7756
BLAKE2b-256 checksum
How to use checksums
1801e644f567bf84b52b1824bc8f50c4bd6759dab5f855ede1d49fa5cb070089
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-1019-azure

Release files / guipylib-0.3.1-py3-none-any.whl

Download URL guipylib-0.3.1-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
855d3679ad61b56244f56224196098e540128e5f3167361dd2b1f47780955a70
BLAKE2b-256 checksum
How to use checksums
3c3a74de85efe3a1434427a3a0982c8c91ab74c196756139ea67c92df142e418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-1019-azure

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page