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;
84 OVER_FLOW_TRUNCATE = 0,
88 OVER_FLOW_TRUNCATE_LEFT
99 bool Process(
unsigned int currentTime);
109 bool SetMaxRect(
float x,
float y,
float w,
float h);
111 bool SetAlign(uint32_t align);
118 bool SetText(
const std::string &label);
125 bool SetTextW(
const std::wstring &label);
133 bool SetStyledText(
const vecText& text,
const std::vector<UTILS::COLOR::Color>& colors);
139 bool SetColor(
COLOR color);
151 bool SetScrolling(
bool scrolling);
188 float GetMaxWidth()
const;
195 float CalcTextWidth(
const std::wstring& text)
const {
return m_textLayout.GetTextWidth(text); }
197 const CLabelInfo& GetLabelInfo()
const {
return m_label; }
198 CLabelInfo& GetLabelInfo() {
return m_label; }
223 UTILS::COLOR::Color GetColor()
const;
230 void UpdateRenderRect();
241 bool m_invalid =
true;
242 COLOR m_color = COLOR_TEXT;
243 unsigned int m_maxScrollLoops = ~0
U;
constexpr int XBFONT_LEFT
Align X left.
Definition: GUIFont.h:39
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:195
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:146
Definition: GUITextLayout.h:56
float GetTextWidth() const
Returns the precalculated full width of the current text, regardless of layout.
Definition: GUILabel.h:181
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:175
void SetScrollLoopCount(unsigned int loopCount)
Set max. text scroll count.
Definition: GUILabel.h:155
Definition: GUIFont.h:110
Definition: GUIInfoColor.h:30