// Selects the previous to current value of a BT_IntValue type binding static int bind_setprev(OptionBinding *b) { int s = b->selected - 1; if(s < b->valrange_min) { s = b->valrange_max; } return bind_setvalue(b, s); }
// Selects the next to current value of a BT_IntValue type binding static int bind_setnext(OptionBinding *b) { int s = b->selected + 1; if(s > b->valrange_max) { s = b->valrange_min; } return bind_setvalue(b, s); }
// Selects the previous to current value of a BT_IntValue type binding int bind_setprev(OptionBinding *b) { int s = b->selected - 1; if(b->valrange_max) { if(s < b->valrange_min) s = b->valrange_max; } else if(s < 0) s = b->valcount - 1; return bind_setvalue(b, s); }
// Selects the next to current value of a BT_IntValue type binding int bind_setnext(OptionBinding *b) { int s = b->selected +1; if(b->valrange_max) { if(s > b->valrange_max) s = b->valrange_min; } else if(s >= b->valcount) s = 0; return bind_setvalue(b, s); }