mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 00:23:55 -07:00
Do not open card reveal windows when skipping in replays (#5157)
* create EventProcessingOption QFlag * pass EventProcessingOption all the way down * implement reveal skipping logic
This commit is contained in:
parent
dd04c610ec
commit
e894e78346
7 changed files with 58 additions and 22 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef REPLAY_TIMELINE_WIDGET
|
||||
#define REPLAY_TIMELINE_WIDGET
|
||||
|
||||
#include "../../game/player/player.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QMouseEvent>
|
||||
#include <QWidget>
|
||||
|
|
@ -12,11 +14,18 @@ class ReplayTimelineWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void processNextEvent();
|
||||
void processNextEvent(Player::EventProcessingOptions options);
|
||||
void replayFinished();
|
||||
void rewound();
|
||||
|
||||
private:
|
||||
enum PlaybackMode
|
||||
{
|
||||
NORMAL_PLAYBACK,
|
||||
FORWARD_SKIP,
|
||||
BACKWARD_SKIP
|
||||
};
|
||||
|
||||
QTimer *replayTimer;
|
||||
static constexpr int BASE_REWIND_BUFFERING_TIMEOUT_MS = 180;
|
||||
static constexpr int MAX_REWIND_BUFFERING_TIMEOUT_MS = 280;
|
||||
|
|
@ -33,7 +42,7 @@ private:
|
|||
void handleBackwardsSkip(bool doRewindBuffering);
|
||||
int calcRewindBufferingTimeout() const;
|
||||
void processRewind();
|
||||
void processNewEvents();
|
||||
void processNewEvents(PlaybackMode playbackMode);
|
||||
private slots:
|
||||
void replayTimerTimeout();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue