예제 #1
0
파일: options.c 프로젝트: laochailan/taisei
// 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);
}
예제 #2
0
파일: options.c 프로젝트: laochailan/taisei
// 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);
}
예제 #3
0
// 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);
}
예제 #4
0
// 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);
}