some controls for pygame
Project description
#example
import pygame
pygame.init()
from pybfcontrol.bf_button import BFButton
screen = pygame.display.set_mode((600,420))
def do_click1(btn):
pygame.display.set_caption('i click %s,ctl id is %s' % (btn._text,btn.ctl_id))
btn.text = 'be click'
btn = BFButton(screen, (20,20,160,40),text=u'test',click=do_click1)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
btn.update(event)
screen.fill((255,255,255))
btn.draw()
pygame.display.update()
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
pybfcontrol-0.0.2.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for pybfcontrol-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d84c24b4ae80379dc5c1fa6752334c16127d7754414fbfc9f2cf35a486ef1ca |
|
MD5 | 4026e44a795e7b2e754f01d9a42907ae |
|
BLAKE2b-256 | c64c297b4e8e886ca23c2049285a943196bed35850f0faef2be48282d61b35ff |