mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 01:53:25 -08:00
[Replay] Show the history sidebar in replay tabs
Add the Game History dock to the left of replay tabs, wire it to the replay timeline, and register it with the View menu and layout reset.
This commit is contained in:
parent
11f0dfac2d
commit
a2dd8551f2
5 changed files with 61 additions and 2 deletions
|
|
@ -66,6 +66,16 @@ public:
|
|||
return replayTimeline;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Index of the last event the game state has processed.
|
||||
*
|
||||
* @return The event index, or -1 while no event has been replayed yet
|
||||
*/
|
||||
[[nodiscard]] int getLastProcessedEventIndex() const
|
||||
{
|
||||
return currentEvent - 1;
|
||||
}
|
||||
|
||||
void setTimeScaleFactor(qreal _timeScaleFactor);
|
||||
void setSkipEmptySections(bool value);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
|
||||
class GameReplay;
|
||||
|
||||
int ReplayWidget::getLastProcessedEventIndex() const
|
||||
{
|
||||
return replayManager->getLastProcessedEventIndex();
|
||||
}
|
||||
|
||||
ReplayWidget::ReplayWidget(QWidget *parent, GameReplay *replay)
|
||||
: QWidget(parent), replayPlayButton(nullptr), replayFastForwardButton(nullptr), aReplaySkipForward(nullptr),
|
||||
aReplaySkipBackward(nullptr), aReplaySkipForwardBig(nullptr), aReplaySkipBackwardBig(nullptr)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ public:
|
|||
|
||||
[[nodiscard]] const QList<int> &getReplayTimeline() const;
|
||||
|
||||
/**
|
||||
* @brief Index of the last replay event the game state has processed, or -1 before the first event.
|
||||
*/
|
||||
[[nodiscard]] int getLastProcessedEventIndex() const;
|
||||
|
||||
public slots:
|
||||
void seekToEvent(int eventIndex);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue