Changeset 8479 in orxonox.OLD for branches/gui
- Timestamp:
- Jun 15, 2006, 4:55:00 PM (18 years ago)
- Location:
- branches/gui/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/graphics/text_engine/text.cc
r8448 r8479 159 159 } 160 160 161 162 /** 163 * @brief clears the Text Line (empies it). 164 */ 165 void Text::clear() 166 { 167 text.clear(); 168 this->setupTextWidth(); 169 } 161 170 162 171 /** -
branches/gui/src/lib/graphics/text_engine/text.h
r8448 r8479 40 40 const std::string& operator<<(const std::string& appendText); 41 41 void removeCharacters(unsigned int chars); 42 void clear(); 42 43 43 44 /// SETUP -
branches/gui/src/lib/gui/gl/glgui_inputline.cc
r8448 r8479 48 48 this->setFocusable(true); 49 49 50 this->_clearOnEnter = false; 50 51 this->_text.setParent2D(this); 51 52 this->_text.setRelCoor2D(4,4); … … 100 101 } 101 102 103 void GLGuiInputLine::clear() 104 { 105 this->_text.clear(); 106 this->changedText(); 107 } 108 102 109 /** 103 110 * @brief If the Text has been changed this function is called. … … 124 131 } 125 132 133 /** 134 * @brief handles the EnterPush-Event. 135 * 136 * Emmits th EnterPushed Signal with the current Line, 137 * and if _clearOnEnter is pushed clears the Line. 138 */ 139 void GLGuiInputLine::pushEnter() 140 { 141 emit(this->enterPushed(this->_text.getText())); 142 if (this->_clearOnEnter) 143 this->clear(); 144 } 145 126 146 127 147 /** … … 140 160 this->pressedKeyName = SDLK_BACKSPACE; 141 161 this->removeCharacters(1); 162 return true; 163 } 164 else if(event.type == SDLK_RETURN || event.type == SDLK_KP_ENTER) 165 { 166 this->pushEnter(); 142 167 return true; 143 168 } -
branches/gui/src/lib/gui/gl/glgui_inputline.h
r8448 r8479 38 38 void appendCharacter(char character); 39 39 void removeCharacters(unsigned int chars); 40 void clear(); 41 42 void clearOnEnter(bool clear = true) { this->_clearOnEnter = clear; }; 40 43 41 44 virtual void removedFocus(); … … 47 50 48 51 DeclareSignal1(textChanged, const std::string&); 52 DeclareSignal1(enterPushed, const std::string&); 49 53 50 54 protected: … … 57 61 private: 58 62 void init(); 63 void pushEnter(); 59 64 void changedText(); 65 60 66 61 67 private: 62 68 Text _text; //!< The Text to display inside of the InputLine. 69 bool _clearOnEnter; //!< Clear on Enter 63 70 64 71 Uint16 pressedKey; //!< the pressed key that will be repeated. -
branches/gui/src/story_entities/simple_game_menu.cc
r8475 r8479 100 100 box->pack(rdnpb); 101 101 102 OrxGui::GLGui PushButton* fullscreen = new OrxGui::GLGuiPushButton("Fullscreen");103 fullscreen->connect(SIGNAL(fullscreen, released), GraphicsEngine::getInstance(), SLOT(GraphicsEngine, toggleFullscreen));102 OrxGui::GLGuiCheckButton* fullscreen = new OrxGui::GLGuiCheckButton("Fullscreen"); 103 fullscreen->connect(SIGNAL(fullscreen, toggled), GraphicsEngine::getInstance(), SLOT(GraphicsEngine, setFullscreen)); 104 104 105 105 box->pack(fullscreen);
Note: See TracChangeset
for help on using the changeset viewer.