Game Development Community

Howdo you change the fontsize of a GuiTextCtrl?

by Gregory Martino · in Torque Game Engine · 01/15/2005 (10:14 am) · 2 replies

I'm using a GuiTextCtrl to display messages on the screen during the game, but the font size is kinda small.

new GuiTextCtrl(TruckLockedLabel)
{
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "300 300";
extent = "147 84";
minExtent = "8 8";
visible="0";
text = "\c4mission info";
maxLength = "255";
fontSize = "48"; //doesn't seem to do anything
};

I've tried different values of fontSize, putting the number with and without the "". Nothing seems to change the font size.

Is it something you need to add to the string itself like the color tag \c4 ?

#1
01/15/2005 (10:40 am)
You set the font size in the profile. Take a look at client/ui/defaultGameProfiles.cs and customProfiles.cs
#2
01/15/2005 (11:27 am)
Thanks, poking around common/ui/defaultprofiles and I found an existing profile that does what I need:

profile = "GuiMediumTextProfile";

Has fontSize = 24; Much more visible than the default which seems like 8.