| 225 | } |
| 226 | |
| 227 | void CUIWindow::CommitFocus(bool focus_lost) |
| 228 | { |
| 229 | if (m_bCursorOverWindowChanged && m_bCursorOverWindow == focus_lost) |
| 230 | { |
| 231 | if (m_bCursorOverWindow) |
| 232 | OnFocusLost(); |
| 233 | else |
| 234 | OnFocusReceive(); |
| 235 | m_bCursorOverWindowChanged = false; |
| 236 | } |
| 237 | |
| 238 | for (auto it = m_ChildWndList.begin(); m_ChildWndList.end() != it; ++it) |
| 239 | if ((*it)->IsShown()) |
| 240 | (*it)->CommitFocus(focus_lost); |
| 241 | } |
| 242 | |
| 243 | void CUIWindow::Update() |
| 244 | { |