tools/templates/pixlabel.h
author alfadur
Mon, 12 Mar 2018 00:59:47 +0100
changeset 13168 0e7eddfbce8a
parent 8442 535a00ca0d35
permissions -rw-r--r--
Fix minigun bullets sometimes failing to hit when shooting same thing twice in row alfadur says: “the stale collision cache is searched in, so if you shoot at same thing twice in a row, chances are it woudln't get hit”

#include <QLabel>
#include <QRect>
#include <QList>
#include <QMouseEvent>

class PixLabel : public QLabel
{
    Q_OBJECT

public:

    PixLabel();
    QList<QRect> rects;

public slots:
    void AddRect();

private:
    void paintEvent(QPaintEvent * event);
    void mousePressEvent(QMouseEvent * e);
};