Skip to main content

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() 

time

Project details


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybfcontrol-0.0.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file pybfcontrol-0.0.2.tar.gz.

File metadata

  • Download URL: pybfcontrol-0.0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for pybfcontrol-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cb327b008232e30736041539e2c7d154c255702350c3116f94c4aa7347ed7f67
MD5 653b287300b002a87b90075501c8bbc8
BLAKE2b-256 db4e9201f73ad41c3d94648c031133e14b6767fe7ecb5f097a264a430b97229f

See more details on using hashes here.

File details

Details for the file pybfcontrol-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pybfcontrol-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for pybfcontrol-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d84c24b4ae80379dc5c1fa6752334c16127d7754414fbfc9f2cf35a486ef1ca
MD5 4026e44a795e7b2e754f01d9a42907ae
BLAKE2b-256 c64c297b4e8e886ca23c2049285a943196bed35850f0faef2be48282d61b35ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page