So, lets say I have an hslider that looks like this ( itm_qnt_ent_from variable dynamically equals the dynamic max amount that I want for the hslider at any given time):

Code:
hslider(450, 514, 150, "horizontalSlider.pcx", 0, 1, itm_qnt_ent_from);



...and lets say I also have a function that looks like this:

Code:
function getslider(var value, var slidmin, var slidmax, var mymin, var mymax)
{
   return ((mymax - mymin) * (value - slidmin)) / (slidmax - slidmin) + mymin;
}



How would I use the getslider function? Would it be like this?:

Code:
int dynamicMaxValue = getslider(itm_qnt_ent_from, 0, 1, 0, itm_qnt_ent_from);

...

hslider(450, 514, 150, "horizontalSlider.pcx", 0, dynamicMaxValue, itm_qnt_ent_from);



Wouldn't the hslider function reject the dynamicMaxValue variable, because it does not accept variables for the max? I guess I am a little confused on how the getslider function would be applied.

Last edited by Ruben; 12/20/14 12:20.