A package for adding scrollbar to surfaces in pygame.
Project description
Pygame-Scrollbar
Overview
The Pygame-Scrollbar package provides classes and utilities to implement scrollable interfaces in Pygame applications. It includes components such as scroll bars, content bars, and event handlers to enable smooth scrolling functionality.
Classes
- ScrollBarManager: Manages the creation and rendering of scroll bars.
- ContentBar: Represents individual content bars within a scrollable interface.
Installation
You can install the package via pip:
pip install pygame-scrollbar
Usage
Here's a basic example demonstrating how to use the Scrollable Interface Package:
import pygame
from scrollable_interface import ScrollBarManager, ContentBar
# Create content bars
content_bar1 = ContentBar(size=(100, 50))
content_bar2 = ContentBar(size=(100, 50))
content_bar3 = ContentBar(size=(100, 50))
content_bar_list = [content_bar1, content_bar2, content_bar3]
# Create a scroll bar manager
scroll_bar_manager = ScrollBarManager(size=(20, 200), content_bar_list=content_bar_list, position=(0, 0))
# In your main loop:
while running:
# Update the window
window.fill((255, 255, 255))
scroll_bar_manager.show(surface=window, window_height=window_height)
pygame.display.update()
Documentation
For detailed documentation, please refer to the github repository.
License
This package is licensed under the MIT License.
Contribution
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygame_scrollbar-1.1.0.tar.gz.
File metadata
- Download URL: pygame_scrollbar-1.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bda143d59f63026b3457ba586dec489ae55f2f495bd11dc7ac37a259ebc09d10
|
|
| MD5 |
585190eea9adc94af62d6f2aba6f7e74
|
|
| BLAKE2b-256 |
30be1751dfd9beff9b1521b5da5afa7ea85d69f658a88cb8005c796b79d495ac
|
File details
Details for the file pygame_scrollbar-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pygame_scrollbar-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50237069c5a715157d2da52a223454cccd7f0b794d1e3dc138775af1012eb2b7
|
|
| MD5 |
d1de80955b1dee30a47089787138eb3e
|
|
| BLAKE2b-256 |
4b52075f24cb7fe12f6a227c205496754f12d8959ae0513e6ab3676baa6e6e73
|