static Janet janet_ui_slider_value(int32_t argc, Janet *argv) { janet_arity(argc, 1, 2); uiSlider *slider = janet_getuitype(argv, 0, &slider_td); if (argc == 2) { int32_t value = janet_getinteger(argv, 1); uiSliderSetValue(slider, value); return argv[0]; } return janet_wrap_integer(uiSliderValue(slider)); }
static void update(intmax_t value) { uiSpinboxSetValue(spinbox, value); uiSliderSetValue(slider, value); uiProgressBarSetValue(progressbar, value); }