diff options
| author | savask <savask@yandex.ru> | 2011-08-23 14:57:37 (GMT) |
|---|---|---|
| committer | savask <savask@yandex.ru> | 2011-08-23 16:45:01 (GMT) |
| commit | 021168ad1bca1189cb39acb9d2c211bc686fb259 (patch) | |
| tree | c03f87416379ab24c79d8d02dfe61c91a931a45d | |
| parent | 9bec43c45b6ef1b1b344b86267d5c276f7e44af7 (diff) | |
| download | powder-021168ad1bca1189cb39acb9d2c211bc686fb259.zip powder-021168ad1bca1189cb39acb9d2c211bc686fb259.tar.gz | |
Added "Tools" menu.
| -rw-r--r-- | includes/interface.h | 4 | ||||
| -rw-r--r-- | src/interface.c | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/includes/interface.h b/includes/interface.h index eac295d..6b95911 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 0b8a2d2..c605e5e 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<UI_WALLSTART+UI_WALLCOUNT; n++) { if (n==SPC_AIR||n==SPC_HEAT||n==SPC_COOL||n==SPC_VACUUM||n==SPC_WIND||n==SPC_PGRV||n==SPC_NGRV) @@ -1986,6 +1982,13 @@ 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 + { + 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 = 0; n<PT_NUM; n++) { if (ptypes[n].menusection==i&&ptypes[n].menu==1) @@ -2101,7 +2104,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq { drawtext(vid_buf, XRES-textwidth((char *)msections[i].name)-BARSIZE, sy-10, (char *)msections[i].name, 255, 255, 255, 255); } - else if (i==SC_WALL||(i==SC_SPECIAL&&h>=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); } |
