Category: Bgui


Bgui 0.08 Released

I’m looking to make some breaking changes to Bgui’s API, so I figured it was about time for a 0.08 release (especially since 0.07 was released over a year ago). Some cool changes that people might like include font outlines, a better animation system, and more control over font theming for the TextBlock and TexInput widgets. For more details on the changes, take a look at the changelog.

You can grab the new version from here.

Requirements:

  • Blender 2.6+ (tested against 2.66a)

Haven’t tried out Bgui yet? There is a Getting Started guide in the wiki.

Cheers,
Moguri

Bgui 0.07 Released

A new version of Bgui is way overdue, so here it is. Bgui 0.07 brings quite a few changes including ImageButtons and memory leak fixes. It will also work for newer versions of Blender (such as 2.61). For more details on the changes, take a look at the changelog.

You can grab the new version from here.

Requirements:

  • Blender 2.5+ (2.61 is fine)

There is also a Getting Started guide in the wiki.

Cheers,
Moguri

Bgui ImageButtons: Request for Comments

I currently have ImageButtons implemented in my working copy, but I would like to get some feedback on some details. Here is the constructor and theme options for the new class:

class ImageButton(Widget):
	"""A clickable image-based button."""

	theme_section = 'ImageButton'
	theme_options = {'DefaultImage': (None, 0, 0, 1, 1),
					 'Default2Image': (None, 0, 0, 1, 1),
					 'HoverImage': (None, 0, 0, 1, 1),
					 'ClickImage': (None, 0, 0, 1, 1)
					 }

	def __init__(self, parent, name, default_image=None, default2_image=None, hover_image=None,
					click_image=None, aspect=None, size=[1,1], pos=[0,0], sub_theme='',
					options=BGUI_DEFAULT):
		"""
		:param parent: the widget's parent
		:param name: the name of the widget
		:param default_image: list containing image data for the default state ('image', xcoord, ycoord, xsize, ysize)
		:param default2_image: list containing image data for a second default state, which is used for toggling ('image', xcoord, ycoord, xsize, ysize)
		:param hover_image: list containing image data for the hover state ('image', xcoord, ycoord, xsize, ysize)
		:param click_image: list containing image data for the click state ('image', xcoord, ycoord, xsize, ysize)
		:param aspect: constrain the widget size to a specified aspect ratio
		:param size: a tuple containing the width and height
		:param pos: a tuple containing the x and y position
		:param sub_theme: name of a sub_theme defined in the theme file (similar to CSS classes)
		:param options: various other options
		"""

And here is an example of how to use the new class:

self.audio_button = bgui.ImageButton(self.win, 'ab', sub_theme='Audio',
								size=[0.05, 0.05], pos=[0.75, 0.05])

And the relevant theme data:

[ImageButton:Audio]
DefaultImage=img:audio.png, 0, 0, 0.5, 1
Default2Image=img:audio.png, 0.5, 0, 0.5, 1

Now time for some questions. First off, the theme file is formated as img:filename, x, y, height, width. Should this instead be img:filename, x1, y1, x2, y2? If I changed this, I would also change the *_image arguments in the constructor. Also, should some sort of mechanism be added for user defined states? Currently things are kind of limited, but I’d think users could subclass if they wanted more flexibility. Any other feedback?

Cheers,
Moguri

Bgui 0.06 Released

It’s been awhile since the last Bgui release, so here’s another one. This one doesn’t contain a whole lot of major changes. However, I wanted to do a release before making some bigger changes.

You can view the changelog here.

You can grab the new version from here.

Requirements:

  • Blender 2.5 (2.57 is fine)

There is also a Getting Started guide in the wiki.

Cheers,
Moguri

Bgui Moved to Google Code

I have moved Bgui to Google Code and it can now be located here:

http://code.google.com/p/bgui/

Reasons for the move:

  • Google has much better uptime than I do.
  • My server is just a development server for myself. Now that other people need to post bugs, etc, I figured it was time to move Bgui’s SVN and issue tracking to a more “production” environment.
  • People don’t have to register an account with my issue tracker just to report bugs. Now you just need a Google Account, which are fairly common now.

People that had reports in the Redmine tracker will need to re-add them to the Google Code one. Also, note that even though the project hosting has moved to a more “production” environment, I still consider Bgui to be in beta. I’ll will look into releasing a new version of Bgui sometime this week or next.

Cheers,
Moguri

Bgui gets docs!

I’ve finally gotten around to generating API docs for Bgui using Sphinx. The docs could still use a lot of work, but you can find the docs for the latest development build of Bgui here:

http://stokes.dyndns.org:8443/svn/bgui/trunk/docs/build/html/index.html

As subsequent releases of Bgui come out, the docs will be tagged for specific versions.

Cheers,
Moguri

BGUI 0.05 Released

I realized BGUI was about due for another release, so here it is. Here’s the changelog:

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)

You can grab the new version from here.

Requirements:

  • Blender 2.5 (2.56a works)

There is also now a Getting Started guide in the wiki.

Cheers,
Moguri

BGUI Reaches 100 Revisions!

The revision count for BGUI ticked to 100 today with a new patch from Gomer. You can take a look at the revisions here.

There have been a lot of bug fixes and cleanups since the 0.04 release. I guess it’s almost time for 0.05. 🙂

Cheers,
Moguri

Temporary BGUI Mirror

My server’s uptime has been less than reliable (mostly my fault) and right now I’m running some experiments with Linux, which means the server will in and out for a little bit. Until things are more stable, I’m putting up a mirror to the latest BGUI release (0.04). You can grab it here.

Cheers,
Moguri

BGUI 0.04 Released

Here’s version 0.04 of BGUI. It’s mostly a bunch of tweaks and fixes with a new TextBlock widget. Here is the changelog:

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)

You can grab the new version here.

Requirements:

  • Blender 2.5 (2.55 works)

I’d also like to remind people that I still consider BGUI to be “unstable”/beta software. I’ll try to keep things from breaking, but having a good library comes first. 😉

Also, feedback is very much appreciated!

Cheers,
Moguri