summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorsavask <savask@yandex.ru>2011-08-23 14:57:37 (GMT)
committer savask <savask@yandex.ru>2011-08-23 16:45:01 (GMT)
commit021168ad1bca1189cb39acb9d2c211bc686fb259 (patch)
treec03f87416379ab24c79d8d02dfe61c91a931a45d /src/interface.c
parent9bec43c45b6ef1b1b344b86267d5c276f7e44af7 (diff)
downloadpowder-021168ad1bca1189cb39acb9d2c211bc686fb259.zip
powder-021168ad1bca1189cb39acb9d2c211bc686fb259.tar.gz
Added "Tools" menu.
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c15
1 files changed, 9 insertions, 6 deletions
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);
}