Change the GuiSliderCtrl image
by Tim Kin Chu · in Torque Game Builder · 08/09/2006 (1:48 am) · 0 replies
I want to change the image of the slider.
So I change it at the profile, and make it display properly.
I discover that when mouse is pressed and held on the thumb. It will be shifted to wrong position
as my new thumb image was bigger than the orignal one.
So, I have made the following change in the source, TorqueGameBuilderPro\engine\source\gui\controls\guiSliderCtrl.cc
Then, it can shift to the right place when I press the mouse on the thumb.
However, when I made the whole Gui moving.
It display some ugly thing again.
www.garagegames.com/mg/forums/result.thread.php?qt=48158
So I change it at the profile, and make it display properly.
I discover that when mouse is pressed and held on the thumb. It will be shifted to wrong position
as my new thumb image was bigger than the orignal one.
So, I have made the following change in the source, TorqueGameBuilderPro\engine\source\gui\controls\guiSliderCtrl.cc
GuiSliderCtrl::GuiSliderCtrl(void)
{
mActive = true;
mRange.set( 0.0f, 1.0f );
mTicks = 10;
mValue = 0.5f;
mThumbSize.set(32,49);
mShiftPoint = 17;
mShiftExtent = 32;
mDisplayValue = false;
mMouseOver = false;
mDepressed = false;
}Then, it can shift to the right place when I press the mouse on the thumb.
However, when I made the whole Gui moving.
It display some ugly thing again.
www.garagegames.com/mg/forums/result.thread.php?qt=48158