Game Development Community

GUIWindowsControl Bitmap Array Question

by Emil Diego · in Torque Game Engine · 02/28/2007 (8:51 am) · 4 replies

I have looked at a few examples I figured out how to modify the look of some of the GUI controls in the game. The only question I have is about the GUIWindowsControl Bitmap array. It seems that all the examples that I have looked at have al the same dimensions in the bitmap array.

The title bars are always 2 5x23 images and one 38x23.
The title bar buttons are always 17x14 pixels.

Is there anyway to specify the dimensions of the bitmap array components when createing the profile or is that something that needs to be modified in the TGE source code.

Thanks in advance for the help.

#1
02/28/2007 (10:52 am)
Nope. The size of the individual pieces dosn't matter.

What does matter, is the formatting, and alignment.

The engine will just look left to right and use the dividers (most times a pure red) as where one object starts, and the next starts (1px).

No need to specify dimensions.

However, make sure all your buttons are in the same size square, all your corners are the same size square ETC.. Don't change alignment, unless you do it relative to the other "parts".

Also, changing the size, will make this misaligned because some placement of things like the title text and buttons are apparently hard coded, youll need to crack the c++ to change that. (i think)
#2
03/02/2007 (5:47 am)
I figured out the problem. It seems that the default profile had a textOffset property set to "6 6" and the code to place the title bar buttons was using this offset to place them. So if fixed that and everything looks ok now.

I'll have to do a little more digging to see what else uses that textOffest.
#3
03/02/2007 (10:00 am)
I think just the text and buttons.... I forgot about the text offset.
#4
03/02/2007 (12:29 pm)
Yeah, it seems that the buttons are the only components using that text offset.