Vultraz

Untitled

Jul 13th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. void context::cycle_focus()
  2. {
  3.     handler_list::iterator temp_focused_handler = focused_handler;
  4.  
  5.     for(++temp_focused_handler; temp_focused_handler != focused_handler; ++temp_focused_handler)
  6.         if(temp_focused_handler == handlers.end()) {
  7.             temp_focused_handler = handlers.begin();
  8.         }
  9.  
  10.         if(temp_focused_handler->requires_event_focus()) {
  11.             focused_handler = temp_focused_handler;
  12.             break;
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment