mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
extract getOverlayColor() to AbstractCounter for shared fill+hover styling and Use server-provided color and radius for tax counters
This commit is contained in:
parent
eeae205f51
commit
c8ed9835bd
5 changed files with 27 additions and 18 deletions
|
|
@ -36,6 +36,14 @@ protected:
|
|||
bool hovered = false;
|
||||
bool useNameForShortcut;
|
||||
|
||||
/**
|
||||
* @brief Returns the counter's color adjusted for overlay rendering.
|
||||
*
|
||||
* Applies semi-transparency and lightens the color when hovered.
|
||||
* Use this for fill-based counters; SVG-based counters (GeneralCounter) bypass this.
|
||||
*/
|
||||
[[nodiscard]] QColor getOverlayColor() const;
|
||||
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue