Game Development Community

Customizing gui profiles

by gamer · in Game Design and Creative Issues · 04/05/2006 (4:32 pm) · 3 replies

I want to add a thin border to my GuiMLTextCtrl, so I created the following profile and applied to the gui. The font color changed but there's still no border, any idea why?

new GuiControlProfile(GuiBorderedControlProfile)
{

border="true";
borderColor="64 150 150";
borderThickness = 2;
fontColor = "40 231 240";
};

thanks

#1
09/09/2010 (8:00 pm)
Thats cause if you check the onRender function of a GuITextControl, it does not draw a border like other elements..which is sooo stupid
#2
10/30/2010 (7:28 pm)
new GuiControlProfile(GuiBorderedControlProfile)
{

border="true";
borderColor="64 150 150";
borderThickness = 2;
fontColor = "40 231 240";
};

thanks


Maybe it's Because the line of code borderThickness = 2; should be borderThickness ="2"; just a thought.
#3
07/13/2012 (3:52 am)
I changed the "true" to true.

Here's how I modified (GuiButtonProfile)
opaque = false; // changed from solid color
border = true;
borderColor = "255 0 0";
borderThickness = 2;
fillColor = "255 255 255 120"; // semi transparent
fontColor = "50 50 50";
fontColorHL = "0 0 0";
fontColorNA = "200 200 200";
fixedExtent = false;
justify = "center";
canKeyFocus = false;
// bitmap = "./images/button"; // removed bitmap
hasBitmapArray = false;
category = "Core";

I found out, that the border is drawn as a solid box, then the fillColor is drawn over it. That can hurt if you want just a border to show up.