A package to add inputs that work with pygame
Project description
pygame inputs
a python library used to create input boxes and buttons in pygame for a GUI
This is a free open source python library. Please read the license before editing or sharing online
Installation:
- To use the package use the
pip install pygameinputs
command
How to use:
To get started ensure you have pygame. If you don't use: pip install pygame
to get started.
I recommend an IDE when designing an app but is not required.
button creation
Import the button scripts:
from PygameInputs.Button import Button
this line will import the button module from the Pygame Inputs library
To create a button firstly give it an identifier, in this case I am going to give mine an identifier of startGame.
The button has a blueprint and will work straight away without editing any of its attributes however it can be fully customised.
startGame = Button()
Input box creation
Import the input box scripts:
from PygameInputs.TextBox import TextBox
this line will import the textbox module form the Pygame Inputs library
To create a textbox firstly give it an identifier, in this case I am going to give mine an identifier of searchBar.
The textbox has a blueprint and will work straight away without editing any of its attributes however it can be fully customised.
searchBar = TextBox()
Changelog
Version 0.0.1
Initial release for the alpha of the library
Version 0.0.2
Updated some documentation and added extra information to PyPi.
Version 0.0.3
Fixed a bug with the border width property overwriting the background when set to 0
Version 0.0.4
- Added typing indicator
- Added built in event handling within the button and textbox
Future updates:
- Make a horizontal and vertical slider
- Add the ablity for buttons to handle links
If you have any reccomendations or would like to contribute please visit the GitHub and make an issue with the enhancement label
This library is not associated with pygame, it just uses their library to add input functionality
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pygameinputs-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1dc656bfa509ff1a30454f16d0cc9bb18667ee32eb9acc81e5ddffd951cd211 |
|
MD5 | b48ba456adb062ffbcff1943b7f88576 |
|
BLAKE2b-256 | 075c4e27ce395aea7ebf9d41e2ab417487a702dca2a668f294fffd73b221f2e5 |