Qt paperdoll - tool tips used to describe items

New for Qt, moving the mouse over one of the slots in the paperdoll
inventory subset and letting it pause there will use Qt's tool tip
mechanism to give a description of the item under the pointer, if
there is one, or of what the slot would contain when there isn't.

So "e - uncursed leather gloves (being worn)" or "no gloves" when
the pointer is over the glove slot.  If you do something with the
keyboard to make the paperdoll change while the mouse is still
hovering, you'll need to move the pointer slightly to have Qt
recheck for tool tip at that spot.  It may be feasible to force
an immediate update, but I'm satisfied with how it's working.

Interestingly, you can move pointer and hover while yn_function()
has asked you to pick an inventory item and is waiting for an
answer.  Mostly useful for Take-off/Remove or #adjust.
This commit is contained in:
PatR
2020-10-14 16:06:25 -07:00
parent 42b466e87b
commit a0c6118c97
4 changed files with 149 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.329 $ $NHDT-Date: 1602669770 2020/10/14 10:02:50 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.330 $ $NHDT-Date: 1602716771 2020/10/14 23:06:11 $
General Fixes and Modified Features
-----------------------------------
@@ -575,6 +575,8 @@ Qt: the "paper doll" inventory subset can be controlled via the "Qt Settings"
dialog box ("Preferences..." on OSX)
Qt: draw a border around each tile in the paper doll inventory; when BUC is
known for a doll item, change the border's color and thicken it
Qt: letting the mouse hover over the paper doll shows a tool tip describing
the object--or lack of same--in the slot under the pointer
Qt: clicking on the paper doll runs the #seeall command (inventory of wielded
and worn items plus tools [lamps, leashes] actively in use; in other
words, same set of things whose tiles are used to populate the doll)