Larger radio boxes
This commit is contained in:
parent
394a0e9ee0
commit
534c0edc33
@ -588,34 +588,33 @@ void ui_radio_draw(pixel *vid_buf, ui_checkbox *ed)
|
||||
{
|
||||
if (ed->checked)
|
||||
{
|
||||
int count;
|
||||
for(count=0; count<=2; count++)
|
||||
{
|
||||
blendpixel(vid_buf, ed->x+3+count, ed->y+4, 255, 255, 255, 255);
|
||||
blendpixel(vid_buf, ed->x+4, ed->y+3+count, 255, 255, 255, 255);
|
||||
}
|
||||
int nx, ny;
|
||||
for(nx=-6; nx<=6; nx++)
|
||||
for(ny=-6; ny<=6; ny++)
|
||||
if((nx*nx+ny*ny)<16/* && (nx*nx+ny*ny)>28*/)
|
||||
blendpixel(vid_buf, ed->x+6+nx, ed->y+6+ny, 128, 128, 128, 255);
|
||||
}
|
||||
if (ed->focus)
|
||||
{
|
||||
int nx, ny;
|
||||
for(nx=-3; nx<=3; nx++)
|
||||
for(ny=-3; ny<=3; ny++)
|
||||
if((nx*nx+ny*ny)<14 && (nx*nx+ny*ny)>7)
|
||||
blendpixel(vid_buf, ed->x+4+nx, ed->y+4+ny, 255, 255, 255, 255);
|
||||
for(nx=-6; nx<=6; nx++)
|
||||
for(ny=-6; ny<=6; ny++)
|
||||
if((nx*nx+ny*ny)<40 && (nx*nx+ny*ny)>28)
|
||||
blendpixel(vid_buf, ed->x+6+nx, ed->y+6+ny, 255, 255, 255, 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
int nx, ny;
|
||||
for(nx=-3; nx<=3; nx++)
|
||||
for(ny=-3; ny<=3; ny++)
|
||||
if((nx*nx+ny*ny)<14 && (nx*nx+ny*ny)>7)
|
||||
blendpixel(vid_buf, ed->x+4+nx, ed->y+4+ny, 128, 128, 128, 255);
|
||||
for(nx=-6; nx<=6; nx++)
|
||||
for(ny=-6; ny<=6; ny++)
|
||||
if((nx*nx+ny*ny)<40 && (nx*nx+ny*ny)>28)
|
||||
blendpixel(vid_buf, ed->x+6+nx, ed->y+6+ny, 128, 128, 128, 255);
|
||||
}
|
||||
}
|
||||
|
||||
void ui_radio_process(int mx, int my, int mb, int mbq, ui_checkbox *ed)
|
||||
{
|
||||
int w = 7;
|
||||
int w = 12;
|
||||
|
||||
if (mb && !mbq)
|
||||
{
|
||||
@ -6309,8 +6308,8 @@ void render_ui(pixel * vid_buf, int xcoord, int ycoord, int orientation)
|
||||
colour_cb = calloc(colour_optioncount, sizeof(ui_checkbox));
|
||||
for(i = 0; i < colour_optioncount; i++)
|
||||
{
|
||||
colour_cb[i].x = (xcoffset * 0) + xcoord + (i * xoffset) + 9;
|
||||
colour_cb[i].y = ycoord + (i * yoffset) + 8;
|
||||
colour_cb[i].x = (xcoffset * 0) + xcoord + (i * xoffset) + 5;
|
||||
colour_cb[i].y = ycoord + (i * yoffset) + 5;
|
||||
colour_cb[i].focus = 0;
|
||||
colour_cb[i].checked = 0;
|
||||
j = 0;
|
||||
@ -6341,20 +6340,9 @@ void render_ui(pixel * vid_buf, int xcoord, int ycoord, int orientation)
|
||||
|
||||
display_cb = calloc(display_optioncount, sizeof(ui_checkbox));
|
||||
for(i = 0; i < display_optioncount; i++)
|
||||
{
|
||||
display_cb[i].x = (xcoffset * 2) + xcoord + (i * xoffset) + 5;
|
||||
|
||||
if(display_options[i] & DISPLAY_AIR)
|
||||
{
|
||||
display_cb[i].x = (xcoffset * 2) + xcoord + (i * xoffset) + 9;
|
||||
display_cb[i].y = ycoord + (i * yoffset) + 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
display_cb[i].x = (xcoffset * 2) + xcoord + (i * xoffset) + 5;
|
||||
display_cb[i].y = ycoord + (i * yoffset) + 5;
|
||||
}
|
||||
|
||||
display_cb[i].focus = 0;
|
||||
display_cb[i].checked = 0;
|
||||
j = 0;
|
||||
@ -6402,9 +6390,6 @@ void render_ui(pixel * vid_buf, int xcoord, int ycoord, int orientation)
|
||||
|
||||
for(i = 0; i < display_optioncount; i++)
|
||||
{
|
||||
if(display_options[i] & DISPLAY_AIR)
|
||||
drawIcon(vid_buf, display_cb[i].x + 12, display_cb[i].y-1, display_optionicons[i]);
|
||||
else
|
||||
drawIcon(vid_buf, display_cb[i].x + 16, display_cb[i].y+2, display_optionicons[i]);
|
||||
|
||||
if(display_options[i] & DISPLAY_AIR)
|
||||
@ -6433,7 +6418,7 @@ void render_ui(pixel * vid_buf, int xcoord, int ycoord, int orientation)
|
||||
|
||||
for(i = 0; i < colour_optioncount; i++)
|
||||
{
|
||||
drawIcon(vid_buf, colour_cb[i].x + 12, colour_cb[i].y-1, colour_optionicons[i]);
|
||||
drawIcon(vid_buf, colour_cb[i].x + 16, colour_cb[i].y+2, colour_optionicons[i]);
|
||||
ui_radio_draw(vid_buf, &(colour_cb[i]));
|
||||
ui_radio_process(mx, my, b, bq, &(colour_cb[i]));
|
||||
if(colour_cb[i].checked) //One colour only
|
||||
|
Loading…
Reference in New Issue
Block a user