Player12
An open source football management simulator
Loading...
Searching...
No Matches
onboarding_overlay.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <array>
12#include <optional>
13#include <string>
14#include <vector>
15
17#include "model/next_action.h"
18#include "model/onboarding.h"
19
20class GameController;
21class GUIView;
22
27namespace GuidanceUI
28{
30std::optional<OnboardingTask> taskForSection(NavSection section);
31
34
36void noteVisit(GameController& controller, NavSection section);
37
39void openAction(GUIView* view, const NextAction& action);
40
42std::string text(const AnalysisLine& line);
43
49void renderScreenTip(NavSection section);
50
55void renderReclaimNotice(const GUIView* view);
56
58const char* tipKey(NavSection section);
59} // namespace GuidanceUI
60
66{
67 public:
69 void refresh(const GameController& controller);
71 void render(GUIView* view, float width);
72
74 static constexpr std::size_t MAX_ROWS = 3;
75
76 private:
77 struct Row
78 {
80 std::string title;
81 std::string reason;
82 };
83 std::vector<Row> rows;
85 bool refreshed = false;
86};
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
Home card: first-week checklist (while visible) and the top next steps with their reasons and a butto...
Definition onboarding_overlay.h:66
void render(GUIView *view, float width)
Definition onboarding_overlay.cpp:397
std::vector< Row > rows
Definition onboarding_overlay.h:83
bool refreshed
Definition onboarding_overlay.h:85
void refresh(const GameController &controller)
Definition onboarding_overlay.cpp:382
OnboardingState checklist
Definition onboarding_overlay.h:84
static constexpr std::size_t MAX_ROWS
Definition onboarding_overlay.h:74
Progress of the first-week checklist.
Definition onboarding.h:42
Guidance pieces shared by the management screens: first-visit screen tips, the first-week checklist a...
Definition onboarding_overlay.cpp:111
void renderScreenTip(NavSection section)
Definition onboarding_overlay.cpp:264
void noteVisit(GameController &controller, NavSection section)
Definition onboarding_overlay.cpp:158
std::string text(const AnalysisLine &line)
Definition onboarding_overlay.cpp:196
void openAction(GUIView *view, const NextAction &action)
Definition onboarding_overlay.cpp:164
void renderReclaimNotice(const GUIView *view)
Definition onboarding_overlay.cpp:339
const char * tipKey(NavSection section)
Definition onboarding_overlay.cpp:201
NavSection sectionForTask(OnboardingTask task)
Definition onboarding_overlay.cpp:135
std::optional< OnboardingTask > taskForSection(NavSection section)
Definition onboarding_overlay.cpp:112
NavSection
Screens of the management shell. The sidebar groups them into a few hubs (Home, Inbox,...
Definition nav_history.h:26
OnboardingTask
Steps of the first-week checklist of a new career.
Definition onboarding.h:22
A localised line: key plus arguments ({0}, {1}...).
Definition match_analysis.h:116
One ranked piece of pending work with the reason it matters.
Definition next_action.h:51
Definition onboarding_overlay.h:78
std::string reason
Definition onboarding_overlay.h:81
NextAction action
Definition onboarding_overlay.h:79
std::string title
Definition onboarding_overlay.h:80