Skip to main content

PyxelExt are lazy Pyxel extensions.

This is my personal collection of functions that I need, or might need for my game(s).

Install

pip install pyxelext

Functions

Take a look in pyxelext/examples

# pyxelext/line.py

from pyxelext.line import *
line(x1: int, y1: int, x2: int, y2: int, col: int)  # like pyxel.line but returns length of the line in pixel
aline(x: int, y: int, length: int, col: int, angle: int = 0)
poly(*args: ((int, int),), col: int)  # draw a polygon

draw aline in action

# pyxelext/input.py

from pyxelext.input import *
btn_pressed()  # returns button that is currently pressed

# pyxelext/text.py

from pyxelext.text import *
text(x: int, y: int, txt: str)  # pyxel.text but with inline text palette support
textblock(x: int, y: int, txt: str, nl_px: int = 6, drop_whitespace: bool = True)  # Text block with screen wrap

text in action

# pyxelext/physics.py Needs pymunk in order to work.

debug_draw_options() #  pretty much similar to pygame function in pymunk.
static_rect(x: int, y: int, w: int, h: int, col: int, space: pymunk.Space, **kwargs)  # static rectangle from pyxel
static_circ(x: int, y: int, r: int, col: int, space: pymunk.Space, **kwargs)  # static circle
oopv_sleep(space: pymunk.Space, r=0)  # put this in your draw function so bodies in space will be inactive once they've left the pyxel screen

# pyxelext/system.py Adds features to pyxel that are currently not implemented in the main library

set_fullscreen(real_fullscreen: bool = False)  # enables fullscreen, real_fullscreen changes desktop resolution as well
set_windowed()  # enables windowed mode
set_window_icon(icon: PathLike, bytes_per_pixel: int = 4)  # lets you set your own icon for the window title. tested with png and .ico with alpha

MIT License

Copyright (c) 2020 Pierre Geier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for pyxelext 1.4.3.post4

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

Source distribution (sdist)

Source distribution for pyxelext 1.4.3.post4
File Size Uploaded
pyxelext-1.4.3.post4.tar.gz 6.9 kB Details

Release files / pyxelext-1.4.3.post4.tar.gz

Download URL pyxelext-1.4.3.post4.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a12a5079178d538350cbc28b57ab2f83235cd5d19a4d0860e352025f0bdd74c7
BLAKE2b-256 checksum
How to use checksums
1fe0cffb87da0858f7aac6645c5a266c48ce5801b2a47a58d8a03507b3506b44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

1.4.3.post4 This release

1 release file

1.4.3

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