MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / DrawHighlightedText

Method DrawHighlightedText

ogsr_engine/xrGame/ui/UIButton.cpp:166–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void CUIButton::DrawHighlightedText()
167{
168 float right_offset;
169 float down_offset;
170
171 if (m_eButtonState == BUTTON_UP || m_eButtonState == BUTTON_NORMAL)
172 {
173 right_offset = 0.0f;
174 down_offset = 0.0f;
175 }
176 else
177 {
178 right_offset = m_PushOffset.x;
179 down_offset = m_PushOffset.y;
180 }
181
182 Frect rect;
183 GetAbsoluteRect(rect);
184 u32 def_col = m_pLines->GetTextColor();
185 m_pLines->SetTextColor(m_HighlightColor);
186
187 m_pLines->Draw(rect.left + right_offset + 0 + m_TextOffset.x + m_ShadowOffset.x, rect.top + down_offset - 0 + m_TextOffset.y + m_ShadowOffset.y);
188
189 m_pLines->SetTextColor(def_col);
190}
191
192void CUIButton::DrawText()
193{

Callers

nothing calls this directly

Calls 3

GetTextColorMethod · 0.45
SetTextColorMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected