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

Method Draw

ogsr_engine/xrGame/map_spot.cpp:169–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void CMiniMapSpot::Draw()
170{
171 CObject* O = Level().CurrentViewEntity();
172 if (O && m_icon_above->inited() && m_icon_below->inited())
173 {
174 float ml_y = MapLocation()->GetLastPosition().y;
175 float d = O->Position().y - ml_y;
176
177 if (d > 1.8f)
178 {
179 GetUIStaticItem().SetShader(m_icon_below);
180 GetUIStaticItem().SetOriginalRect(m_tex_rect_below.x1, m_tex_rect_below.y1, m_tex_rect_below.width(), m_tex_rect_below.height());
181 }
182 else if (d < -1.8f)
183 {
184 GetUIStaticItem().SetShader(m_icon_above);
185 GetUIStaticItem().SetOriginalRect(m_tex_rect_above.x1, m_tex_rect_above.y1, m_tex_rect_above.width(), m_tex_rect_above.height());
186 }
187 else
188 {
189 GetUIStaticItem().SetShader(m_icon_normal);
190 GetUIStaticItem().SetOriginalRect(m_tex_rect_normal.x1, m_tex_rect_normal.y1, m_tex_rect_normal.width(), m_tex_rect_normal.height());
191 }
192 };
193
194 inherited::Draw();
195}

Callers 8

OnDrawUIMethod · 0.45
OnDrawUIMethod · 0.45
OnDrawUIMethod · 0.45
OnRenderMethod · 0.45
OnRenderMethod · 0.45
RenderMethod · 0.45
DoRenderDialogsMethod · 0.45
RenderMethod · 0.45

Calls 8

DrawFunction · 0.85
initedMethod · 0.80
GetLastPositionMethod · 0.80
PositionMethod · 0.80
SetShaderMethod · 0.45
SetOriginalRectMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected