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.1.tar.gz
(6.2 kB
view hashes)
Built Distributions
pybfcontrol-0.0.1-py3.7.egg
(26.1 kB
view hashes)
Close
Hashes for pybfcontrol-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37737e0997f3022ed7664510f4a9c1907ff6c33d35ef3f6b5c393e29704e864a |
|
MD5 | e6e66c0a788f1f700b4dc872c7916a71 |
|
BLAKE2b-256 | f215bbdc7bac566cee7b4de5b0bf3bca70e66fdaa47f715a322852fa5d638087 |