Skip to content

An extensive module of various tools and tools for creating a modern graphical interface for pygame-ce users

License

Notifications You must be signed in to change notification settings

aratakileo/pygex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
TeaCondemns
Dec 10, 2022
4e96391 · Dec 10, 2022
Dec 10, 2022
Nov 9, 2022
Nov 9, 2022
Dec 5, 2022
Dec 5, 2022

Repository files navigation

PygEx (Pygame Extended)

Extended library for pygame users

Navigation

Preview

Current development version: 0.2.dev1 (the same version will be installed)

Use examples:

This module include:

  • More advanced mouse controller (mouse.py: each button can be in one of four pressing statuses: not pressed, button down, held, button up)
  • More advanced keys input controller (input.py: each key can be in one of five pressing statuses: not pressed, key down, held, key up; key up or key hold for first 0.5s and after that 0.1s)
  • Extensive functionality for manipulating color (by default, all color values of this module are accepted as an argument of functions that are not included in the submodule color.py, are expected only in HEX or AHEX format, and not as in pygame - HEXA, but accepted in RGBA format as and in pygame)
  • Function for calculating the Bézier curve (math.py)
  • Functions for Gaussian blur, mask cutting, generate gradient Surface, and corner rounding for pygame Surface (image.py)
  • Function for more convenient text rendering, with the ability to buffer the font by size, as well as render text by font size both unaligned in any way, and aligned with extensive settings (text.py: pygex.text.render_aligned_text(...) - also include align = pygex.text.ALIGN_LEFT or pygex.text.ALIGN_RIGHT or pygex.text.ALIGN_CENTER or pygex.text.ALIGN_BLOCK, line_spacing, line_number, paragraph_space, size = (..., ...) or (SIZE_WRAP_CONTENT, ...) or (..., SIZE_WRAP_CONTENT) or (SIZE_WRAP_CONTENT, SIZE_WRAP_CONTENT))
  • Drawing the simplest grid (draw.py)
  • Convenient interface for creating and managing a window (window.py: taking screenshots, showing toasts, better full screen mode toggle system, pygex.mouse and pygex.input are also integrated into this interface)
  • Interface for toasts (short text messages) displaying (gui/toast.py)
  • Interface for text hints displaying (gui/hint.py)

Requirements

  • python >= 3.10
  • pygame >= 2.0.1

How to install pygex

To install pygex of current version just use this command

pip install git+https://github.com/teacondemns/pygex.git
for windows
py -m pip install git+https://github.com/teacondemns/pygex.git
for unix/macos
python3 -m pip install git+https://github.com/teacondemns/pygex.git

If pygame installation failed for python3.11, just use this command to fix it

pip install pygame --pre
for windows
py -m pip install pygame --pre
for unix/macos
python3 -m pip install pygame --pre

[Install other versions]