mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 17:43:23 -08:00
[App] First-run tutorial
Took 5 minutes Took 3 minutes Took 2 minutes
This commit is contained in:
parent
44d5138181
commit
3f5dd77457
33 changed files with 1778 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#include "deck_analytics_widget.h"
|
||||
|
||||
#include "../general/layout_containers/flow_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"
|
||||
|
|
@ -8,6 +10,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 <QCheckBox>
|
||||
|
|
@ -72,6 +75,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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue