mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
Add subtype breakdown counter for card selection
Display a categorized count of creature subtypes (and other card type subtypes) when multiple cards are selected. The breakdown appears above the total selection counter in the bottom-right corner. Subtypes are grouped by main card type and sorted by frequency, with the most common subtypes positioned adjacent to the total count for quick reference. The feature can be toggled via a new checkbox in Settings > User Interface.
This commit is contained in:
parent
da4ba222c0
commit
b18bae5e05
7 changed files with 216 additions and 22 deletions
|
|
@ -21,8 +21,12 @@ private:
|
|||
QRubberBand *rubberBand;
|
||||
QLabel *dragCountLabel;
|
||||
QLabel *totalCountLabel;
|
||||
QLabel *subtypeCountLabel; ///< Label displaying subtype breakdown for selected cards
|
||||
QPointF selectionOrigin;
|
||||
|
||||
/** @brief Builds formatted text showing subtype counts for all selected cards */
|
||||
QString buildSubtypeCountText() const;
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
private slots:
|
||||
|
|
@ -30,7 +34,7 @@ private slots:
|
|||
void resizeRubberBand(const QPointF &cursorPoint, int selectedCount);
|
||||
void stopRubberBand();
|
||||
void refreshShortcuts();
|
||||
void updateTotalSelectionCount(const QSize &viewSize = QSize());
|
||||
void updateSelectionCount(const QSize &viewSize = QSize());
|
||||
public slots:
|
||||
void updateSceneRect(const QRectF &rect);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue