- Timestamp:
- Jun 21, 2006, 2:39:52 PM (18 years ago)
- Location:
- branches/gui/src/lib/gui/gl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_handler.cc
r8669 r8671 97 97 98 98 } 99 100 void GLGuiHandler::selectNext() 101 { 102 const std::list<BaseObject*>* objects = ClassList::getList(CL_GLGUI_WIDGET); 103 if (objects) 104 { 105 std::list<BaseObject*>::const_iterator it ; 106 std::list<BaseObject*>::const_iterator currentIt = objects->begin(); 107 108 if (GLGuiWidget::selected() != NULL) 109 { 110 111 it = std::find(objects->begin(), objects->end(), GLGuiWidget::selected()); 112 if (it != objects->end()) 113 { 114 currentIt = it; 115 it++; 116 } 117 if (it == objects->end()) 118 it = objects->begin(); 119 } 120 else 121 { 122 it = objects->begin(); 123 } 124 125 for (; it != objects->end() && currentIt != it; ++it) 126 { 127 if (dynamic_cast<GLGuiWidget*>(*it)->selectable()) 128 { 129 dynamic_cast<GLGuiWidget*>(*it)->select(); 130 return; 131 } 132 } 133 134 } 135 } 136 99 137 100 138 … … 136 174 this->_cursor->setMaxBorders(Vector2D(event.resize.w, event.resize.h)); 137 175 break; 138 } 139 140 176 case SDLK_TAB: 177 if (event.bPressed) 178 this->selectNext(); 179 break; 180 } 141 181 142 182 if (GLGuiWidget::selected() != NULL) -
branches/gui/src/lib/gui/gl/glgui_handler.h
r8667 r8671 34 34 Vector2D cursorPositionRel(const GLGuiWidget* const widget) const; 35 35 36 void selectNext(); 37 36 38 void activate(); 37 39 void deactivate();
Note: See TracChangeset
for help on using the changeset viewer.