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
Hey, thanks for this release. I was working with the old-school method of bitmap text in the BGE, and I just was having too much trouble with it; for some reason, the text would show up as white in a separate overlay scene, but only if a certain pair of objects were present in the game scene. Anyway, was there a bug with using the BGUI with Multi-texture mode and being unable to draw the text with a different color?
Never mind, the bug was fixed with the recent 2.58a version of Blender. Another question I had was that when newline characters are used with BGUI labels, it seems like the distance moved down depends on the height of the previous line. For example, this line:
THIS IS A NEWLINE
THIS IS A NEWLINE
would display differently from this line:
This is a new line
This is a new line
Is that a bug?
Here is my workaround for work with pixel informations…
With this help, you can set a widget on a absolute position, with pixel correct size and so ^^
Know you can create a button with the size 50×50 pixels on every RESOLUTION!!!
def pixelY(value):
return float(value / bge.render.getWindowHeight())
def pixelX(value):
return float(value / bge.render.getWindowWidth())
def pixelHeight(value):
return float((value-1) / bge.render.getWindowHeight())
def pixelWidth(value):
return float((value-1) / bge.render.getWindowWidth())
How to use… example:
self.progress = bgui.ProgressBar(self, “progress”, percent=0.5, size=[pixelWidth(200), pixelHeight(30)], pos=[pixelX(10), pixelY(bge.render.getWindowHeight()-40)], sub_theme=”Progress”, options=bgui.BGUI_DEFAULT)
Huh. The same multi-texture bug issue is appearing again, this time between two different BGUI versions, and the previous version doesn’t fix the issue… Odd. I guess it’s something in the scene that allows the text to display correctly…?
Okay, I think I found something – it seems like the problem appears when you use a Label and attempt to change the color while an object has both a material and a texture. However, I do have a scene in which I have many objects with materials and a texture (not an image, but a ‘blank’ texture) in Multitexture mode, so isolating the problem appears to be troublesome…
In addition, the BGE crashes every few times I run it – I assume this is a memory issue. Giving Python time to clean up the code or deleting the objects I made myself would be a good idea, huh?
I’m not sure if and when I’ll try to tackle the multitexture problem. However, the memory problem I have tried to address for Bgui 0.07. You could use SVN to grab the latest development version to see if it helps with memory issues.
The latest SVN (BGUI 0.07) didn’t fix the memory issue… 😦 It’s alright, though. It doesn’t appear extremely often (every 6 or 7 runs of the BGE before it crashes Blender). It might be an issue with Blender moreso than your module.