cursor changes to correct shape as soon as you click element/wall
This commit is contained in:
parent
0825324469
commit
4f176ba7c3
@ -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(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);
|
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);
|
||||||
|
|
||||||
|
@ -3614,7 +3614,7 @@ void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry)
|
|||||||
{
|
{
|
||||||
#ifdef OGLR
|
#ifdef OGLR
|
||||||
int i;
|
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);
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo);
|
||||||
glEnable(GL_COLOR_LOGIC_OP);
|
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
|
#else
|
||||||
int i,j,c;
|
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)
|
if (rx<=0)
|
||||||
for (j = y - ry; j <= y + ry; j++)
|
for (j = y - ry; j <= y + ry; j++)
|
||||||
|
@ -2219,7 +2219,7 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
//current menu function
|
//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;
|
int h,x,y,n=0,height,width,sy,rows=0,xoff=0,fwidth;
|
||||||
SEC = SEC2;
|
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;
|
SEC2 = -1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*sl = h;
|
*sl = *su = h;
|
||||||
*dae = 51;
|
*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;
|
SEC2 = -1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*sr = h;
|
*sr = *su = h;
|
||||||
*dae = 51;
|
*dae = 51;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1761,7 +1761,7 @@ int main(int argc, char *argv[])
|
|||||||
active_menu = i;
|
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
|
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)
|
&& x<sdl_scale*(zoom_wx+ZFACTOR*ZSIZE)
|
||||||
&& y<sdl_scale*(zoom_wy+ZFACTOR*ZSIZE))
|
&& y<sdl_scale*(zoom_wy+ZFACTOR*ZSIZE))
|
||||||
|
Reference in New Issue
Block a user