| 194 | } |
| 195 | |
| 196 | void 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 | |
| 219 | ui_core::ui_core() |
| 220 | { |