Merge pull request #3049 from eska014/fix-exp-slider
Fix setting Sliders in exponential mode
This commit is contained in:
commit
75e88b8b9e
1 changed files with 2 additions and 2 deletions
|
@ -50,9 +50,9 @@ void Slider::_input_event(InputEvent p_event) {
|
|||
grab.pos=orientation==VERTICAL?mb.y:mb.x;
|
||||
double max = orientation==VERTICAL ? get_size().height : get_size().width ;
|
||||
if (orientation==VERTICAL)
|
||||
set_val( ( ( -(double)grab.pos / max) * ( get_max() - get_min() ) ) + get_max() );
|
||||
set_unit_value( 1 - ((double)grab.pos / max) );
|
||||
else
|
||||
set_val( ( ( (double)grab.pos / max) * ( get_max() - get_min() ) ) + get_min() );
|
||||
set_unit_value((double)grab.pos / max);
|
||||
grab.active=true;
|
||||
grab.uvalue=get_unit_value();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue