Home > pgui

pgui

Pgui is a project mainly written in Python, based on the GPL-2.0 license.

Python IMGUI library

PGUI - IMGUI Python library

PGUI is a project I originally wrote during christmas 2009 when visiting my parents. I forgot about the while project until I found it again a while ago. It still has a lot of improvements but currently it has a theme support and most of the common widgets work. PGUI requires pygame library.

Current widget list:

  • Button
  • CheckedButton
  • ScrollBar
  • TextBox
  • Text
  • CheckBox
  • EditText

PGUI also has support for automatic layouts:

  • HorizontalLayout
  • VerticalLayout
  • GridLayout
  • AlignLeft

Layouts work by using Python with statement:

with VerticalLayout((300,10),(300,300)):
    Button('1')
    Button('2')

    with HorizontalLayout():
        Button('3')
        Button('4')

Check out the test.py for example of how to use the library.