Changeset 7988 in orxonox.OLD for branches/gui/src
- Timestamp:
- May 30, 2006, 6:42:08 PM (19 years ago)
- Location:
- branches/gui/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
r7985 r7988 70 70 this->_frontMat.setDiffuse(1.0, 0.0, 0.0); 71 71 this->_borderSize = 1.0; 72 73 this->widgetSignals.resize(SignalCount, SignalConnector());74 72 } 75 73 … … 123 121 { 124 122 assert (!this->_pushed); 125 this->widgetSignals[Signal_click]("none");126 123 this->_pushed = true; 127 124 … … 133 130 if (this->_pushed) 134 131 { 135 this->widgetSignals[Signal_release]("none");136 137 132 this->releasing(pos); 138 133 this->_pushed = false; … … 182 177 183 178 184 /**185 * @brief connects a Signal to the Gui-Elements' Event.186 * @param sinalType the Type of Signal to set. @see GLGuiSignalType187 * @param signal the name of the Signal188 */189 void GLGuiWidget::connectSignal(SignalType signalType, BaseObject* object, const Executor* signal)190 {191 if (signalType >= this->widgetSignals.size())192 return;193 194 // if (this->widgetSignals[signalType] != NULL)195 // PRINTF(2)("Already connected a Signal to '%s::%s' type %s... overwriting\n", this->getClassName(), this->getName(), "TEST");196 197 this->widgetSignals[signalType] = SignalConnector(object, signal);198 }199 200 /**201 * @brief removes a Signal from a Gui-ELements' Event202 * @param signalType the type of Signal to remove.203 */204 void GLGuiWidget::disconnectSignal(SignalType signalType)205 {206 if (signalType >= this->widgetSignals.size())207 return;208 209 this->widgetSignals[signalType] = SignalConnector();210 }211 212 213 179 void GLGuiWidget::show() 214 180 { -
branches/gui/src/lib/gui/gl_gui/glgui_widget.h
r7985 r7988 24 24 namespace OrxGui 25 25 { 26 typedef enum27 {28 Signal_click = 0,29 Signal_release,30 Signal_rollOn,31 Signal_rollOff,32 Signal_open,33 Signal_close,34 Signal_destroy,35 36 SignalCount,37 } SignalType;38 39 26 40 27 class GLGuiCursor; … … 55 42 void show(); 56 43 void hide(); 57 58 /// INTERCONNECTIVITY59 void connectSignal(SignalType signalType, BaseObject* obj, const Executor* signal);60 void disconnectSignal(SignalType signalType);61 44 62 45 … … 152 135 float _borderSize; 153 136 154 /// SIGNALS155 std::vector<SignalConnector> widgetSignals;156 157 137 /// EVENTS 158 138 bool _focusable; //!< If this widget can receive focus. -
branches/gui/src/story_entities/simple_game_menu.cc
r7985 r7988 89 89 dnpb->show(); 90 90 dnpb->setAbsCoor2D(350, 50); 91 dnpb->connectSignal(OrxGui::Signal_release, this, createExecutor<SimpleGameMenu>(&SimpleGameMenu::execURL)); 91 92 92 93 93 OrxGui::GLGuiPushButton* rdnpb = new OrxGui::GLGuiPushButton("Quit ORXONOX!!"); 94 94 rdnpb->show(); 95 95 rdnpb->setAbsCoor2D(200, 180); 96 rdnpb->connect Signal(OrxGui::Signal_release, this, SLOT(SimpleGameMenu, quitMenu));96 rdnpb->connect(SIGNAL(rdnpb, released), this, SLOT(SimpleGameMenu, quitMenu)); 97 97 98 98 OrxGui::GLGuiInputLine* input = new OrxGui::GLGuiInputLine();
Note: See TracChangeset
for help on using the changeset viewer.