-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.322 $ $NHDT-Date: 1602002574 2020/10/06 16:42:54 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.323 $ $NHDT-Date: 1602022805 2020/10/06 22:20:05 $
General Fixes and Modified Features
-----------------------------------
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)
+Qt: clicking on the status window runs the #attributes command (^X)
NetHack Community Patches (or Variation) Included
* the other. So only do our update when we update the second line.
*
* Information on the first line:
- * name, attributes, alignment, score
+ * name, Str/Dex/&c characteristics, alignment, score
*
* Information on the second line:
* dlvl, gold, hp, power, ac, {level & exp or HD **}
* status (hunger, encumbrance, sick, stun, conf, halu, blind), time
*
- * [**] HD is shown instead of level and exp if mtimedone is non-zero.
+ * [**] HD is shown instead of level and exp when hero is polymorphed.
*/
void NetHackQtStatusWindow::updateStats()
{
score.setLabel("");
}
- if (first_set)
- {
+ if (first_set) {
first_set=false;
name.highlightWhenChanging();
{
}
+// clicking on status window runs #attributes (^X)
+void NetHackQtStatusWindow::mousePressEvent(QMouseEvent *event UNUSED)
+{
+ // same code as NetHackQtInvUsageWindow::mousePressEvent except for func
+ char cmdbuf[32];
+ Strcpy(cmdbuf, "#");
+ (void) cmdname_from_func(doattributes, &cmdbuf[1], FALSE);
+ // queue up #attribues as if user had typed it; we don't execute
+ // doattributes() directly because the program might not be ready
+ // for a command right now
+ QWidget *main = NetHackQtBind::mainWidget();
+ (static_cast <NetHackQtMainWindow *> (main))->DollClickToKeys(cmdbuf);
+}
+
} // namespace nethack_qt_