Skip to main content

Lightweight and easy-to-use Immediate Mode GUI library for Python and Raylib

Project description

SGUI - Spelis's GUI Library

A lightweight and easy-to-use GUI library inspired by the ImGui library. The library is written in Python and uses the Raylib library for rendering.

Contributions are very welcome! :D

Features

  • Minimal dependencies
  • Easy to use and integrate

Installation

Manual (GitHub)

  1. Clone the repo: git clone https://github.com/Spelis/sgui.git at a location accessible to your project or script.
  2. Install raylib: pip install raylib
  3. Import the library: import sgui

PyPI

  1. Install the package: pip install spelis-sgui
  2. Import the library:

Building

  1. Build the package: py -m build
  2. Upload to PyPI (optional): py -m twine upload dist/*

Example Usage

import sgui as gui
from pyray import *

# initialize raylib
init_window(800,600,"SGUI Example")
gui.init()
window = gui.Window(10,10,150,150,"Example Window")

while not window_should_close(): # raylib window loop and drawing
    begin_drawing()
    clear_background(BLACK)

    with window: # my gui library :)
        if gui.button(100,"Example Button"):
            print("Button was pressed!")

    end_drawing()

close_window()

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

spelis_sgui-0.0.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

spelis_sgui-0.0.3-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file spelis_sgui-0.0.3.tar.gz.

File metadata

  • Download URL: spelis_sgui-0.0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for spelis_sgui-0.0.3.tar.gz
Algorithm Hash digest
SHA256 585056c1e5c6903c1a2a5bdd011e8d8eb581e381bc0dba48953c443d85848442
MD5 62804f385696584c06e6b179f4237ced
BLAKE2b-256 2aaef9943fc05b893b716deafe0f7ff4248c4ce5b6f912d86e31cad65b7a70df

See more details on using hashes here.

File details

Details for the file spelis_sgui-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: spelis_sgui-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for spelis_sgui-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 26a6278fdcfeb64a3415ede952663f54cfa877d9e4279d679a1aacbe3779b5d5
MD5 801248e43f7805297b3cc464f9c2b585
BLAKE2b-256 e250e983ef6213abdc0e82cc1551b9987bdace5232f4ec010492d74188281751

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