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

Method draw

ui/UIRes.cpp:96–123  ·  view source on GitHub ↗

Inheritable functions

Source from the content-addressed store, hash-verified

94
95// Inheritable functions
96bool UITextItem::draw(int x, int y, tUIDrawClass draw_class) {
97 int i;
98
99 ui_DrawSetFont(m_Font);
100 ui_SetCharAlpha(m_Alpha);
101
102 if (draw_class == uiDrawAlphaSaturate) {
103 ui_DrawSetTextType(UI_TEXTTYPE_SATURATE);
104 ui_DrawString(m_Color, x, y, m_Text);
105 for (i = 0; i < UITextItem::m_Sat; i++)
106 ui_DrawString(m_Color, x, y, m_Text);
107 } else if (draw_class == uiDrawFaded) {
108 ui_DrawSetTextType(0);
109 ui_SetCharAlpha(m_Alpha / 2);
110 ui_DrawString(m_Color, x, y, m_Text);
111 ui_DrawSetTextType(UI_TEXTTYPE_SATURATE);
112 for (i = 0; i < UITextItem::m_Sat; i++)
113 ui_DrawString(m_Color, x, y, m_Text);
114 } else {
115 ui_DrawSetTextType(0);
116 ui_DrawString(m_Color, x, y, m_Text);
117 ui_DrawSetTextType(UI_TEXTTYPE_SATURATE);
118 for (i = 0; i < UITextItem::m_Sat; i++)
119 ui_DrawString(m_Color, x, y, m_Text);
120 }
121
122 return true;
123}
124
125int UITextItem::width() {
126 ui_DrawSetFont(m_Font);

Callers 11

OnDrawMethod · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45
LoadGameDialogCBFunction · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45
OnDrawMethod · 0.45

Calls 11

ui_DrawSetFontFunction · 0.85
ui_SetCharAlphaFunction · 0.85
ui_DrawSetTextTypeFunction · 0.85
ui_DrawStringFunction · 0.85
GR_COLOR_REDFunction · 0.85
GR_COLOR_GREENFunction · 0.85
GR_COLOR_BLUEFunction · 0.85
ui_DrawBitmapFunction · 0.85
ui_DrawSetAlphaFunction · 0.85
ui_DrawRectFunction · 0.85
GR_RGBFunction · 0.50

Tested by

no test coverage detected