3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/FontHandle.h"
7#include "mc/client/gui/FontSize.h"
8#include "mc/client/gui/TextAlignment.h"
9#include "mc/client/gui/controls/RenderableComponent.h"
10#include "mc/deps/core/math/Color.h"
25 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
26 ::ll::TypedStorage<8, 80, ::FontHandle> mPrimaryFontHandle;
27 ::ll::TypedStorage<8, 80, ::FontHandle> mBackupFontHandle;
28 ::ll::TypedStorage<4, 4, float> mTextOffset;
29 ::ll::TypedStorage<4, 16, ::mce::Color> mColor;
30 ::ll::TypedStorage<4, 4, float> mLockedAlpha;
31 ::ll::TypedStorage<4, 16, ::mce::Color> mLockedColor;
32 ::ll::TypedStorage<4, 4, ::ui::FontSize> mFontSize;
33 ::ll::TypedStorage<4, 4, float> mFontScaleFactor;
34 ::ll::TypedStorage<4, 4, float> mLinePadding;
35 ::ll::TypedStorage<4, 4, ::ui::TextAlignment> mAlignment;
36 ::ll::TypedStorage<8, 32, ::std::string> mLabel;
37 ::ll::TypedStorage<8, 32, ::std::string> mLabelTTS;
38 ::ll::TypedStorage<4, 4, float> mCurrentTime;
39 ::ll::TypedStorage<4, 4, int> mLastNumChanges;
40 ::ll::TypedStorage<8, 8, uint64> mLastTextHash;
41 ::ll::TypedStorage<8, 8, uint64> mLastFilteredTextHash;
42 ::ll::TypedStorage<8, 32, ::std::string> mFilteredText;
43 ::ll::TypedStorage<8, 32, ::std::string> mMeasuredText;
44 ::ll::TypedStorage<8, 32, ::std::string> mCachedText;
45 ::ll::TypedStorage<8, 32, ::std::string> mLOCCachedText;
46 ::ll::TypedStorage<8, 32, ::std::string> mCachedLangCode;
47 ::ll::TypedStorage<8, 32, ::std::string> mCachedFontSources;
48 ::ll::TypedStorage<8, 32, ::std::string> mCachedTextTTS;
49 ::ll::TypedStorage<8, 24, ::std::vector<int>> mCaretOffsets;
50 ::ll::TypedStorage<4, 4, float> mCaretHeightOffset;
51 ::ll::TypedStorage<4, 4, float> mLineHeight;
52 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mNotifyControlsOnEllipses;
53 ::ll::TypedStorage<8, 64, ::std::function<::std::pair<::FontHandle, ::FontHandle>(::std::string
const&)>>
54 mGetFontsFromFontTypeCallback;
55 ::ll::TypedStorage<4, 12, ::std::optional<::glm::vec2>> mLastClickRelativePosition;
57 bool mShouldRenderCaret : 1;
59 bool mCaretBlinkVisible : 1;
61 bool mEnableProfanityFilter : 1;
62 bool mProfanityFilterToggleState : 1;
63 bool mBackupFontHandleOverridden : 1;
64 bool mNotifyEllipsesOnSiblings : 1;
65 bool mCachedTextDirty : 1;
75 virtual ~TextComponent() ;
77 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
79 virtual void reset() ;
81 virtual void render(::UIRenderContext& context);
83 virtual void updateUI(::UIMeasureStrategy
const& context) ;
85 virtual ::std::string
const& getTextToSpeechComponentValue() const ;
91 MCAPI explicit TextComponent(::UIControl& owner);
93 MCAPI
bool _fontSourcesChanged();
95 MCAPI ::std::
string _getMeasuredText(::UIRenderContext& context);
97 MCAPI ::RectangleArea _getParentArea(::UIRenderContext& context);
99 MCAPI
void _notifyOnEllipses(
bool usingEllipses);
101 MCAPI
bool _updateCachedText();
103 MCAPI ::std::
string calculateUpdatedText();
105 MCAPI
void setFontType(::std::
string const& fontType);
107 MCAPI
void setText(::std::
string const& label);
109 MCAPI
void setTextTTS(::std::
string const& label);
115 MCAPI
void* $ctor(::UIControl& owner);
127 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
131 MCAPI
void $render(::UIRenderContext& context);
133 MCAPI
void $updateUI(::UIMeasureStrategy const& context);
135 MCFOLD ::std::
string const& $getTextToSpeechComponentValue() const;
Definition RectangleArea.h:5
Definition RenderableComponent.h:5
Definition TextComponent.h:5
static MCAPI void ** $vftable()
Definition UIComponent.h:5
Definition UIMeasureStrategy.h:5
Definition UIRenderContext.h:5