Profiles
by baylor wetzel · in Torque Game Builder · 07/06/2006 (10:49 am) · 5 replies
Sorry for all the questions. i'm a trial user and am trying to learn what i can in the time allotted
As far as i can tell, you cannot set borders, color, font size, bold, text alignment, etc. in the GUI builder. Instead, you specify the control's profile (GuiTextCtrl, GuiButtonCtrl, etc.) and it sets all that for you. i'm not sure where these profiles live. i was hoping there was a directory where i would find them and where i could drop in my own
Is there a way to create one's own profile? i'm sure there must be. How would one do this?
As far as i can tell, you cannot set borders, color, font size, bold, text alignment, etc. in the GUI builder. Instead, you specify the control's profile (GuiTextCtrl, GuiButtonCtrl, etc.) and it sets all that for you. i'm not sure where these profiles live. i was hoping there was a directory where i would find them and where i could drop in my own
Is there a way to create one's own profile? i'm sure there must be. How would one do this?
About the author
#2
07/07/2006 (2:00 pm)
TGB/games/common/gui/profiles.cs
#3
07/07/2006 (2:03 pm)
For me to use this, where would i put this? Do i create a file named, um, MyProfile.profile and put it in some directory somewhere? Do i just create it like normal code in gamescripts/MyProfile.cs?
#4
07/07/2006 (2:05 pm)
Ah, i asked about the directory just before Midhir pointed it out. i see how it's done now. And i can see what all those pre-existing profiles do so i can figure out which ones to use! Thanks
#5
07/07/2006 (3:58 pm)
So as not to mess with common, I would suggest you put your profile script file in the gui folder for your project and then exec it from the main.cs in that project folder.
Torque Owner Thomas Buscaglia
new GuiControlProfile (GuiMenuButtonProfile) { opaque = true; border = true; fontColor = "7 9 169"; fontColorHL = "100 100 100"; fillColor = "232 232 232 0"; fixedExtent = true; justify = "center"; canKeyFocus = false; // font fontType = "Libel Suit"; fontSize = 25; fontCharset = CHINESEBIG5; };If you're curious what all the fields are, here's a list dump()'ed from a default GuiControlProfile:
Hope this helps.
Edit: I almost forgot, you're gonna want to exec your profile definitions from your main.cs so you have them in the editor without running your project.