Changeset 7884 in orxonox.OLD for branches/gui/src
- Timestamp:
- May 27, 2006, 2:24:51 AM (19 years ago)
- Location:
- branches/gui/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_handler.cc
r7883 r7884 95 95 { 96 96 if (event.bPressed) 97 { 97 98 GLGuiWidget::focused()->click(); 99 } 98 100 else 99 101 GLGuiWidget::focused()->release(); -
branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
r7883 r7884 69 69 70 70 71 /** @brief gives focus to this widget */ 72 void GLGuiWidget::giveFocus() 73 { 74 GLGuiWidget::_focused = this; 75 this->receivedFocus(); 76 }; 77 78 void GLGuiWidget::breakFocus() 79 { 80 GLGuiWidget::_focused = NULL; 81 this->removedFocus(); 82 }; 83 84 71 85 bool GLGuiWidget::focusOverWidget(const Vector2D& position) const 72 86 { … … 79 93 return this->focusOverWidget(cursor->getAbsCoor2D()); 80 94 } 95 96 void GLGuiWidget::click() 97 { 98 this->widgetSignals[Signal_click]("none"); 99 100 this->clicked(); 101 } 102 103 void GLGuiWidget::release() 104 { 105 this->widgetSignals[Signal_release]("none"); 106 107 this->released(); 108 } 109 81 110 82 111 -
branches/gui/src/lib/gui/gl_gui/glgui_widget.h
r7883 r7884 61 61 /// FOCUS 62 62 /** @brief gives focus to this widget */ 63 void giveFocus() { GLGuiWidget::_focused = this; this->receivedFocus(); };64 void breakFocus() { GLGuiWidget::_focused = NULL; this->removedFocus(); };63 void giveFocus(); 64 void breakFocus(); 65 65 /** @returns true if the widget is focusable */ 66 66 bool focusable() const { return this->_focusable; }; … … 77 77 78 78 /// CLICK 79 void click(); 80 void release(); 79 81 bool clickable() const { return this->_clickable; }; 80 82 void setClickable(bool clickable = true) { this->_clickable = clickable; }; 81 void click() { this->clicked(); };82 void release() { this->released(); };83 83 84 84 virtual void update() {}; -
branches/gui/src/story_entities/simple_game_menu.cc
r7883 r7884 74 74 rdnpb->show(); 75 75 rdnpb->setAbsCoor2D(200, 180); 76 rdnpb->connectSignal(OrxGui::Signal_release, this, createExecutor<SimpleGameMenu>(&SimpleGameMenu::quitMenu)); 76 77 77 78 … … 350 351 } 351 352 353 void SimpleGameMenu::quitMenu() 354 { 355 this->setNextStoryID(WORLD_ID_GAMEEND); 356 this->stop(); 357 } 358 352 359 353 360 /** -
branches/gui/src/story_entities/simple_game_menu.h
r7460 r7884 61 61 62 62 63 void startLevel(int level); 64 void quitMenu(); 65 66 void TEST() { printf("TEST\n"); } 67 63 68 protected: 64 69 virtual void tick();
Note: See TracChangeset
for help on using the changeset viewer.