Game Development Community

Question about GuiControlProfile's

by Emil Diego · in Torque Game Engine · 06/09/2005 (7:44 am) · 3 replies

I am setting up a new interface and I am completely customizing the look and feel of it. I have been playing around with creating Custom GuiControlProfiles for my interface. There are a couple of control's, however that I am not sure how to modify.

For ex: the Audio Volume Slider (optAudioVolumeMaster).
How do I change the color of the tick marks?
How do I change the length of the tick marks?

In general is there any documentation on all of the parameters that can be set for each control?

Thanx in advance for the help.

#1
06/09/2005 (8:10 am)
There are no parameters for changing the color or length of the tick marks. The ticks are created in GuiSliderCtrl::onRender. There is a block for the horizontal and then the vertical line drawing code. Each section has 2 calls to glVertex2i representing the start and ends of the lines. You would need to modify this to change the length.

To change the color is simpler. Change the glColor4f(0, 0, 0, 1); call to the RGB value you want or add in a console method and a variable so you do this on the fly instead of hardcoding it.
#2
06/09/2005 (9:02 am)
Thanx. I was able to change it. Do you know of any docs that contain all the parameters for all the different control types?
#3
06/09/2005 (10:10 am)
GuiControlProfile::initPersistFields in guiTypes.cc lists the profile parameters available. Check in guiTypes.h for more details on the different profile parameters.

For other parameters available for the control check the initPersistFields function of those controls or in the console while in the game type use the dump command on the control. For example, you have a button with an id of 1234. In the console type in 1234.dump();