imtk
diff src/button.c @ 8:10604ff95527
imtk_draw_rect
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 14 Apr 2011 23:21:56 +0300 |
parents | 38609a9f7586 |
children | df2bc9406561 |
line diff
1.1 --- a/src/button.c Thu Apr 14 23:04:07 2011 +0300 1.2 +++ b/src/button.c Thu Apr 14 23:21:56 2011 +0300 1.3 @@ -43,18 +43,13 @@ 1.4 1.5 calc_button_size(label, &width, &height); 1.6 1.7 - glBegin(GL_QUADS); 1.8 if(imtk_hit_test(x, y, width, height)) { 1.9 glColor4fv(imtk_get_color(IMTK_FOCUS_COLOR)); 1.10 } else { 1.11 glColor4fv(imtk_get_color(IMTK_BASE_COLOR)); 1.12 } 1.13 - glVertex2f(x, y); 1.14 - glVertex2f(x + width, y); 1.15 - glVertex2f(x + width, y + height); 1.16 - glVertex2f(x, y + height); 1.17 - glEnd(); 1.18 1.19 + imtk_draw_rect(x, y, width, height, 0); 1.20 imtk_draw_frame(x, y, width, height, imtk_is_active(id) ? FRAME_INSET : FRAME_OUTSET); 1.21 1.22 glColor4fv(imtk_get_color(IMTK_TEXT_COLOR));