Skip to content
forked from ramovsky/Kytten

A major reworking of the Kytten Pyglet GUI framework (Python2 & Python3)

Notifications You must be signed in to change notification settings

Parashurama/Kytten

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kytten is a Pyglet-based GUI library which aims to be easy to use and customizable.

Features

Customizable!

A simple theme editor allows you to create theme files with textures you provide. Textures may contain one or more graphics, you can then use the image region selector to define individual images in a texture, or set the stretchable parts of images that are designed to wrap content.

Simple GUI construction.

Create a Dialog containing multiple widgets in one Python call! For example:

    dialog = kytten.Dialog(
        kytten.TitleFrame("Kytten Demo",
            kytten.VerticalLayout([
                kytten.Label("Select dialog to show"),
                kytten.Menu(options=["Document", "Form", "Scrollable"],
                            on_select=on_select),
            ]),
        ),
        window=window, batch=batch, group=fg_group,
        anchor=kytten.ANCHOR_TOP_LEFT,
        theme=theme)

Dialogs are self-sizing and positioning!

Widgets may be arranged vertically, horizontally, in a grid, or free form.

Scrollable!

You can embed parts of the GUI within a scrollable area, allowing you to create very long menus or documents.

Controls implemented so far:

    Labels
    Text input fields
    Buttons
    Checkboxes
    Sliders
    Scrollbars
    Menus
    Untitled and titled frames
    Section headers and folding sections
    Dropdown menus
    FileLoadDialog and FileSaveDialog
    PopupMessage and PopupConfirm
    ---
    ColorSelectors
    Images
    ImageButtons
    ToggleButtons
    ToggleImageButtons
    DraggableImageButtons
    Multiline Text Input (with clipboard support and autocompletion)
    SelectableImages
    SpinButtons
    TransparentFrames
    AdvancedGuiFrames (with fully customizable look and style : default 9-patch or repeating 9-patch)

You can use the included GuiManager or use your own class.
The included GuiManager renders the interface from an internal framebuffer and only update the internal buffer when needed (for performance reasons)

Dialogs can be anchored to each others.
Controls have hover and double_click callback support.
Documents have clickable links with callback support

You can use the included PageManager class to manage navigation in your application or roll your own.

Requirements

You'll need to update to pyglet 1.1.4 if you haven't already!

If you use a version of Python older than 2.6, simplejson will not be included in Python. kytten will try to use a safe_eval routine to process .json files.

About

A major reworking of the Kytten Pyglet GUI framework (Python2 & Python3)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.2%
  • JavaScript 4.2%
  • CSS 2.6%
  • HTML 2.3%
  • Makefile 0.7%