From 021168ad1bca1189cb39acb9d2c211bc686fb259 Mon Sep 17 00:00:00 2001 From: savask Date: Tue, 23 Aug 2011 21:57:37 +0700 Subject: [PATCH] Added "Tools" menu. --- includes/interface.h | 4 +++- src/interface.c | 15 +++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/includes/interface.h b/includes/interface.h index eac295dbc..6b9591124 100644 --- a/includes/interface.h +++ b/includes/interface.h @@ -33,9 +33,10 @@ typedef struct menu_wall menu_wall; #define SC_NUCLEAR 8 #define SC_SPECIAL 9 #define SC_LIFE 10 +#define SC_TOOL 11 #define SC_CRACKER 13 #define SC_CRACKER2 14 -#define SC_TOTAL 11 +#define SC_TOTAL 12 static menu_section msections[] = //doshow does not do anything currently. { @@ -50,6 +51,7 @@ static menu_section msections[] = //doshow does not do anything currently. {"\xC6", "Radioactive", 0, 1}, {"\xCC", "Special", 0, 1}, {"\xD2", "Life", 0, 1}, + {"\xC8", "Tools", 0, 1}, {"\xD2", "More Life", 0, 1}, {"\xC8", "", 0, 0}, {"\xC8", "Cracker", 0, 0}, diff --git a/src/interface.c b/src/interface.c index 0b8a2d2fd..c605e5ebd 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1946,12 +1946,8 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq } } } - else if (i==SC_SPECIAL)//special menu + else if (i==SC_TOOL)//tools menu { - if (fwidth > XRES-BARSIZE) { //fancy scrolling - float overflow = fwidth-(XRES-BARSIZE), location = ((float)XRES-BARSIZE)/((float)(mx-(XRES-BARSIZE))); - xoff = (int)(overflow / location); - } for (n = UI_WALLSTART; n XRES-BARSIZE) { //fancy scrolling + float overflow = fwidth-(XRES-BARSIZE), location = ((float)XRES-BARSIZE)/((float)(mx-(XRES-BARSIZE))); + xoff = (int)(overflow / location); + } for (n = 0; n=UI_WALLSTART)) + else if (i==SC_WALL||i==SC_TOOL) { drawtext(vid_buf, XRES-textwidth((char *)wtypes[h-UI_WALLSTART].descs)-BARSIZE, sy-10, (char *)wtypes[h-UI_WALLSTART].descs, 255, 255, 255, 255); }