pygmenus


Namepygmenus JSON
Version 0.0.1.8 PyPI version JSON
download
home_page
SummaryA simple menu system for Pygame.
upload_time2023-07-26 19:58:19
maintainer
docs_urlNone
author@JoshuaParsonsCreativity
requires_python
license
keywords pygame menu
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyGMenus

This Python library, PyGMenus, provides an easy and intuitive way to add user interface components to your Pygame applications. It includes features like text boxes, buttons, and drop boxes, with comprehensive event handling and interaction mechanisms. Below is a guide to using each class and its capabilities.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install PyGMenus.

`bash
pip install pygmenus
`

## Usage

`python
import pygame
from pygmenus import Button, DropBox, TextBox
`

## Button

The `Button` class represents a button UI element on your Pygame screen. 

create a button at position (x, y) with dimensions (width, height)
`python
button = Button(screen, 100, 50, 200, 50)
`

It includes the following properties:

- `x`: The x position of the button on the screen.
- `y`: The y position of the button on the screen.
- `width`: The width of the button.
- `height`: The height of the button.
- `color`: The color of the button.
- `hover_color`: The color of the button when the mouse is hovering over it.
- `font_color`: The color of the button's text.
- `text`: The text displayed on the button.

## DropBox

The `DropBox` class represents a drop-down box UI element on your Pygame screen.

creates a dropdown box at position (x, y) with dimensions (width, height)
`python
dropbox = DropBox(screen, 100, 100, 200, 50)
`

It includes the following properties:

- `x`: The x position of the drop box on the screen.
- `y`: The y position of the drop box on the screen.
- `width`: The width of the drop box.
- `height`: The height of the drop box.
- `color`: The color of the drop box.
- `text_color`: The color of the text in the drop box.
- `font`: The font of the text in the drop box.
- `text`: The text displayed in the drop box.

## TextBox

The `TextBox` class represents a text box UI element on your Pygame screen.

creates a text box at position (x, y) with dimensions (width, height)
`python
textbox = TextBox(screen, 100, 150, (800, 600))
`

It includes the following properties:

- `x`: The x position of the text box on the screen.
- `y`: The y position of the text box on the screen.
- `width`: The width of the text box.
- `height`: The height of the text box.
- `border_color`: The color of the border of the text box.
- `text`: The text displayed in the text box.
- `font`: The font of the text in the text box.
- `align`: The alignment of the text box ("left", "right", "center").

## License

[MIT](https://choosealicense.com/licenses/mit/)

Please note: This is a general guide and may need further customization based on the actual attributes of the classes in your library.



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pygmenus",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pygame,menu",
    "author": "@JoshuaParsonsCreativity",
    "author_email": "your.email@example.com",
    "download_url": "https://files.pythonhosted.org/packages/63/f1/25c7dd7de84e13007a4bade443f8182bccc3ca1901e2486b9bc9bd7025bf/pygmenus-0.0.1.8.tar.gz",
    "platform": null,
    "description": "# PyGMenus\n\nThis Python library, PyGMenus, provides an easy and intuitive way to add user interface components to your Pygame applications. It includes features like text boxes, buttons, and drop boxes, with comprehensive event handling and interaction mechanisms. Below is a guide to using each class and its capabilities.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install PyGMenus.\n\n`bash\npip install pygmenus\n`\n\n## Usage\n\n`python\nimport pygame\nfrom pygmenus import Button, DropBox, TextBox\n`\n\n## Button\n\nThe `Button` class represents a button UI element on your Pygame screen. \n\ncreate a button at position (x, y) with dimensions (width, height)\n`python\nbutton = Button(screen, 100, 50, 200, 50)\n`\n\nIt includes the following properties:\n\n- `x`: The x position of the button on the screen.\n- `y`: The y position of the button on the screen.\n- `width`: The width of the button.\n- `height`: The height of the button.\n- `color`: The color of the button.\n- `hover_color`: The color of the button when the mouse is hovering over it.\n- `font_color`: The color of the button's text.\n- `text`: The text displayed on the button.\n\n## DropBox\n\nThe `DropBox` class represents a drop-down box UI element on your Pygame screen.\n\ncreates a dropdown box at position (x, y) with dimensions (width, height)\n`python\ndropbox = DropBox(screen, 100, 100, 200, 50)\n`\n\nIt includes the following properties:\n\n- `x`: The x position of the drop box on the screen.\n- `y`: The y position of the drop box on the screen.\n- `width`: The width of the drop box.\n- `height`: The height of the drop box.\n- `color`: The color of the drop box.\n- `text_color`: The color of the text in the drop box.\n- `font`: The font of the text in the drop box.\n- `text`: The text displayed in the drop box.\n\n## TextBox\n\nThe `TextBox` class represents a text box UI element on your Pygame screen.\n\ncreates a text box at position (x, y) with dimensions (width, height)\n`python\ntextbox = TextBox(screen, 100, 150, (800, 600))\n`\n\nIt includes the following properties:\n\n- `x`: The x position of the text box on the screen.\n- `y`: The y position of the text box on the screen.\n- `width`: The width of the text box.\n- `height`: The height of the text box.\n- `border_color`: The color of the border of the text box.\n- `text`: The text displayed in the text box.\n- `font`: The font of the text in the text box.\n- `align`: The alignment of the text box (\"left\", \"right\", \"center\").\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\nPlease note: This is a general guide and may need further customization based on the actual attributes of the classes in your library.\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A simple menu system for Pygame.",
    "version": "0.0.1.8",
    "project_urls": null,
    "split_keywords": [
        "pygame",
        "menu"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "35256bbd2ffeb5fb79326d375bd7b3c9d79197e0c090a95c67b9b26d4151213e",
                "md5": "f55787bfc0d1e0f7ccca658a367a0c9a",
                "sha256": "d75dda34c52a4aa871db003374a1b14c9c23ba41137fd7b6f011ed741fcae387"
            },
            "downloads": -1,
            "filename": "pygmenus-0.0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f55787bfc0d1e0f7ccca658a367a0c9a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10195,
            "upload_time": "2023-07-26T19:58:17",
            "upload_time_iso_8601": "2023-07-26T19:58:17.806287Z",
            "url": "https://files.pythonhosted.org/packages/35/25/6bbd2ffeb5fb79326d375bd7b3c9d79197e0c090a95c67b9b26d4151213e/pygmenus-0.0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63f125c7dd7de84e13007a4bade443f8182bccc3ca1901e2486b9bc9bd7025bf",
                "md5": "189bcb17d44cbcf0ae18cba6a655bd9c",
                "sha256": "cf1fb69c0cbac8574c5d4c1fd8f219d4adbeb0f7f00791594fd2c7083757c0b8"
            },
            "downloads": -1,
            "filename": "pygmenus-0.0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "189bcb17d44cbcf0ae18cba6a655bd9c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8866,
            "upload_time": "2023-07-26T19:58:19",
            "upload_time_iso_8601": "2023-07-26T19:58:19.259173Z",
            "url": "https://files.pythonhosted.org/packages/63/f1/25c7dd7de84e13007a4bade443f8182bccc3ca1901e2486b9bc9bd7025bf/pygmenus-0.0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-26 19:58:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pygmenus"
}
        
Elapsed time: 0.09765s