equal
deleted
inserted
replaced
1883 uint16 step = ((ce->max - ce->min) / 20); |
1883 uint16 step = ((ce->max - ce->min) / 20); |
1884 if (step == 0) step = 1; |
1884 if (step == 0) step = 1; |
1885 |
1885 |
1886 /* Increase or decrease the value and clamp it to extremes */ |
1886 /* Increase or decrease the value and clamp it to extremes */ |
1887 value += (x >= 30) ? step : -step; |
1887 value += (x >= 30) ? step : -step; |
1888 clamp(value, ce->min, ce->max); |
1888 value = clamp(value, ce->min, ce->max); |
1889 |
1889 |
1890 // take whatever the function returns |
1890 // take whatever the function returns |
1891 value = ce->proc(value, (x >= 30) ? 1 : -1); |
1891 value = ce->proc(value, (x >= 30) ? 1 : -1); |
1892 |
1892 |
1893 if (value != oldvalue) { |
1893 if (value != oldvalue) { |