Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchInsightsView Class Reference

The Analysis tab of the match report: a written summary, the xG race with final-third pressure, the shot map, key moments, both pass networks and touch maps. Everything shown is cached in build(); render() only lays out and draws (ImDrawList), with a tooltip on every mark. More...

#include <match_insights_view.h>

Classes

struct  HeatChoice
 
struct  MomentRow
 
struct  Network
 
struct  NetworkEdge
 
struct  NetworkNode
 
struct  ShotMark
 
struct  StepPoint
 

Public Member Functions

void build (const GameController &controller, const MatchReport &report, const std::optional< ManagedMatchSnapshot > &snapshot, const std::string &home_name, const std::string &away_name)
 
bool available () const
 
void render (const GUIView *view)
 

Private Member Functions

void renderSummary (float width) const
 
void renderTimeline (float width)
 
void renderShotMap (float width)
 
void renderMoments (float width)
 
void renderNetwork (std::size_t side, float width, bool selector)
 
void renderHeatmap (float width)
 
void selectHeat (std::size_t side, std::size_t choice)
 
void buildCellTooltips ()
 

Private Attributes

bool has_data = false
 
bool has_detail = false
 
std::array< std::string, 2 > names
 
std::vector< std::string > summary
 
float axis_end = 90.0f
 
float xg_top = 1.0f
 
std::array< std::vector< StepPoint >, 2 > xg_steps
 
std::array< std::string, 2 > xg_totals
 
std::array< std::vector< int >, 2 > pressure
 
int pressure_top = 1
 
std::vector< std::string > bucket_tooltips
 
std::vector< std::string > axis_labels
 
std::vector< ShotMark > shots
 
std::string shot_note
 
std::vector< MomentRow > moments
 
int focus_moment = -1
 
int picked_moment = -1
 
int hovered_moment = -1
 
std::array< Network, 2 > networks
 
int network_side = 0
 
std::array< std::vector< HeatChoice >, 2 > heat
 
std::array< std::vector< std::size_t >, 2 > heat_detail
 
int heat_side = 0
 
std::size_t heat_choice = 0
 
std::array< std::string, MatchTracking::CELLS > cell_tooltips
 
int cell_tooltip_side = -1
 
std::size_t cell_tooltip_choice = 0
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Detailed Description

The Analysis tab of the match report: a written summary, the xG race with final-third pressure, the shot map, key moments, both pass networks and touch maps. Everything shown is cached in build(); render() only lays out and draws (ImDrawList), with a tooltip on every mark.

Member Function Documentation

◆ available()

bool MatchInsightsView::available ( ) const
inline

◆ build()

void MatchInsightsView::build ( const GameController &  controller,
const MatchReport &  report,
const std::optional< ManagedMatchSnapshot > &  snapshot,
const std::string &  home_name,
const std::string &  away_name 
)

Caches the view of a played match; available() is false when the match was not tracked (other clubs' fixtures, quick results).

◆ buildCellTooltips()

void MatchInsightsView::buildCellTooltips ( )
private

◆ render()

void MatchInsightsView::render ( const GUIView *  view)

◆ renderHeatmap()

void MatchInsightsView::renderHeatmap ( float  width)
private

◆ renderMoments()

void MatchInsightsView::renderMoments ( float  width)
private

◆ renderNetwork()

void MatchInsightsView::renderNetwork ( std::size_t  side,
float  width,
bool  selector 
)
private

◆ renderShotMap()

void MatchInsightsView::renderShotMap ( float  width)
private

◆ renderSummary()

void MatchInsightsView::renderSummary ( float  width) const
private

◆ renderTimeline()

void MatchInsightsView::renderTimeline ( float  width)
private

◆ selectHeat()

void MatchInsightsView::selectHeat ( std::size_t  side,
std::size_t  choice 
)
private

Friends And Related Symbol Documentation

◆ GameFlowTest_GUIFlowLifecycle_Test

friend class GameFlowTest_GUIFlowLifecycle_Test
friend

Member Data Documentation

◆ axis_end

float MatchInsightsView::axis_end = 90.0f
private

◆ axis_labels

std::vector<std::string> MatchInsightsView::axis_labels
private

◆ bucket_tooltips

std::vector<std::string> MatchInsightsView::bucket_tooltips
private

◆ cell_tooltip_choice

std::size_t MatchInsightsView::cell_tooltip_choice = 0
private

◆ cell_tooltip_side

int MatchInsightsView::cell_tooltip_side = -1
private

◆ cell_tooltips

std::array<std::string, MatchTracking::CELLS> MatchInsightsView::cell_tooltips
private

Cell tooltips of the shown touch map (rebuilt when it changes).

◆ focus_moment

int MatchInsightsView::focus_moment = -1
private

Moment under the cursor or picked in the list (-1: none).

◆ has_data

bool MatchInsightsView::has_data = false
private

◆ has_detail

bool MatchInsightsView::has_detail = false
private

◆ heat

std::array<std::vector<HeatChoice>, 2> MatchInsightsView::heat
private

◆ heat_choice

std::size_t MatchInsightsView::heat_choice = 0
private

◆ heat_detail

std::array<std::vector<std::size_t>, 2> MatchInsightsView::heat_detail
private

Per choice.

◆ heat_side

int MatchInsightsView::heat_side = 0
private

◆ hovered_moment

int MatchInsightsView::hovered_moment = -1
private

Set while drawing the list (next frame).

◆ moments

std::vector<MomentRow> MatchInsightsView::moments
private

◆ names

std::array<std::string, 2> MatchInsightsView::names
private

◆ network_side

int MatchInsightsView::network_side = 0
private

◆ networks

std::array<Network, 2> MatchInsightsView::networks
private

◆ picked_moment

int MatchInsightsView::picked_moment = -1
private

◆ pressure

std::array<std::vector<int>, 2> MatchInsightsView::pressure
private

◆ pressure_top

int MatchInsightsView::pressure_top = 1
private

◆ shot_note

std::string MatchInsightsView::shot_note
private

◆ shots

std::vector<ShotMark> MatchInsightsView::shots
private

◆ summary

std::vector<std::string> MatchInsightsView::summary
private

◆ xg_steps

std::array<std::vector<StepPoint>, 2> MatchInsightsView::xg_steps
private

◆ xg_top

float MatchInsightsView::xg_top = 1.0f
private

◆ xg_totals

std::array<std::string, 2> MatchInsightsView::xg_totals
private

The documentation for this class was generated from the following files: