18 void LoadFromNode(
const XNode* pNode)
override;
19 [[nodiscard]]
auto Copy()
const ->
BitmapText*
override;
36 return !operator==(other);
38 void SetStrokeColor(
RageColor const& c) { m_stroke_color = c; }
39 [[nodiscard]]
auto GetStrokeColor()
const ->
RageColor const&
41 return m_stroke_color;
50 if (BMT_Tweens.empty()) {
54 return BMT_Tweens.back();
57 [[nodiscard]]
auto BMT_DestTweenState() const -> BMT_TweenState const&
59 return const_cast<BitmapText*
>(
this)->BMT_DestTweenState();
62 void SetCurrentTweenStart()
override;
63 void EraseHeadTween()
override;
64 void UpdatePercentThroughTween(
float between)
override;
65 void BeginTweening(
float time,
ITween* interp)
override;
68 virtual void BeginTweening(
float time, TweenType tt = TWEEN_LINEAR)
override
70 Actor::BeginTweening(time, tt);
72 void StopTweening()
override;
73 void FinishTweening()
override;
75 auto LoadFromFont(
const std::string& sFontName) -> bool;
76 auto LoadFromTextureAndChars(
const std::string& sTexturePath,
77 const std::string& sChars) -> bool;
78 virtual void SetText(
const std::string& sText,
79 const std::string& sAlternateText =
"",
80 int iWrapWidthPixels = -1);
81 void SetVertSpacing(
int iSpacing);
82 void SetMaxWidth(
float fMaxWidth);
83 void SetMaxHeight(
float fMaxHeight);
84 void SetMaxDimUseZoom(
bool use);
85 void SetWrapWidthPixels(
int iWrapWidthPixels);
86 void CropLineToWidth(
size_t l,
int width);
87 void CropToWidth(
int width);
92 void SetUppercase(
bool b);
93 void SetRainbowScroll(
bool b) { m_bRainbowScroll = b; }
94 void SetJitter(
bool b) { m_bJitter = b; }
95 void SetDistortion(
float f);
96 void UnSetDistortion();
97 void set_mult_attrs_with_diffuse(
bool m);
98 [[nodiscard]]
auto get_mult_attrs_with_diffuse() const ->
bool;
100 void SetHorizAlign(
float f) override;
104 BMT_DestTweenState().SetStrokeColor(c);
106 auto GetStrokeColor() ->
RageColor const&
108 return BMT_DestTweenState().GetStrokeColor();
110 void SetCurrStrokeColor(
const RageColor& c)
112 BMT_current.SetStrokeColor(c);
114 auto GetCurrStrokeColor() ->
RageColor const&
116 return BMT_current.GetStrokeColor();
119 void SetTextGlowMode(TextGlowMode tgm) { m_TextGlowMode = tgm; }
121 void GetLines(std::vector<std::wstring>& wTextLines)
const
123 wTextLines = m_wTextLines;
126 [[nodiscard]]
auto GetLines() const -> const std::vector<std::wstring>&
131 [[nodiscard]]
auto GetText() const -> std::
string {
return m_sText; }
133 [[nodiscard]]
auto StringWillUseAlternate(
134 const std::string& sText,
135 const std::string& sAlternateText)
const -> bool;
143 void FromStack(lua_State* L,
int iPos);
146 [[nodiscard]]
auto GetDefaultAttribute() const ->
Attribute;
147 void AddAttribute(
size_t iPos, const
Attribute& attr);
148 void ClearAttributes();
151 void PushSelf(lua_State* L) override;
159 std::vector<std::wstring> m_wTextLines;
160 std::vector<
int> m_iLineWidths;
161 int m_iWrapWidthPixels;
164 bool m_MaxDimensionUsesZoom;
165 bool m_bRainbowScroll;
167 bool m_bUsingDistortion;
168 bool m_mult_attrs_with_diffuse;
173 std::map<
size_t,
Attribute> m_mAttributes;
174 bool m_bHasGlowAttribute;
176 TextGlowMode m_TextGlowMode;
180 void DrawChars(
bool bUseStrokeTexture);
181 void UpdateBaseZoom();
184 void SetTextInternal();
An actor that holds a Font and draws text to the screen.
Definition BitmapText.h:11
auto EarlyAbortDraw() const -> bool override
Allow the Actor to be aborted early.
Definition BitmapText.cpp:754
void DrawPrimitives() override
Draw the primitives of the Actor.
Definition BitmapText.cpp:762
Definition BitmapText.h:193
Definition RageTexture.h:14
Definition BitmapText.h:138
Definition BitmapText.h:22
Definition BitmapText.h:212
The textures used by the font.
Definition Font.h:15