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

Method PopScissor

ogsr_engine/xrGame/ui_base.cpp:196–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void ui_core::PopScissor()
197{
198 if (UI()->m_currentPointType == IUIRender::pttLIT)
199 return;
200
201 VERIFY(!m_Scissors.empty());
202 m_Scissors.pop();
203
204 if (m_Scissors.empty())
205 UIRender->SetScissor(NULL);
206 else
207 {
208 const Frect& top = m_Scissors.top();
209 Irect tgt;
210 tgt.lt.x = iFloor(ClientToScreenScaledX(top.lt.x));
211 tgt.lt.y = iFloor(ClientToScreenScaledY(top.lt.y));
212 tgt.rb.x = iFloor(ClientToScreenScaledX(top.rb.x));
213 tgt.rb.y = iFloor(ClientToScreenScaledY(top.rb.y));
214
215 UIRender->SetScissor(&tgt);
216 }
217}
218
219ui_core::ui_core()
220{

Callers 7

RenderMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80

Calls 4

UIFunction · 0.85
SetScissorMethod · 0.80
emptyMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected