17 #include "GUITextLayout.h" 19 #include "utils/ColorUtils.h" 20 #include "utils/Geometry.h" 30 offsetX = offsetY = 0;
33 scrollSpeed = CScrollInfo::defaultSpeed;
39 changed |= textColor.Update();
40 changed |= shadowColor.Update();
41 changed |= selectedColor.Update();
42 changed |= disabledColor.Update();
43 changed |= focusedColor.Update();
44 changed |= invalidColor.Update();
62 std::string scrollSuffix;
95 bool Process(
unsigned int currentTime);
105 bool SetMaxRect(
float x,
float y,
float w,
float h);
107 bool SetAlign(uint32_t align);
114 bool SetText(
const std::string &label);
121 bool SetTextW(
const std::wstring &label);
129 bool SetStyledText(
const vecText& text,
const std::vector<UTILS::COLOR::Color>& colors);
135 bool SetColor(
COLOR color);
147 bool SetScrolling(
bool scrolling);
184 float GetMaxWidth()
const;
191 float CalcTextWidth(
const std::wstring& text)
const {
return m_textLayout.GetTextWidth(text); }
193 const CLabelInfo& GetLabelInfo()
const {
return m_label; }
194 CLabelInfo& GetLabelInfo() {
return m_label; }
219 UTILS::COLOR::Color GetColor()
const;
226 void UpdateRenderRect();
237 bool m_invalid =
true;
238 COLOR m_color = COLOR_TEXT;
239 unsigned int m_maxScrollLoops = ~0
U;
constexpr int XBFONT_LEFT
Align X left.
Definition: GUIFont.h:38
Class for rendering text labels. Handles alignment and rendering of text within a control...
Definition: GUILabel.h:69
float CalcTextWidth(const std::wstring &text) const
Calculates the width of some text.
Definition: GUILabel.h:191
OVER_FLOW
allowed overflow handling techniques for labels, as defined by the skin
Definition: GUILabel.h:82
void SetRenderRect(const CRect &rect)
Set the final layout of the current text Overrides the calculated layout of the current text...
Definition: GUILabel.h:142
Definition: GUITextLayout.h:57
float GetTextWidth() const
Returns the precalculated full width of the current text, regardless of layout.
Definition: GUILabel.h:177
Definition: GUILabel.h:22
#define U(j)
uj for division
Definition: bigint.c:73
const CRect & GetRenderRect() const
Returns the precalculated final layout of the current text.
Definition: GUILabel.h:171
void SetScrollLoopCount(unsigned int loopCount)
Set max. text scroll count.
Definition: GUILabel.h:151
Definition: GUIFont.h:107
Definition: GUIInfoColor.h:30