GUI profile confusion
by John Klima · in Torque Game Engine · 07/22/2005 (1:01 pm) · 12 replies
Hi all,
i'm trying to work with gui profiles and i have some confusion. so far i've been able, via copy and paste, to create a custom profile for a check box like this:
okay, no problem.
i now want to create a custom profile for the GUIMLTextEditProfile. my problem is, there is no example of this profile, and when i try to create one from scratch, the control seems to go into a read-only mode. so obviously, there must be a profile property that makes it editable. but i can not find a list of the supported properties for this profile, nor can i find a list of properties for any profile for that matter.
so how can i determine what the valid profile elements are for a given profile type? are they scripted? are they in the C++ source (quick search didnt find what i was looking for)?
is there a document that describes creating custom gui profiles in detail?
THANKS!!!
j
i'm trying to work with gui profiles and i have some confusion. so far i've been able, via copy and paste, to create a custom profile for a check box like this:
new GuiControlProfile (GuiCheckBoxProfile2)
{
opaque = false;
fillColor = "232 232 232";
border = false;
borderColor = "0 0 0";
fontType = "Damn Noisy Kids";
fontSize = 14;
fontColor = "0 0 0";
fontColorHL = "32 100 100";
fixedExtent = true;
justify = "left";
bitmap = "./myCheck";
hasBitmapArray = true;
};okay, no problem.
i now want to create a custom profile for the GUIMLTextEditProfile. my problem is, there is no example of this profile, and when i try to create one from scratch, the control seems to go into a read-only mode. so obviously, there must be a profile property that makes it editable. but i can not find a list of the supported properties for this profile, nor can i find a list of properties for any profile for that matter.
so how can i determine what the valid profile elements are for a given profile type? are they scripted? are they in the C++ source (quick search didnt find what i was looking for)?
is there a document that describes creating custom gui profiles in detail?
THANKS!!!
j
#2
Ahh that's where they are! I kept looking through the sub folders like starter.fps
soooo many files...
Thanks!
j
07/22/2005 (3:48 pm)
Quote:
The definition of GUIMLTextEditProfile can be found in example\common\ui\defaultProfiles.cs.
Ahh that's where they are! I kept looking through the sub folders like starter.fps
soooo many files...
Thanks!
j
#3
Also, here is a link to a skinning tutorial that has a 'default colors' section.
torque.smdlabs.com/media/freeTutorials/skinGUI/page1.htm
B--
07/22/2005 (4:05 pm)
John, if you make some changes to the defaultProfiles.cs, and they don't take affect, there is another file located in /starter.fps/client/ui/customProfiles.cs that also updates some of the settings that are originally defined in defaultProfiles.csAlso, here is a link to a skinning tutorial that has a 'default colors' section.
torque.smdlabs.com/media/freeTutorials/skinGUI/page1.htm
B--
#4
customProfiles is where i was initially messing around. the skin tutorial is cool.
j
07/22/2005 (5:16 pm)
Thanks brandon,customProfiles is where i was initially messing around. the skin tutorial is cool.
j
#5
I was wondering though, how I might go about applying bitmap skins to other controls which don't currently have a bitmapped skin... like a GuiButtonProfile...
Has anyone successfully skinned a GuiButtonProfile? The defaultPrifiles.cs file I have has some properties for a GuiButtonProfile, but no bitmap.. so I added a bitmap from another control.. hoping I'd get some sort of ugly, but recognisable corruption on the screen, but alas, it didn't change anything.
Any clues? pointers? Bitmap templates and .cs file entries? anyone?
Or is it that some controls simply don't support skinning?
07/30/2005 (3:48 pm)
I've just checked out that Video Tutorial and I must say, I'm very impressed with the quality and the presentation... oh, the contents too :)I was wondering though, how I might go about applying bitmap skins to other controls which don't currently have a bitmapped skin... like a GuiButtonProfile...
Has anyone successfully skinned a GuiButtonProfile? The defaultPrifiles.cs file I have has some properties for a GuiButtonProfile, but no bitmap.. so I added a bitmap from another control.. hoping I'd get some sort of ugly, but recognisable corruption on the screen, but alas, it didn't change anything.
Any clues? pointers? Bitmap templates and .cs file entries? anyone?
Or is it that some controls simply don't support skinning?
#6
'F10' from the main menu should let you see exactly how they did it
B--
07/30/2005 (5:50 pm)
I won't bet the farm because I have not browsed though the source code for the button class in awhile, but I think you should take a look at the 'Demo' mission that contains the 'sales pitch' for torque. They have custom bitmap buttons in that demo.'F10' from the main menu should let you see exactly how they did it
B--
#7
07/31/2005 (1:07 pm)
Lots of custom bitmap GUI work in the demo app. Just pop up the GUI Editor (f10) and start exploring to see how things were done. It's there just as much to demonstrate a complex Torque app as it is to sell the engine. :)
#8
B--
07/31/2005 (1:39 pm)
@Ben: I didn't mean 'Sales pitch' in a bad way, just describing the part he should look at. A company should try to sell its product, especially one as useful as TGE. I personally think for $100 everyone should have a copy of Torque. Anymore, you'll spend $100 taking your significant other to a movie and dinner a couple of times.. TGE is easily worth that. :)B--
#9
The Demo uses the GuiBitmapButtonCtrl for the buttons.
I was hoping that there would be a way to texture the regular buttons in the same way as the scroll bars & others, but I think the way GG intended skinning buttons was via the bitmap button control...
Anyone know different?....
{wish mode}
I want to be able to skin the button so I only have to supply the text on each button but have a nice unique style for my game...
{/wishmode}
I've not looked into the code for this yet, I've only really looked at applying the same prinicples for other controls onto a control which has no existing profile...
07/31/2005 (2:02 pm)
Good call with that farm ;-)The Demo uses the GuiBitmapButtonCtrl for the buttons.
I was hoping that there would be a way to texture the regular buttons in the same way as the scroll bars & others, but I think the way GG intended skinning buttons was via the bitmap button control...
Anyone know different?....
{wish mode}
I want to be able to skin the button so I only have to supply the text on each button but have a nice unique style for my game...
{/wishmode}
I've not looked into the code for this yet, I've only really looked at applying the same prinicples for other controls onto a control which has no existing profile...
#10
I wouldn't knock it at all. Just reinstalled it and it still looks mighty fine.
As salespithes go, it's a good one :-D
But of course.. this is slightly off topic.
07/31/2005 (2:06 pm)
Hey, the Demo is what sold it to me :-D I wouldn't knock it at all. Just reinstalled it and it still looks mighty fine.
As salespithes go, it's a good one :-D
But of course.. this is slightly off topic.
#11
B--
07/31/2005 (2:31 pm)
@Jason: months ago I was looking through the source code in the gui section, and have vague memories of openGL type fill color calls being made to the buttons.. That's not to say you couldn't post an updated resource for us! :)B--
#12
Making a resource requires a lot of investigation and specialist understanding. I'm not really ready to do get my hands dirty just yet.. And anyway, you've set the bar pretty high with your last tutorial ;-) How can I compete with that? :-)
If I stumble across the solution, I'll see what I can do about making a resource.
08/01/2005 (8:10 am)
(Chuckles) I'd love to be able to make a resource... unfortunately, I'm still at the investigation and prototyping stage of my game design so I'm not really spending too much time in one area.. just seeing what I can do with the minimal eforrt to see what works and what needs time spending on it.. if a feature takes too much time, it has to be assessed if it's worth it. Making a resource requires a lot of investigation and specialist understanding. I'm not really ready to do get my hands dirty just yet.. And anyway, you've set the bar pretty high with your last tutorial ;-) How can I compete with that? :-)
If I stumble across the solution, I'll see what I can do about making a resource.
Torque Owner Kirk Haynes
GuiCheckBoxProfile2 is the name of your GuiControlProfile instance.
GUIMLTextEditProfile is also a name of the instance of a GuiControlProfile object.
The definition of GUIMLTextEditProfile can be found in example\common\ui\defaultProfiles.cs.
I'm new to this also, and I have not looked at the GUI code very much so I can't tell you what the control fields do but at first scan, I would say these are the two important lines for making it editable.
tab = true;
canKeyFocus = true;
Kirk out