summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-12 21:10:29 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-12 21:10:29 +0000
commitd0f739d802e77186463731df1d6736db7daf983e (patch)
treeb773d5a652297c57c22114dbd18faaac3473c0b8 /crawl-ref/source/libgui.cc
parent7e10afcafb398a0a9eeb39560facba3ec242d5dd (diff)
downloadcrawl-ref-d0f739d802e77186463731df1d6736db7daf983e.tar.gz
crawl-ref-d0f739d802e77186463731df1d6736db7daf983e.zip
Tile changes. *waves to Enne*
Fix assertion error when unwielding items. FR 1838216: Make R-click on map *really* show grid information. FR 1838219: Add more diverse action verbs for items in inventory ("eat", "unwield" etc. rather than plain "use") and allow memorizing by L-clicking on books. Bug 1858432: Show 0 charge icon for empty but unID'd wands. Also: Don't regard enslavement on friendlies as attack attempt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3264 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r--crawl-ref/source/libgui.cc47
1 files changed, 30 insertions, 17 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index c2af3ef8c3..3c98350c39 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -1226,21 +1226,23 @@ static int handle_mouse_motion(int mouse_x, int mouse_y, bool init)
if (display_actions)
{
- desc += EOL "[L-Click] ";
int type = you.inv[ix].base_type;
+ if (type != OBJ_CORPSES || you.species == SP_VAMPIRE)
+ desc += EOL "[L-Click] ";
if (itemlist_iflag[cx] & TILEI_FLAG_EQUIP)
type += 18;
switch (type)
{
- case OBJ_JEWELLERY + 18:
- desc += "*(R)emove";
- break;
case OBJ_WEAPONS:
case OBJ_STAVES:
desc += "*(w)ield";
break;
+ case OBJ_WEAPONS + 18:
+ case OBJ_STAVES + 18:
+ desc += "unwield";
+ break;
case OBJ_MISSILES:
desc += "*(t)hrow";
break;
@@ -1248,15 +1250,35 @@ static int handle_mouse_motion(int mouse_x, int mouse_y, bool init)
desc += "*(z)ap";
break;
case OBJ_SCROLLS:
- case OBJ_BOOKS:
desc += "*(r)ead";
break;
+ case OBJ_BOOKS:
+ desc += "*(M)emorize";
+ break;
case OBJ_JEWELLERY:
desc += "*(P)ut on";
break;
+ case OBJ_JEWELLERY + 18:
+ desc += "*(R)emove";
+ break;
case OBJ_POTIONS:
desc += "*(q)uaff";
break;
+ case OBJ_ARMOUR:
+ desc += "*(W)ear";
+ break;
+ case OBJ_ARMOUR + 18:
+ desc += "*(T)ake off";
+ break;
+ case OBJ_FOOD:
+ desc += "*(e)at";
+ break;
+ case OBJ_CORPSES:
+ if (you.species == SP_VAMPIRE)
+ desc += "drink blood";
+ else // no action possible
+ desc += EOL;
+ break;
default:
desc += "*Use it";
}
@@ -1473,19 +1495,10 @@ static int handle_mouse_button(int mx, int my, int button,
// otherwise return trigger key
if (!in_los_bounds(cx+1,cy+1))
return CK_MOUSE_B2;
- const coord_def ep = view2show(coord_def(cx, cy));
- if (env.show(ep) == 0)
- return trig;
-
- int mid = mgrd[cx][cy];
- if (mid == NON_MONSTER || !player_monster_visible( &menv[mid] ))
- {
- return trig;
- }
- describe_monsters( menv[ mid ] );
- redraw_screen();
- mesclr( true );
+ const int gx = view2gridX(cx) + 1;
+ const int gy = view2gridY(cy) + 1;
+ full_describe_square(coord_def(gx,gy));
return CK_MOUSE_DONE;
}