mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 01:53:54 -07:00
[App] First-run tutorial
Took 5 minutes Took 3 minutes
This commit is contained in:
parent
98c00c55ed
commit
7168802bbf
33 changed files with 1786 additions and 12 deletions
|
|
@ -99,6 +99,21 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
|
|||
&DeckViewContainer::setVisualDeckStorageExists);
|
||||
|
||||
switchToDeckSelectView();
|
||||
generateTutorialSequence();
|
||||
}
|
||||
|
||||
TutorialSequence DeckViewContainer::generateTutorialSequence()
|
||||
{
|
||||
TutorialSequence deckViewContainerSequence;
|
||||
deckViewContainerSequence.name = tr("Loading and selecting decks");
|
||||
|
||||
deckViewContainerSequence.addStep(
|
||||
{this, tr("There are multiple ways to select a deck:\n\n- From a local file"
|
||||
"\n- From the contents of your clipboard\nFrom an external online service")});
|
||||
|
||||
deckViewContainerSequence = visualDeckStorageWidget->generateTutorialSequence(deckViewContainerSequence);
|
||||
|
||||
return deckViewContainerSequence;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#define DECK_VIEW_CONTAINER_H
|
||||
|
||||
#include "../../interface/deck_loader/deck_loader.h"
|
||||
#include "../../interface/widgets/general/tutorial/tutorial_controller.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
|
|
@ -82,6 +83,7 @@ signals:
|
|||
public:
|
||||
DeckViewContainer(int _playerId, TabGame *parent);
|
||||
void retranslateUi();
|
||||
TutorialSequence generateTutorialSequence();
|
||||
void setReadyStart(bool ready);
|
||||
void readyAndUpdate();
|
||||
void setSideboardLocked(bool locked);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ TabbedDeckViewContainer::TabbedDeckViewContainer(int _playerId, TabGame *parent)
|
|||
updateTabBarVisibility();
|
||||
}
|
||||
|
||||
TutorialSequence TabbedDeckViewContainer::generateTutorialSequence()
|
||||
{
|
||||
return playerDeckView->generateTutorialSequence();
|
||||
}
|
||||
|
||||
void TabbedDeckViewContainer::addOpponentDeckView(const DeckList &opponentDeck, int opponentId, QString opponentName)
|
||||
{
|
||||
if (opponentDeckViews.contains(opponentId)) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class TabbedDeckViewContainer : public QTabWidget
|
|||
|
||||
public:
|
||||
explicit TabbedDeckViewContainer(int _playerId, TabGame *parent);
|
||||
TutorialSequence generateTutorialSequence();
|
||||
void closeTab(int index);
|
||||
void updateTabBarVisibility();
|
||||
void addOpponentDeckView(const DeckList &opponentDeck, int opponentId, QString opponentName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue