src/misc_gui.cpp
changeset 5981 7aa1a23cd1e4
parent 5977 8a8c35b46e8d
child 6001 1e4c5406cd1a
equal deleted inserted replaced
5980:cec1cfd00d1e 5981:7aa1a23cd1e4
  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) {