template<typename T>
TnxContextOf class

Game state a widget reads: an entity of type T (TnxContextOf<EPlayer<>>), or a view model (TnxContextOf<ShopInfo>). Empty until given one.

Public static functions

static auto TypeName() -> std::string_view constexpr
What the asset names its type as.

Constructors, destructors, conversion operators

TnxContextOf() defaulted
Empty: reads nothing, and is said by name when its HUD is set (TnxUI::HudProblems).
TnxContextOf(WorldBase& world, EntityHandle entity)
entity of world, an entity of type T.
template<template<FieldWidth> class TEntity>
TnxContextOf(const ConstructView<TEntity>& view)
The entity a Construct's view shows: TnxContextOf<EPlayer<>>(Player->Body).
TnxContextOf(const TnxViewModel<T>& model)
A view model's values. The view model must outlive what reads it.
operator bool() const explicit
Whether it was given something to read.

Public functions

auto Get() const -> const GGUI::GGContextValue&
What its asset is given.