summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/interface.c b/src/interface.c
index dfba6bd..eede146 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -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;
}
}
@@ -2537,7 +2537,7 @@ int color_menu_ui(pixel *vid_buf, int i, int *cr, int *cg, int *cb, int b, int b
float overflow = fwidth-(XRES-BARSIZE), location = ((float)XRES-BARSIZE)/((float)(mx-(XRES-BARSIZE)));
xoff = (int)(overflow / location);
}
- for (n = 0; n<3; n++)
+ for (n = 0; n<4; n++)
{
for (a=1; a<15; a++)
{
@@ -2547,6 +2547,8 @@ int color_menu_ui(pixel *vid_buf, int i, int *cr, int *cg, int *cb, int b, int b
vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(PIXR(toollist[n].colour)-10*a, PIXG(toollist[n].colour)-10*a, PIXB(toollist[n].colour)-10*a);
else if (n == DECO_DARKEN)
vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(PIXR(toollist[n].colour)+10*a, PIXG(toollist[n].colour)+10*a, PIXB(toollist[n].colour)+10*a);
+ else if (n == DECO_SMUDGE)
+ vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(PIXR(toollist[n].colour), PIXG(toollist[n].colour)-5*c, PIXB(toollist[n].colour)+5*c);
else if (n == DECO_DRAW)
vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(*cr,*cg,*cb);
else
@@ -2619,7 +2621,15 @@ void quickoptions_menu(pixel *vid_buf, int b, int bq, int x, int y)
quickoptions_tooltip_y = (i*16)+5;
if(b && !bq)
{
- *(quickmenu[i].variable) = !(*(quickmenu[i].variable));
+ if (!strcmp(quickmenu[i].name,"Newtonian gravity"))
+ {
+ if(!ngrav_enable)
+ start_grav_async();
+ else
+ stop_grav_async();
+ }
+ else
+ *(quickmenu[i].variable) = !(*(quickmenu[i].variable));
}
}
}
@@ -2884,6 +2894,11 @@ void set_cmode(int cm) // sets to given view mode
{
colour_mode = COLOUR_HEAT;
strcpy(itc_msg, "Heat Display");
+ free(display_modes);
+ display_modes = calloc(2, sizeof(unsigned int));
+ display_mode |= DISPLAY_AIRH;
+ display_modes[0] = DISPLAY_AIRH;
+ display_modes[1] = 0;
}
else if (cmode==CM_FANCY)
{