Skip to main content

No project description provided

Project description

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.

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

pyxelext-1.4.3.post4.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file pyxelext-1.4.3.post4.tar.gz.

File metadata

  • Download URL: pyxelext-1.4.3.post4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pyxelext-1.4.3.post4.tar.gz
Algorithm Hash digest
SHA256 a12a5079178d538350cbc28b57ab2f83235cd5d19a4d0860e352025f0bdd74c7
MD5 2f7839ee0f0aabce0cc0641a00e7a6e1
BLAKE2b-256 1fe0cffb87da0858f7aac6645c5a266c48ce5801b2a47a58d8a03507b3506b44

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