Little Bit of Widgetry for PyGame
This is a widget set for creating a GUI using
PyGame. It has been developed over the course of several PyWeek
game competition entries. I am documenting and releasing it as a
separate package so that others may benefit from it, and so that it
will be permissible for use in future PyGame entries.
is designed around a model-view architecture that makes it easy to keep
your GUI in sync with the state of your data. Most Albow widgets are highly customizable, so you can easily create your own
versions with special appearance or behaviour. A theme system provides
a central place to customize colours and fonts on an application-wide
basis, so you can easily give your game's GUI a unique look.
usual complement of basic controls for use in modal and non-modal
dialogs, such as labels, buttons, text fields, check boxes and radio
buttons. Fields can also be used to edit other data types such as
integers and floats. Buttons can be based on either text or images.
- Layout widgets for arranging your controls in rows, columns and grids.
- File navigation dialogs for finding files and getting pathnames for new files.
- Resource management functions for finding and cacheing images, sounds, cursors and other resource types.
and PaletteView widgets make it easy to create tool palettes and other
such things based on an array of cells, with optional scrolling.
- TableView widget for flexible display of scrollable tabular data.
- Menus and menu bars.
- Playing lists of music files sequentially or randomly.
- Can be used with OpenGL.
HumerusAlso available here is Humerus, a framework for
creating games that consist of a sequence of levels, with support for
an optional built-in level editor.
You can browse the Albow
documentation online here.
A screen from Assembly Line. The labels along the top are the tabs of a
TabPanel. The "Products in Stock" are displayed using a TableView, with
two Buttons at the bottom. The Post-It-note-style tabs are also created
using a customized TabPanel. Click for full-size image.
Modal dialogs using Labels, Buttons, IntFields and a CheckBox. The controls are laid out using Row and Grid widgets.
A tool palette created using a PaletteView.
Dialog for requesting a new file name.
Another dialog box, incorporating some custom controls.