Since I am not quite familiar with GUi's code and functions I read all the help and tried quite a lot of stuff but it doesn't work the way I want to.
I need a slider to change the Gamma.
I've made the Music Slider but I can't make this one.
Please help.
It works the same way as the music slider. You say, in the slider script, "SetGamma(sldGamma.Value)", or something of the sort. Adding a little check first to see if it's supported.
Quote from: Rui "Trovatore" Pires on Tue 20/02/2007 22:27:49
It works the same way as the music slider. You say, in the slider script, "SetGamma(sldGamma.Value)", or something of the sort. Adding a little check first to see if it's supported.
Thank you. I could not find the similar to SetMusicMasterVolume(sldvolume,value);
System gamma = ; did not work for obvious reason.
The script code:
just before you show a GUI with Gamma Control Slider:
if (System.SupportsGammaControl)
{
Ã, Ã, sliderGamma.Enabled = true;
}
else
{
Ã, Ã, sliderGamma.Enabled = false;
}
on sliderGamma change:
System.Gamma = sliderGamma.Value;
where sliderGamma is a script name of gamma slider GUI control.
The System.SupportsGammaControl check is recommended as gamma changing will not always work (such as it may not work in windowed mode).
And make sure to calibrate Slider.Min/Max/Value properties in the AGS editor to match System.Gamma's range of values (0..200 and set at 100 by default)
You can simplify the first code snippet to just:
sliderGamma.Enabled = System.SupportsGammaControl;
It works the same way, but it's simpler to write out.
Quote from: monkey_05_06 on Wed 21/02/2007 00:08:07
You can simplify the first code snippet to just:
sliderGamma.Enabled = System.SupportsGammaControl;
It works the same way, but it's simpler to write out.
The code I used was the following
if (System.SupportsGammaControl = true) {
SystemGamma == sldGamma.Value
}
else
{
sldGamma.Enabled = false;
}
Thanks all.