cursor changes to correct shape as soon as you click element/wall

This commit is contained in:
Jacob1 2012-03-14 19:26:08 -04:00
parent 0825324469
commit 4f176ba7c3
4 changed files with 7 additions and 7 deletions

View File

@ -291,7 +291,7 @@ int save_filename_ui(pixel *vid_buf);
void menu_ui(pixel *vid_buf, int i, int *sl, int *sr);
void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq, int mx, int my);
void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *su, int *dae, int b, int bq, int mx, int my);
int color_menu_ui(pixel *vid_buf, int i, int *cr, int *cg, int *cb, int b, int bq, int mx, int my, int * tool);

View File

@ -3614,7 +3614,7 @@ void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry)
{
#ifdef OGLR
int i;
if (t<PT_NUM||(t&0xFF)==PT_LIFE||t==SPC_AIR||t==SPC_HEAT||t==SPC_COOL||t==SPC_VACUUM||t==SPC_WIND||t==SPC_PGRV||t==SPC_NGRV)
if (t<PT_NUM||(t&0xFF)==PT_LIFE||t==SPC_AIR||t==SPC_HEAT||t==SPC_COOL||t==SPC_VACUUM||t==SPC_WIND||t==SPC_PGRV||t==SPC_NGRV||t==SPC_PROP)
{
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo);
glEnable(GL_COLOR_LOGIC_OP);
@ -3654,7 +3654,7 @@ void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry)
}
#else
int i,j,c;
if (t<PT_NUM||(t&0xFF)==PT_LIFE||t==SPC_AIR||t==SPC_HEAT||t==SPC_COOL||t==SPC_VACUUM||t==SPC_WIND||t==SPC_PGRV||t==SPC_NGRV)
if (t<PT_NUM||(t&0xFF)==PT_LIFE||t==SPC_AIR||t==SPC_HEAT||t==SPC_COOL||t==SPC_VACUUM||t==SPC_WIND||t==SPC_PGRV||t==SPC_NGRV||t==SPC_PROP)
{
if (rx<=0)
for (j = y - ry; j <= y + ry; j++)

View File

@ -2219,7 +2219,7 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr)
}
*/
//current menu function
void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq, int mx, int my)
void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *su, int *dae, int b, int bq, int mx, int my)
{
int h,x,y,n=0,height,width,sy,rows=0,xoff=0,fwidth;
SEC = SEC2;
@ -2458,7 +2458,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq
SEC2 = -1;
}
else {
*sl = h;
*sl = *su = h;
*dae = 51;
}
}
@ -2478,7 +2478,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq
SEC2 = -1;
}
else {
*sr = h;
*sr = *su = h;
*dae = 51;
}
}

View File

@ -1761,7 +1761,7 @@ int main(int argc, char *argv[])
active_menu = i;
}
}
menu_ui_v3(vid_buf, active_menu, &sl, &sr, &dae, b, bq, x, y); //draw the elements in the current menu
menu_ui_v3(vid_buf, active_menu, &sl, &sr, &su, &dae, b, bq, x, y); //draw the elements in the current menu
if (zoom_en && x>=sdl_scale*zoom_wx && y>=sdl_scale*zoom_wy //change mouse position while it is in a zoom window
&& x<sdl_scale*(zoom_wx+ZFACTOR*ZSIZE)
&& y<sdl_scale*(zoom_wy+ZFACTOR*ZSIZE))