mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-25 11:56:11 -07:00
[Replay] Make fast forward speed configurable (#7037)
* [Replay] Make fast forward speed configurable * fix settings widget * clamp interval
This commit is contained in:
parent
ae37762ee1
commit
b70f770633
9 changed files with 102 additions and 7 deletions
|
|
@ -372,6 +372,7 @@ SettingsCache::SettingsCache()
|
|||
|
||||
openDeckInNewTab = settings->value("editor/openDeckInNewTab", false).toBool();
|
||||
rewindBufferingMs = settings->value("replay/rewindBufferingMs", 200).toInt();
|
||||
fastForwardSpeed = settings->value("replay/fastForwardSpeed", 10).toReal();
|
||||
styleUserList = settings->value("appearance/styleUserList", true).toBool();
|
||||
chatMention = settings->value("chat/mention", true).toBool();
|
||||
chatMentionCompleter = settings->value("chat/mentioncompleter", true).toBool();
|
||||
|
|
@ -1047,6 +1048,12 @@ void SettingsCache::setRewindBufferingMs(int _rewindBufferingMs)
|
|||
settings->setValue("replay/rewindBufferingMs", rewindBufferingMs);
|
||||
}
|
||||
|
||||
void SettingsCache::setFastForwardSpeed(qreal _value)
|
||||
{
|
||||
fastForwardSpeed = _value;
|
||||
settings->setValue("replay/fastForwardSpeed", fastForwardSpeed);
|
||||
}
|
||||
|
||||
void SettingsCache::setStyleUserList(QT_STATE_CHANGED_T _styleUserList)
|
||||
{
|
||||
styleUserList = static_cast<bool>(_styleUserList);
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ private:
|
|||
bool autoRotateSidewaysLayoutCards;
|
||||
bool openDeckInNewTab;
|
||||
int rewindBufferingMs;
|
||||
qreal fastForwardSpeed;
|
||||
bool styleUserList;
|
||||
bool chatMention;
|
||||
bool chatMentionCompleter;
|
||||
|
|
@ -745,6 +746,10 @@ public:
|
|||
{
|
||||
return rewindBufferingMs;
|
||||
}
|
||||
[[nodiscard]] qreal getFastForwardSpeed() const
|
||||
{
|
||||
return fastForwardSpeed;
|
||||
}
|
||||
[[nodiscard]] bool getStyleUserList() const
|
||||
{
|
||||
return styleUserList;
|
||||
|
|
@ -1124,6 +1129,7 @@ public slots:
|
|||
void setAutoRotateSidewaysLayoutCards(QT_STATE_CHANGED_T _autoRotateSidewaysLayoutCards);
|
||||
void setOpenDeckInNewTab(QT_STATE_CHANGED_T _openDeckInNewTab);
|
||||
void setRewindBufferingMs(int _rewindBufferingMs);
|
||||
void setFastForwardSpeed(qreal _value);
|
||||
void setStyleUserList(QT_STATE_CHANGED_T _styleUserList);
|
||||
void setChatMention(QT_STATE_CHANGED_T _chatMention);
|
||||
void setChatMentionCompleter(QT_STATE_CHANGED_T _chatMentionCompleter);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue