mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
[App] First-run tutorial
Took 5 minutes Took 3 minutes Took 2 minutes
This commit is contained in:
parent
46bdb6df32
commit
f4a1e9ff53
33 changed files with 1787 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "deck_analytics_widget.h"
|
||||
|
||||
#include "../general/tutorial/tutorial_controller.h"
|
||||
#include "../tabs/visual_deck_editor/tab_deck_editor_visual_tab_widget.h"
|
||||
#include "abstract_analytics_panel_widget.h"
|
||||
#include "add_analytics_panel_dialog.h"
|
||||
#include "analytics_panel_widget_factory.h"
|
||||
|
|
@ -7,6 +9,7 @@
|
|||
#include "analyzer_modules/mana_curve/mana_curve_config.h"
|
||||
#include "analyzer_modules/mana_devotion/mana_devotion_config.h"
|
||||
#include "deck_list_statistics_analyzer.h"
|
||||
#include "libcockatrice/utility/qt_utils.h"
|
||||
#include "resizable_panel.h"
|
||||
|
||||
#include <QEvent>
|
||||
|
|
@ -65,6 +68,46 @@ DeckAnalyticsWidget::DeckAnalyticsWidget(QWidget *parent, DeckListStatisticsAnal
|
|||
retranslateUi();
|
||||
}
|
||||
|
||||
TutorialSequence DeckAnalyticsWidget::generateTutorialSequence()
|
||||
{
|
||||
TutorialSequence analyticsSequence;
|
||||
analyticsSequence.name = tr("Deck Analytics");
|
||||
|
||||
TutorialStep introStep;
|
||||
introStep.targetWidget = this;
|
||||
introStep.text = tr("This is the deck analytics tab.\n\nHere, you can view more detailed information about your "
|
||||
"deck via the use of specialized analytics widgets.");
|
||||
introStep.onEnter = [this]() {
|
||||
auto tabWidget = QtUtils::findParentOfType<TabDeckEditorVisualTabWidget>(this);
|
||||
if (tabWidget) {
|
||||
tabWidget->setCurrentWidget(tabWidget->deckAnalytics);
|
||||
}
|
||||
};
|
||||
|
||||
analyticsSequence.addStep(introStep);
|
||||
|
||||
TutorialStep controlStep;
|
||||
controlStep.targetWidget = controlContainer;
|
||||
controlStep.text = tr(
|
||||
"These controls will allow you to customize your analytics widget layout.\n\nAll widgets can be resized or "
|
||||
"reordered with the handle at their bottom.\nTo remove a widget, you first have to select it.\nSaving your "
|
||||
"layout will ensure that it is the default for all future decks you open, whereas loading the layout will "
|
||||
"allow you to revert back to your previous configuration in case you decide you do not like your new layout.");
|
||||
|
||||
analyticsSequence.addStep(controlStep);
|
||||
|
||||
TutorialStep widgetStep;
|
||||
widgetStep.targetWidget = this;
|
||||
widgetStep.text =
|
||||
tr("Finally, let's talk about the analytics widgets themselves.\n\nHow the various analytics are displayed for "
|
||||
"each widget can be configured by clicking on the cogwheel next to the respective banner.\nHovering over "
|
||||
"the segments of different diagram types will reveal which cards belong to the respective segment.");
|
||||
|
||||
analyticsSequence.addStep(widgetStep);
|
||||
|
||||
return analyticsSequence;
|
||||
}
|
||||
|
||||
void DeckAnalyticsWidget::retranslateUi()
|
||||
{
|
||||
addButton->setText(tr("Add Panel"));
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#define DECK_ANALYTICS_WIDGET_H
|
||||
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
#include "../general/tutorial/tutorial_controller.h"
|
||||
#include "abstract_analytics_panel_widget.h"
|
||||
#include "deck_list_statistics_analyzer.h"
|
||||
#include "resizable_panel.h"
|
||||
|
|
@ -32,6 +33,7 @@ public:
|
|||
explicit DeckAnalyticsWidget(QWidget *parent, DeckListStatisticsAnalyzer *analyzer);
|
||||
void retranslateUi();
|
||||
void includeSideboardChanged(bool checked);
|
||||
TutorialSequence generateTutorialSequence();
|
||||
|
||||
private slots:
|
||||
void onAddPanel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue