mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 15:20:41 -05:00
Fix event sprite transparency regression
This commit is contained in:
@@ -118,7 +118,6 @@ public:
|
||||
void redrawEvents(const QList<Event*> &events);
|
||||
void redrawEventPixmapItem(EventPixmapItem *item);
|
||||
void updateEventPixmapItemZValue(EventPixmapItem *item);
|
||||
qreal getEventOpacity(const Event *event) const;
|
||||
|
||||
bool isMouseInMap() const;
|
||||
void setPlayerViewRect(const QRectF &rect);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <QGraphicsItemAnimation>
|
||||
|
||||
#include <QtWidgets>
|
||||
#include <optional>
|
||||
|
||||
#include "events.h"
|
||||
|
||||
@@ -28,6 +29,8 @@ public:
|
||||
void moveTo(int x, int y);
|
||||
void moveTo(const QPoint &pos);
|
||||
|
||||
void setOpacityOverride(qreal opacity) { m_opacityOverride = opacity;}
|
||||
void clearOpacityOverride() { m_opacityOverride.reset(); }
|
||||
private:
|
||||
QPixmap m_basePixmap;
|
||||
Event *const m_event = nullptr;
|
||||
@@ -35,6 +38,7 @@ private:
|
||||
bool m_active = false;
|
||||
bool m_selected = false;
|
||||
bool m_releaseSelectionQueued = false;
|
||||
std::optional<qreal> m_opacityOverride = {};
|
||||
|
||||
void updatePixelPosition();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user