|
Player12
An open source football management simulator
|
#include "gui/render/match_renderer_2d.h"#include <fmt/printf.h>#include <imgui.h>#include <algorithm>#include <array>#include <cfloat>#include <cmath>#include <cstdint>#include <format>#include <numbers>#include <span>#include <string>#include <vector>#include "global/language_manager.h"#include "gui/render/match_kit_colors.h"#include "gui/render/match_render_2d_tuning.h"#include "gui/render/match_render_math.h"#include "gui/render/match_shirt_numbers.h"#include "gui/render/match_stadium_3d.h"#include "gui/widgets/theme.h"#include "model/player.h"#include "model/role_utils.h"Classes | |
| struct | MatchRenderer2D::State |
Namespaces | |
| namespace | PitchMetres |
Functions | |
| const char * | playerIntentLabel (PlayerIntent intent) |
| MatchViewport | computeMatchViewport (float topLeftX, float topLeftY, float availableWidth, float availableHeight) |
| void | drawGoalCelebration (ImDrawList &drawList, const MatchViewport &viewport, int homeScore, int awayScore, float celebrationRemaining, float celebrationDuration) |
| MatchViewport computeMatchViewport | ( | float | topLeftX, |
| float | topLeftY, | ||
| float | availableWidth, | ||
| float | availableHeight | ||
| ) |
Fits the pitch into the available screen space at its real 105 x 68 m proportions (never stretched); the caller centres the result.
| void drawGoalCelebration | ( | ImDrawList & | drawList, |
| const MatchViewport & | viewport, | ||
| int | homeScore, | ||
| int | awayScore, | ||
| float | celebrationRemaining, | ||
| float | celebrationDuration | ||
| ) |
Goal flash and banner centred on the viewport; shared by both views.
| const char * playerIntentLabel | ( | PlayerIntent | intent | ) |
Short English description of a player's current intent (tooltips).