mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 11:38:49 -07:00
make rewind buffering timeout configurable (#5227)
* update settingsCache * implement thing * add new setting to window * rename setting * make it compile on qt5 * fix typo * somehow changing the order here fixes a bug? The loaded value was getting clamped to 99
This commit is contained in:
parent
10f11213d3
commit
a39de270cd
8 changed files with 40 additions and 11 deletions
|
|
@ -245,6 +245,7 @@ SettingsCache::SettingsCache()
|
|||
minPlayersForMultiColumnLayout = settings->value("interface/min_players_multicolumn", 4).toInt();
|
||||
tapAnimation = settings->value("cards/tapanimation", true).toBool();
|
||||
openDeckInNewTab = settings->value("editor/openDeckInNewTab", false).toBool();
|
||||
rewindBufferingMs = settings->value("replay/rewindBufferingMs", 200).toInt();
|
||||
chatMention = settings->value("chat/mention", true).toBool();
|
||||
chatMentionCompleter = settings->value("chat/mentioncompleter", true).toBool();
|
||||
chatMentionForeground = settings->value("chat/mentionforeground", true).toBool();
|
||||
|
|
@ -545,6 +546,12 @@ void SettingsCache::setOpenDeckInNewTab(QT_STATE_CHANGED_T _openDeckInNewTab)
|
|||
settings->setValue("editor/openDeckInNewTab", openDeckInNewTab);
|
||||
}
|
||||
|
||||
void SettingsCache::setRewindBufferingMs(int _rewindBufferingMs)
|
||||
{
|
||||
rewindBufferingMs = _rewindBufferingMs;
|
||||
settings->setValue("replay/rewindBufferingMs", rewindBufferingMs);
|
||||
}
|
||||
|
||||
void SettingsCache::setChatMention(QT_STATE_CHANGED_T _chatMention)
|
||||
{
|
||||
chatMention = static_cast<bool>(_chatMention);
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ private:
|
|||
int minPlayersForMultiColumnLayout;
|
||||
bool tapAnimation;
|
||||
bool openDeckInNewTab;
|
||||
int rewindBufferingMs;
|
||||
bool chatMention;
|
||||
bool chatMentionCompleter;
|
||||
QString chatMentionColor;
|
||||
|
|
@ -312,6 +313,10 @@ public:
|
|||
{
|
||||
return openDeckInNewTab;
|
||||
}
|
||||
int getRewindBufferingMs() const
|
||||
{
|
||||
return rewindBufferingMs;
|
||||
}
|
||||
bool getChatMention() const
|
||||
{
|
||||
return chatMention;
|
||||
|
|
@ -566,6 +571,7 @@ public slots:
|
|||
void setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout);
|
||||
void setTapAnimation(QT_STATE_CHANGED_T _tapAnimation);
|
||||
void setOpenDeckInNewTab(QT_STATE_CHANGED_T _openDeckInNewTab);
|
||||
void setRewindBufferingMs(int _rewindBufferingMs);
|
||||
void setChatMention(QT_STATE_CHANGED_T _chatMention);
|
||||
void setChatMentionCompleter(QT_STATE_CHANGED_T _chatMentionCompleter);
|
||||
void setChatMentionForeground(QT_STATE_CHANGED_T _chatMentionForeground);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue