MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / set_flags

Method set_flags

ui/UIRes.cpp:185–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void UISnazzyTextItem::set_flags(unsigned flags) {
186 // reset old stuff
187 if (m_flags & UISNAZZYTEXTF_BLINKING) {
188 m_data.f = 0;
189 set_color((ddgr_color)m_internaldata.i);
190 }
191
192 // set new stuff
193 m_flags = flags & (~UISNAZZYTEXTF_RESERVED);
194
195 if (m_flags & UISNAZZYTEXTF_BLINKING) {
196 m_data.f = 1.0f;
197 m_internaldata.i = (int)get_color();
198 } else {
199 m_data.i = 0;
200 m_internaldata.i = 0;
201 }
202}
203
204bool UISnazzyTextItem::draw(int x, int y, tUIDrawClass draw_class) {
205 if (m_flags & UISNAZZYTEXTF_BLINKING) {

Callers 3

OnLostFocusMethod · 0.80
OnGainFocusMethod · 0.80
OnDrawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected