Game Development Community

Border around bitmap in gui

by PeterB · in Torque Game Builder · 11/11/2006 (10:58 am) · 3 replies

I have an image in my gui- 'GuiBitmapCtrl'.
It has a thin grey border around it and I can't figure out why. It's probably very simple, but I can't figure it out.

It's a PNG with an alpha channel.

p

#1
11/11/2006 (12:09 pm)
Check which profile you have assigned to the control. The actual profile definitions are in games/common/gui/profiles.cs It's likely the profile has border="1".

You could change it to border="0" but that would change every control using that profile, some of which may want the border present. The alternative is to define a new profile, for example "GuiBorderlessBitmapProfile" and set border="0" within it. Or find a profile that already meets that and use that one instead.

Usually when adding/creating your own profiles, it's a good idea to put them in a new cs file such as "customProfiles.cs" within your game folder rather than editing the existing profiles.
#2
11/11/2006 (1:03 pm)
You're right! ty
#3
12/03/2006 (2:52 pm)
Thanks for posting this. I was going nuts! That grey border is especially noticeable on a black background! I even tried "border = 0;" in the control declaration (because I knew the guiMLTextCtrl did it that way), but it didn't work. I never even *thought* to look in the profiles!