# PygButtons
A module made to help create a UI in pygame by simplifying the creation and handling of basic UI objects (such as Buttons).
## Contents
- [Installation](#Installation)
- [Dependencies](#Dependencies)
- [Usage](#Usage)
- [Support](#Support)
## Installation
To install, run: `pip install pygbuttons`
## Dependencies
- Python => 3.8
- Pygame => 2.0.1
## Usage
To use the Buttons in a program, it is recommended to perform the following steps:
- Setup
1. Import the module / the contents of the module.
2. Set the settings for the Buttons module (framerate, scroll factor, scaling limits) where appropriate
3. Create the required Buttons
- While running
1. Pass all (relevant) Pygame.Events to the active Buttons in the input loop
2. Draw the Buttons to the active screen
3. Repeat
Getting an output from a Button can be done either by binding a function to the Button (which is then automatically executed when a certain action takes place), or by polling the Buttons value / status.
For a practical implementation, see the [example.py](https://github.com/Jarno-de-Wit/PygButtons/blob/main/Example.py) file.
## Support
For support / issues, please visit the issue tracker on [GitHub](https://github.com/Jarno-de-Wit/PygButtons/issues).
Source code available at: https://github.com/Jarno-de-Wit/PygButtons
Raw data
{
"_id": null,
"home_page": "https://github.com/Jarno-de-Wit/PygButtons",
"name": "pygbuttons",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Jarno de Wit",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/5e/47/0a376e39c582586fd96c8b8183e51c1f46126b7c722545d36979c0885d69/pygbuttons-0.9.5.tar.gz",
"platform": null,
"description": "# PygButtons\nA module made to help create a UI in pygame by simplifying the creation and handling of basic UI objects (such as Buttons).\n\n## Contents\n- [Installation](#Installation)\n- [Dependencies](#Dependencies)\n- [Usage](#Usage)\n- [Support](#Support)\n\n## Installation\nTo install, run: `pip install pygbuttons`\n\n## Dependencies\n- Python => 3.8\n- Pygame => 2.0.1\n\n## Usage\nTo use the Buttons in a program, it is recommended to perform the following steps:\n- Setup\n 1. Import the module / the contents of the module.\n 2. Set the settings for the Buttons module (framerate, scroll factor, scaling limits) where appropriate\n 3. Create the required Buttons\n- While running\n 1. Pass all (relevant) Pygame.Events to the active Buttons in the input loop\n 2. Draw the Buttons to the active screen\n 3. Repeat\n\nGetting an output from a Button can be done either by binding a function to the Button (which is then automatically executed when a certain action takes place), or by polling the Buttons value / status.\n\nFor a practical implementation, see the [example.py](https://github.com/Jarno-de-Wit/PygButtons/blob/main/Example.py) file.\n\n## Support\nFor support / issues, please visit the issue tracker on [GitHub](https://github.com/Jarno-de-Wit/PygButtons/issues).\n\nSource code available at: https://github.com/Jarno-de-Wit/PygButtons\n",
"bugtrack_url": null,
"license": null,
"summary": "Adds basic UI elements for pygame",
"version": "0.9.5",
"project_urls": {
"Bug Tracker": "https://github.com/Jarno-de-Wit/PygButtons/issues",
"Homepage": "https://github.com/Jarno-de-Wit/PygButtons"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4faf75a16a87200cc6a28e10fc26e59a0310d8413f3882bff016f1125273a54",
"md5": "9fb06869f5f93a7744a22de8067c86e4",
"sha256": "f4959541483cb199678fffe3b839266746bd2e6f3695bef7e1760e2f811ba87c"
},
"downloads": -1,
"filename": "pygbuttons-0.9.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fb06869f5f93a7744a22de8067c86e4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 44531,
"upload_time": "2024-08-27T21:54:54",
"upload_time_iso_8601": "2024-08-27T21:54:54.861438Z",
"url": "https://files.pythonhosted.org/packages/e4/fa/f75a16a87200cc6a28e10fc26e59a0310d8413f3882bff016f1125273a54/pygbuttons-0.9.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5e470a376e39c582586fd96c8b8183e51c1f46126b7c722545d36979c0885d69",
"md5": "271daa2d52b07a92b76dd00208b5210d",
"sha256": "f84ac1b93620a5e5f680a52c6bf3af5b03475e58c33085209955f84624e945b0"
},
"downloads": -1,
"filename": "pygbuttons-0.9.5.tar.gz",
"has_sig": false,
"md5_digest": "271daa2d52b07a92b76dd00208b5210d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 37577,
"upload_time": "2024-08-27T21:54:56",
"upload_time_iso_8601": "2024-08-27T21:54:56.717854Z",
"url": "https://files.pythonhosted.org/packages/5e/47/0a376e39c582586fd96c8b8183e51c1f46126b7c722545d36979c0885d69/pygbuttons-0.9.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-27 21:54:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Jarno-de-Wit",
"github_project": "PygButtons",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pygbuttons"
}