Files
projecte_2026/source/core/rendering/render_info.hpp
2026-04-05 21:34:38 +02:00

38 lines
851 B
C++

#pragma once
class RenderInfo {
public:
// Singleton
static void init();
static void destroy();
static auto get() -> RenderInfo*;
// Métodos principales
void update(float delta_time);
void render() const;
void toggle();
// Consultas
[[nodiscard]] auto isActive() const -> bool { return status_ != Status::HIDDEN; }
// Altura fija del overlay (TEXT_SIZE(6) + PADDING_V(2) * 2)
static constexpr int HEIGHT = 10;
static constexpr float SLIDE_SPEED = 120.0F;
private:
enum class Status { HIDDEN,
RISING,
ACTIVE,
VANISHING };
// Singleton
static RenderInfo* render_info;
// Constructor y destructor privados [SINGLETON]
RenderInfo();
~RenderInfo() = default;
Status status_{Status::HIDDEN};
float y_{static_cast<float>(-HEIGHT)};
};