Files
shweets-sim/src/state/play/text.hpp
T
2026-09-01 17:18:24 -04:00

47 lines
1.0 KiB
C++

#pragma once
#include <imgui.h>
#include <string>
#include "../../entity.hpp"
#include "../../render/canvas.hpp"
#include "../../resources.hpp"
namespace game::state::play
{
class Text
{
int index{};
int updateDelay{};
int baseDelay{};
int currentDelay{};
bool isFinished{};
bool isTerminal{};
bool isStartEffectsApplied{};
bool isBlipQueued{};
bool isSceneActive{};
bool isAnimationEntryStarted{};
float animationEntryTimePrevious{};
std::string defaultAnimationOnEnd{};
void default_animation_on_end_play(Entity&);
public:
static constexpr auto LIFETIME = 10.0f;
resource::xml::Schema::Element* entry{};
bool isEnabled{true};
float time{};
void set(resource::xml::Schema::Element*, Entity&, bool isInterruptible = true, bool isSequenceAdvance = false,
std::string defaultAnimationOnEnd = {});
void update(Entity&, Canvas&);
bool is_interruptible() const;
bool is_finished() const;
bool is_terminal() const;
bool is_scene_active() const;
};
}