mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-18 10:05:24 +00:00
various view architecture bits
This commit is contained in:
@@ -14,9 +14,12 @@ class ViewSystem;
|
||||
|
||||
class TextView : public View
|
||||
{
|
||||
size_t m_capacity;
|
||||
boo::IGraphicsBufferD* m_glyphBuf;
|
||||
boo::IVertexFormat* m_vtxFmt = nullptr; /* OpenGL only */
|
||||
boo::IShaderDataBinding* m_shaderBinding;
|
||||
const FontAtlas& m_fontAtlas;
|
||||
boo::IVertexFormat* m_bgVtxFmt = nullptr; /* OpenGL only */
|
||||
int m_validSlots = 0;
|
||||
|
||||
public:
|
||||
class System
|
||||
@@ -36,7 +39,7 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
TextView(ViewSystem& system, FontTag font, size_t initGlyphCapacity=256);
|
||||
TextView(ViewSystem& system, FontTag font, size_t capacity=256);
|
||||
|
||||
struct RenderGlyph
|
||||
{
|
||||
@@ -45,18 +48,18 @@ public:
|
||||
Zeus::CVector3f m_uv[4];
|
||||
Zeus::CColor m_color;
|
||||
|
||||
RenderGlyph(int& adv, const FontAtlas::Glyph& glyph, Zeus::CColor defaultColor);
|
||||
RenderGlyph(int& adv, const FontAtlas::Glyph& glyph, const Zeus::CColor& defaultColor);
|
||||
};
|
||||
std::vector<RenderGlyph>& accessGlyphs() {return m_glyphs;}
|
||||
void updateGlyphs() {m_validDynamicSlots = 0;}
|
||||
void updateGlyphs() {m_validSlots = 0;}
|
||||
|
||||
void typesetGlyphs(const std::string& str,
|
||||
Zeus::CColor defaultColor=Zeus::CColor::skWhite);
|
||||
const Zeus::CColor& defaultColor=Zeus::CColor::skWhite);
|
||||
void typesetGlyphs(const std::wstring& str,
|
||||
Zeus::CColor defaultColor=Zeus::CColor::skWhite);
|
||||
const Zeus::CColor& defaultColor=Zeus::CColor::skWhite);
|
||||
|
||||
void colorGlyphs(Zeus::CColor newColor);
|
||||
void colorGlyphsTypeOn(Zeus::CColor newColor, float startInterval=0.2, float fadeTime=0.5);
|
||||
void colorGlyphs(const Zeus::CColor& newColor);
|
||||
void colorGlyphsTypeOn(const Zeus::CColor& newColor, float startInterval=0.2, float fadeTime=0.5);
|
||||
void think();
|
||||
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
|
||||
Reference in New Issue
Block a user