23 mUpdateLabel(nullptr),
24 mUpdateValue(nullptr),
41 const float width = 140.0f;
42 const float pad = 5.0f;
51 const float middleX = width / 2.0f;
52 const float middleY = height / 2.0f;
81 mUpdateLabel->
SetText(
"Update:");
103 if (mTimeAccumulator < mUpdateInterval)
106 mTimeAccumulator = 0.0f;
Base class representing a 2D entity within a Scene.
SceneComponent2D mRootComponent
virtual void Update(float deltaTime)
Updates actor logic and root transform state.
virtual void Initialize()
Initializes the actor after creation.
Scene & GetScene()
Returns the owning Scene.
T * CreateSubobject(V arg)
Creates and attaches a 2D drawable subobject to this actor.
SceneComponent2D & GetTransform()
Access to the underlying SceneComponent2D (transform).
void SetPosition(const glm::vec2 &position)
Sets the quad position in 2D space.
virtual FrameMetrics GetFrameMetrics() const =0
Returns performance metrics of the last processed frame.
void AttachTo(SceneComponent2D *parent)
Attaches this scene component to a parent scene component.
IApplication * GetApplication()
Returns the application associated with this SceneManager.
Base class representing a renderable scene.
SceneManager & GetSceneManager()
Gets a reference to the SceneManager that owns this scene.
StatsOverlay(Scene &scene)
Constructs a StatsOverlay actor.
void Initialize() override
Creates and positions overlay visual elements.
void Update(float deltaTime) override
Updates displayed statistics each frame.
virtual void SetText(std::string text)
Sets the displayed text.
static AppConfig ReadConfigFile()
Reads application settings from the JSON config file.
Scene::Spawn<T> specializations for built-in drawable types.
bool useSmoothedFPS
Enable FPS smoothing and frame pacing behavior.
std::string fontName
Font family name.