[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] SGC 0.1.5 Released



Nice one Sam.

Creating a button with a custom image looks very simple.
    btn = sgc.Button("btn.png", label="Clicky", pos=(100, 100))

Or:
    surf = pygame.Surface((200, 100))
    btn = sgc.Button(surf, label="Clicky", pos=(100, 100))

Even better... hover states!
    imgs = {"image": "off.png", "over": "over.png", "down": "down.png"}
    btn = sgc.Button(imgs, label="Clicky", pos=(100, 100))


I wonder how sub-classing could fit into this?  Like if I wanted to
make a button that is drawn dynamically every frame with draw.line for
example?


cheers,




On Wed, Jun 20, 2012 at 5:38 PM, Sam Bull <sam.hacking@xxxxxxxx> wrote:
>
> Another new beta release!
>
> This release sorts out theming support and a new tutorial
> (http://program.sambull.org/sgc/tutorial.theming.html).
>
> If you'd like to try it out, download the release code. As long as you
> have Python 2 and Pygame installed, you should be able to run the
> example file immediately.
>
> To use it in your own projects, simply copy the 'sgc' sub-folder into
> the top-level of your project or use setup.py to install it system-wide.
>
> Please check it out at:
> https://launchpad.net/simplegc
>
> As before, you can check out the documentation at:
> http://program.sambull.org/sgc/
> If you'd prefer an offline Devhelp version, there is a separate download
> on Launchpad.
>
> I'd appreciate any feedback on the project or the documentation.
>
> Limitations still in this beta release:
>        No Python 3 support.
>        OpenGL support is not working in this release (next release).
>        There's an issue with transparency, so (0,0,0) means
>        transparency in this release, if you find things are invisible
>        try changing the colour (perhaps (0,0,1)).
>        There's no developer documentation to help write your own
>        widgets.
>
>