When wielding a two-handed weapon, Qt's paper doll shows uwep in the shield slot as well as in the weapon slot to reflect that it's occupying both hands. Make the shield slot's copy be a mirror image of the weapon's tile so that it looks less like wielding two weapons.
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
// Copyright (c) Warwick Allison, 1999.
|
|
// Qt4 conversion copyright (c) Ray Chason, 2012-2014.
|
|
// NetHack may be freely redistributed. See license for details.
|
|
|
|
// qt_inv.h -- inventory usage window
|
|
// This is at the top center of the main window
|
|
|
|
#ifndef QT4INV_H
|
|
#define QT4INV_H
|
|
|
|
namespace nethack_qt_ {
|
|
|
|
// for calls to drawWorn
|
|
enum drawWornFlag { dollNoFlag = 0, dollUnused = 1, dollReverse = 2 };
|
|
|
|
class NetHackQtInvUsageWindow : public QWidget {
|
|
public:
|
|
NetHackQtInvUsageWindow(QWidget* parent);
|
|
virtual ~NetHackQtInvUsageWindow();
|
|
virtual void paintEvent(QPaintEvent*);
|
|
virtual QSize sizeHint(void) const;
|
|
|
|
protected:
|
|
virtual bool event(QEvent *event);
|
|
virtual void mousePressEvent(QMouseEvent *event);
|
|
|
|
private:
|
|
void drawWorn(QPainter &painter, obj *nhobj, int x, int y,
|
|
const char *alttip, int flags = dollNoFlag);
|
|
bool tooltip_event(QHelpEvent *tipevent);
|
|
|
|
char *tips[3][6]; // PAPERDOLL is a grid of 3x6 cells for tiles
|
|
};
|
|
|
|
} // namespace nethack_qt_
|
|
|
|
#endif
|