OdysseyDecomp/lib/al/Library/Play/Layout/SimpleLayoutTextHolder.h

44 lines
1.3 KiB
C++

#pragma once
#include <gfx/seadColor.h>
#include <math/seadVector.h>
namespace al {
class LayoutInitInfo;
class SimpleLayoutText;
class SimpleLayoutTextWrapper {
public:
SimpleLayoutTextWrapper(SimpleLayoutText* simpleLayoutText);
SimpleLayoutTextWrapper* start(const sead::Vector2f& pos, const char* str, s32 lifetime);
SimpleLayoutTextWrapper* start(const sead::Vector2f& pos, const char16* str, s32 lifetime);
SimpleLayoutTextWrapper* setScale(f32 scale);
SimpleLayoutTextWrapper* setColor(const sead::Color4u8& color);
SimpleLayoutTextWrapper* setPos(const sead::Vector2f& pos);
private:
SimpleLayoutText* mSimpleLayoutText;
};
struct SimpleLayoutTextHolderEntry {
SimpleLayoutTextHolderEntry(SimpleLayoutText* e) : text(e) {}
SimpleLayoutText* text;
};
class SimpleLayoutTextHolder {
public:
SimpleLayoutTextHolder(s32 amount, const LayoutInitInfo& info, const char* name,
const char* paneName, const char* archiveName);
void reset();
SimpleLayoutTextHolderEntry* start(const sead::Vector2f& pos, const char* str);
SimpleLayoutTextHolderEntry* start(const sead::Vector2f& pos, const char16* str);
private:
s32 mCurrentIndex = 0;
s32 mNumEntries = 0;
SimpleLayoutText** mLayouts;
SimpleLayoutTextHolderEntry** mEntries;
};
} // namespace al