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

Method OnDraw

ui/UIHotspot.cpp:194–205  ·  view source on GitHub ↗

behavior when gadget is being drawn.

Source from the content-addressed store, hash-verified

192
193// behavior when gadget is being drawn.
194void UIHotspot::OnDraw() {
195 // draw simple background.
196 if (m_ItemCur) {
197 int x = (m_W / 2 - m_ItemCur->width() / 2);
198 int y = (m_H / 2 - m_ItemCur->height() / 2);
199 if (IsDisabled())
200 m_ItemCur->draw(x, y, uiDrawFaded);
201 else {
202 m_ItemCur->draw(x, y);
203 }
204 }
205}

Callers

nothing calls this directly

Calls 3

widthMethod · 0.45
heightMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected