Game Development Community

Creating a new Profile

by Rex · in Game Design and Creative Issues · 09/10/2005 (8:21 am) · 0 replies

I've been working with GUIs now and found to get a sound associated with the hover & down mouse input, that it's done through the profile = "SomeProfile" assignment in the control in question. That's great and it worked when I created a new AudioProfile[to use a different file] and assigned it as the GuiButtonProfile.soundButtonOver = "myAudioProfile" in defaultGameProfiles where the profile for GuiButtonProfile.soundButtonOver assignment is located. That also worked great, but the 'justify' variable is different and the text on my button is 'left' and not 'center' as I'd like[like the ButtonProfile, just not it's sound...;)]. Basically, I'd like two buttons with the same 'justify' for the text, but different sounds...

This made me believe I needed to create a new xyzProfile[because the sound and the 'justify' weren't right] with this new Profile. I did what I thought I needed to do but my 'new' Profile didn't seem to be working/recognized. My first thoughts were that I didn't create the new Profile correctly and reference it from the correct location. No error in the console, just not working as I hoped.

Can someone direct me to how I can create a new profile in this manner; is this a Cc++ change or is this all scriptable? I see that there is a different buttonControl of a smaller one using inheritence of the Parent class of buttonCtrl, and wonder where I went wrong?

Thanks for any assistance, the GUI stuf is totally baffling me, the documents and tutorials are good at creating them, mechanically; I just don't find much information on Profiles, why a buttonControl doesn't just have a bitmap='s to make it bitmapControl, etc...am I thinking correctly about a new Profile, or is there some variable or bit of code to use that does the dirty work, because neither of the two stock ones, GuiDefaultProfile, and GuiButtonProfile seem to be doing exactly what I want. Creating a GuiBitmapButtonProfile would be something I'm thinking along the lines of...or GuiWesternButtonProfile, etc....do I need to add an If(!isObject) in defaultProfiles and then create it's block in CustomProfiles, or defaultGameProfiles....??? or can all this customizing be done within the control itself in the GUI script??? I also observe some names of the class are double quoted and some aren't?? examples are GuiControlProfile (ChatHudEditProfile) is not double quoted, yet GuiControlProfile ("ChatHudMessageProfile") is in defaultGameProfiles.cs...?!?

About the author

Rex does all his 3D graphics through BrokeAssGames and is currently working on DSQTweaker, Ecstasy Motion, and other interesting projects yet to be revealed. Just ask him about anything DTS/DSQ related, he's happy to help.