Cockatrice/libcockatrice_settings/libcockatrice/settings/cards_display_settings.h
BruebachL 404b0cdf28
[Game] Animate Arrows (#7099)
* Add an arrow draw animation setting

- New arrowDrawAnimation cards-display setting, default on
- The arrow draw animation checkbox joins the animation settings group
- Visual Deck Storage selection animation checkbox moves next to the
  other animation checkboxes, and the enable/disable-all buttons now
  cover it and the arrow animation

Took 2 minutes

Took 21 minutes

Took 7 minutes


Took 11 minutes

Took 20 seconds

* Animate arrows drawing from start to target

- The arrow stroke reveals itself along the arc with an eased timing,
  followed by a short light sheen that sweeps down the shaft
- The arrow head pops in once the reveal reaches it, then the whole
  arrow fades from its initial glow
- Decay is driven by GameScene's shared animation timer through the
  IAnimatedItem interface (QElapsedTimer based), respecting the
  arrowDrawAnimation setting
- GameScene adds the arrow item to the scene before starting its
  animation so the item is registered against a valid scene

Took 6 minutes


Took 1 minute

* Defer animation start so arrows don't start halfway materialized

Took 13 minutes

* Don't draw tip/shaft outline

Took 12 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-14 10:44:17 +02:00

79 lines
3.7 KiB
C++

#ifndef CARDS_DISPLAY_SETTINGS_H
#define CARDS_DISPLAY_SETTINGS_H
#include "settings_manager.h"
#include <libcockatrice/interfaces/interface_cards_display_settings_provider.h>
class CardsDisplaySettings : public SettingsManager, public ICardsDisplaySettingsProvider
{
Q_OBJECT
friend class SettingsCache;
public:
[[nodiscard]] bool getDisplayCardNames() const override;
[[nodiscard]] bool getRoundCardCorners() const override;
[[nodiscard]] bool getOverrideAllCardArtWithPersonalPreference() const override;
[[nodiscard]] bool getBumpSetsWithCardsInDeckToTop() const override;
[[nodiscard]] int getPrintingSelectorSortOrder() const override;
[[nodiscard]] int getPrintingSelectorCardSize() const override;
[[nodiscard]] bool getIncludeRebalancedCards() const override;
[[nodiscard]] bool getPrintingSelectorNavigationButtonsVisible() const override;
[[nodiscard]] bool getTapAnimation() const override;
[[nodiscard]] bool getArrowDrawAnimation() const override;
[[nodiscard]] bool getAutoRotateSidewaysLayoutCards() const override;
[[nodiscard]] bool getScaleCards() const override;
[[nodiscard]] int getStackCardOverlapPercent() const override;
[[nodiscard]] int getCardInfoViewMode() const override;
[[nodiscard]] int getVisualDeckStorageCardSize() const override;
[[nodiscard]] int getVisualDatabaseDisplayCardSize() const override;
[[nodiscard]] int getVisualDeckEditorCardSize() const override;
[[nodiscard]] int getEDHRecCardSize() const override;
[[nodiscard]] int getArchidektPreviewSize() const override;
[[nodiscard]] int getSampleHandSize() const override;
void setDisplayCardNames(bool _displayCardNames);
void setRoundCardCorners(bool _roundCardCorners);
void setOverrideAllCardArtWithPersonalPreference(bool _overrideAllCardArt);
void setBumpSetsWithCardsInDeckToTop(bool _bumpSetsWithCardsInDeckToTop);
void setPrintingSelectorSortOrder(int _printingSelectorSortOrder);
void setPrintingSelectorCardSize(int _printingSelectorCardSize);
void setIncludeRebalancedCards(bool _includeRebalancedCards);
void setPrintingSelectorNavigationButtonsVisible(bool _navigationButtonsVisible);
void setTapAnimation(bool _tapAnimation);
void setArrowDrawAnimation(bool _arrowDrawAnimation);
void setAutoRotateSidewaysLayoutCards(bool _autoRotateSidewaysLayoutCards);
void setCardScaling(bool _scaleCards);
void setStackCardOverlapPercent(int _verticalCardOverlapPercent);
void setCardInfoViewMode(int _viewMode);
void setVisualDeckStorageCardSize(int _cardSize);
void setVisualDatabaseDisplayCardSize(int _cardSize);
void setVisualDeckEditorCardSize(int _cardSize);
void setEDHRecCardSize(int _edhrecCardSize);
void setArchidektPreviewCardSize(int _archidektPreviewCardSize);
void setSampleHandSize(int _sampleHandSize);
signals:
void displayCardNamesChanged();
void roundCardCornersChanged(bool roundCardCorners);
void overrideAllCardArtWithPersonalPreferenceChanged(bool _overrideAllCardArtWithPersonalPreference);
void bumpSetsWithCardsInDeckToTopChanged();
void printingSelectorSortOrderChanged();
void printingSelectorCardSizeChanged();
void includeRebalancedCardsChanged(bool _includeRebalancedCards);
void printingSelectorNavigationButtonsVisibleChanged();
void visualDeckStorageCardSizeChanged();
void visualDatabaseDisplayCardSizeChanged();
void visualDeckEditorCardSizeChanged();
void edhRecCardSizeChanged();
void archidektPreviewSizeChanged();
void sampleHandSizeChanged(int amount);
public:
explicit CardsDisplaySettings(const QString &settingPath, QObject *parent = nullptr);
private:
CardsDisplaySettings(const CardsDisplaySettings & /*other*/);
};
#endif // CARDS_DISPLAY_SETTINGS_H