Metadata-Version: 2.1
Name: pgpyui
Version: 0.0.4
Summary: The package is an add-on for Pygame to create a user interface on the screen.
Home-page: https://pypi.org/project/pgpyui/
Author: Memdved
Author-email: mixail.vilyukov@icloud.com
Project-URL: GitHub, https://github.com/Memdved
Keywords: ui gui pgpyui pygame
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.1

# pgpyui 0.0.4

pgpyui is an add-on module for pygame to create a user interface.

## Installation

```
pip install pgpyui
```

## Usage

### Button

Imports
```python
from pgpyui import button
import pygame
```

РЎreating a button
```python
button = button.Button((100, 100), (200, 100), "Some text", func, sprite="sprites/sprite.png")
```

Event handling
```python
button.check_events(event)
```

Drawing
```python
button.draw(window)
```
#
### Text Area

Imports
```python
from pgpyui import textarea
import pygame
```

РЎreating a text area
```python
textarea = textarea.TextArea((200, 100), (100, 100), 20, 15, is_enter=False, font="Arial")
```

Event handling
```python
textarea.check_events(event)
```

Drawing
```python
textarea.draw(window)
```

Information output
```python
text: list[str] = textarea.return_texts()
```

#
### Slider

Imports
```python
from pgpyui import slider
import pygame
```

РЎreating a slider
```python
slider = slider.Slider((200, 100), (100, 100), 100, orientation="True")
```

Event handling
```python
slider.check_events(event)
```

Drawing
```python
slider.draw(window)
```

Information output
```python
prgrs: int = slider.return_progress()
```

## Documentation

### Button

**Parameters:**

* `position`: The position of the button.
* `size`: The size of the button.
* `text`: The text on the button.
* `function`: The function to be called when the button is clicked.
* `sprite`: A sprite to use for the button (optional).

### TextArea

**Parameters:**

* `position`: The position of the text area.
* `size`: The size of the text area.
* `font_size`: The size of the font.
* `max_symbols`: The maximum number of symbols that can be entered.
* `is_enter`: Whether or not the enter key should be allowed.
* `font`: The name of the font to use (optional).

### Slider

**Parameters:**

* `position`: The position of the slider.
* `size_block`: The size of the block slider.
* `len`: Length of slide.
* `max_symbols`: The maximum number of symbols that can be entered.
* `orientation`: Horisontal or vertical slider. (optional)


## License

MIT

## Author mail

mixail.vilyukov@icloud.com
