Change Log

0.09

New Features

  • Adding a BGE System subclass (bgui.bge_utils.System) to make it easier to get Bgui up and running in the BGE, which is the only environment it currently supports anyways. The layout code might eventually get moved into bgui.System. The simple example has been updated to make use of the new BGE system, but the other examples have not yet been updated.
  • Image widgets now have an image_size attribute that returns the pixel dimensions of their loaded images. (thanks to reach.me.et)

Bugs Fixed

  • The outline_color for Labels was grabbing the color value instead of outline_color if outline_color was set via the constructor. (reported by SolarLune)
  • position and size attributes and properties should now accept tuple values without crashing. (reported by SolarLune)

Other Stuff

  • Widget names are now optional, which reduces the amount of typing for creating new widgets. However, to make name an optional argument required switching the arguments for the Image and Video widget constructors. All other widgets should work without changes to users’ code.
  • The default ListBoxRenderer now tries to display the item as a string instead of using __repr__ directly. This makes the most basic case (a list of strings) display correctly without extra fuss.
  • Switching some logic so BGUI_DEFAULT is 0. This simplifies passing options to a widget constructor. For example, no more BGUI_DEFAULT | BGUI_CENTERED mess. However, this can break existing setups. In order to make this work, BGUI_NORMALIZED is now BGUI_NO_NORMALIZE and BGUI_THEMED is now BGUI_NO_THEME. If you’re relying on these flags, you will have to update your scripts.
  • Getting rid of Widget._cleanup() since we should have working destructors with all the WeakRefs.
  • Image, TextInput, and Widget have had their default size parameter changed from [0, 0] to [1, 1]. This may break some scripts.

0.08

New Features

  • FrameButton, TextBlock and TextInput now have a LabelSubTheme theme option which can be used to control the subtheme used for the underlying labels in these widgets.
  • Labels can now have outlines.
  • Widgets now have a z_index value for additional control over drawing order. (thanks to andrew-101)
  • New animation system that allows for any property of a widget to be animated using the Animation and ArrayAnimation classes along with Widget.add_animation().
  • The minification and magnification filters to use for Image widgets is now user settable between two possible values: BGUI_NEAREST (crisper) and BGUI_LINEAR (smoother). (thanks to SolarLune)

Bugs Fixed

  • Issue #25: “Image from image widget is repeated when using animated tiled textures”

Other Stuff

  • Labels now have a fixed height based on the font instead of the individual characters in the string. This makes the default ListBoxRenderer have consistent spacing between elements.
  • The default color for all four corners of a Frame are now (0, 0, 0, 0) as opposed to the blue/white gradient.

0.07

New Features

  • An ImageButton widget has been added.
  • A simple animation system has been added that allows widgets to move over time using linear interpolation.
  • The Video widget can now also play the audio from a video file if play_audio=True.
  • FontSize on labels is now themeable.
  • Two new utility functions for TextInput: select_all() and select_none(). (thanks to jplur)
  • TextInput now supports the delete key.
  • Widgets now have on_mouse_enter and on_mouse_exit callbacks.

Bugs Fixed

  • The system’s size now updates if the viewport size changes.
  • Issue 11: Externally resetting text input contents breaks selection. (thanks to jplur)

Other Stuff

  • Widgets can now define various _handle_*() methods that match the callbacks. This allows subclasses to use callbacks without interfering with the user-defined ones.
  • The themeing interface has been updated to simplify access to theme options.
  • System is now a subclass of Widget to simplify code and reduce code duplication.
  • Bgui now uses weakrefs to break dependency cycles and allow Python’s GC to clean up widgets. This should solve most memory leak problems with Bgui.

0.06

New Features

  • Multiple Image widgets can reuse the same image file for efficiency (thanks to andrew-101)
  • ListBox widget
  • Image.texco is now exposed allowing for UV coordinates to be changed (thanks to jplur)

Bugs Fixed

  • Images would loose their “on_hover” when they were clicked on
  • When removing a widget, that widget’s cleanup method is now also run
  • Issue 3: Positioning of TextBlock is off when not passing BGUI_NORMALIZED

Other Stuff

  • Various TextInput improvements (thanks to jplur and Gomer)
  • Updated demo (thanks to jplur)
  • Moving or resizing a widget now affects it’s children

0.05

New Features

  • ProgressBar widget (thanks to andrew-101)
  • Widgets now support sub-themes (similar to CSS classes)
  • Widgets now have an aspect option to lock the aspect ratio of the widget
  • Widgets can now be “frozen” with the frozen property (thanks to Kupoman)
  • Themeing supoprt and color property added to FrameButton (thanks to Kupoman)
  • Newline (n) support added to TextBlock widgets
  • Overflow options added to TextBlock widgets (thanks to Gomer)
  • Support for a “prefix” added to TextInput widgets via a prefix property (thanks to Gomer)
  • on_enter callback added to TextInput widgets

Bugs Fixed

  • BGUI now plays nice with “Show Physics Visualizations”
  • Various OpenGL state bug fixes
  • VRAM leaks from Image and Video widgets

Other Stuff

  • Mouse focus is now more “intuitive” (thanks to Gomer)
  • Available usable keys for TextInput expanded (thanks to Gomer)

0.04

New Features

  • Font point sizes for Labels now scale with the screen height (1000px is the baseline). This isn’t “correct” but it makes things a lot easier. This can be disabled by setting System.normalize_text = False
  • TextBlock widget added for displaying multi-line text
  • Image widgets now have an aspect option

Bugs Fixed

  • ENTERKEY added to keydefs to better match Blender
  • TextInput now works a little better (no negative cursor and you can input text when you have an empty string)

0.03

New Features

Bugs Fixed

  • BGUI widgets could sometimes clip with scene elements

Other Stuff

  • Widgets are now stored in OrderedDicts to allow for control over z sorting
  • BGUI now uses relative imports so there are less restrictions on where the module is placed

0.02

New Features

  • Video widget to display videos using VideoTexture (no sound support at the moment)
  • TextInput widget to get text input from the user
  • Frame widget to place widgets on (can also be used as a “window”)
  • BGUI can now handle keyboard input
  • BGUI can now handle mouse states (NONE, CLICKED, RELEASE, ACTIVE)
  • Widgets now support on_hover and on_release callbacks
  • Widgets now have a visible attribute
  • Color support added for Labels
  • Alpha blending enabled for Images

Bugs Fixed

  • Drawing labels would disable textures for images
  • BGUI_DEFAULT was misspelled (was BGUI_DEFUALT)

Other Stuff

  • BGUI now uses the bottom left as (0, 0) to match OpenGL

0.01

Initial release