Beispiel #1
0
/* @brief draw the selectors and the box around them */
static void sel_draw(state_t *state)
{
	int i, j;

	for(i = 0; i < 4; i++)
		for(j = 0; j < 4; j++)
			sel_draw_one(&sel_arr[j][i], (i + 1) * BTN_SIZE,
			             (j + 1) * BTN_SIZE, state->type_selected);

	glColor3f(0.3, 0.3, 0.3);
	glBegin(GL_LINE_STRIP);
	glVertex2f(0, SEL_Y - BTN_OFFSET);
	glVertex2f(SEL_X + BTN_OFFSET, SEL_Y - BTN_OFFSET);
	glVertex2f(SEL_X + BTN_OFFSET, YRES);
	glEnd();
}
Beispiel #2
0
/* @brief draw the selectors and the box around them */
static void sel_draw(state_t *state)
{
	int i, j;

	glColor3f(0.05, 0.05, 0.05);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	glBegin(GL_POLYGON);
	glVertex2f(0, SEL_Y - BTN_OFFSET + SEL_MITER);
	glVertex2f(SEL_MITER, SEL_Y - BTN_OFFSET);
	glVertex2f(SEL_X + BTN_OFFSET, SEL_Y - BTN_OFFSET);
	glVertex2f(SEL_X + BTN_OFFSET, YRES - SEL_MITER);
	glVertex2f(SEL_X + BTN_OFFSET - SEL_MITER, YRES);
	glVertex2f(0, YRES);
	glEnd();

	for(i = 0; i < 4; i++)
		for(j = 0; j < 4; j++)
			sel_draw_one(&sel_arr[j][i], i, j, state->selected);

	glBlendFunc(GL_SRC_ALPHA, GL_ONE);
}