comparison engine/core/gui/console/console.cpp @ 378:64738befdf3b

bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 11 Jan 2010 23:34:52 +0000
parents 756b895e1dab
children 16c2b3ee59ce
comparison
equal deleted inserted replaced
377:fe6fb0e0ed23 378:64738befdf3b
163 std::string caption = "FIFE Console - FPS: "; 163 std::string caption = "FIFE Console - FPS: ";
164 float fps = 1e3/double(TimeManager::instance()->getAverageFrameTime()); 164 float fps = 1e3/double(TimeManager::instance()->getAverageFrameTime());
165 caption += boost::lexical_cast<std::string>(fps); 165 caption += boost::lexical_cast<std::string>(fps);
166 m_status->setCaption( caption ); 166 m_status->setCaption( caption );
167 } 167 }
168 168
169 void Console::updateAnimation() { 169 void Console::updateAnimation() {
170 if( m_hiding ) { 170 if (m_hiding){
171 setPosition( getX(), getY() - m_animationDelta); 171 setPosition(getX(), getY() - m_animationDelta);
172 } else { 172 if (getY() <= m_hiddenPos){
173 setPosition( getX(), getY() + m_animationDelta); 173 doHide();
174 } 174 m_animationTimer.stop();
175 175 }
176 if( !m_hiding && getY() >= 0 ) { 176 }else{
177 setPosition( getX(), 0 ); 177 setPosition(getX(), getY() + m_animationDelta);
178 m_animationTimer.stop(); 178 if (getY() >= 0){
179 } 179 setPosition(getX(), 0);
180 if( m_hiding && getY() <= m_hiddenPos ) { 180 m_animationTimer.stop();
181 doHide(); 181 }
182 m_animationTimer.stop(); 182 }
183 }
184 } 183 }
185 184
186 void Console::clear() { 185 void Console::clear() {
187 m_output->setText(""); 186 m_output->setText("");
188 } 187 }
244 println(resp); 243 println(resp);
245 } else { 244 } else {
246 FL_WARN(_log, LMsg("ConsoleExecuter not bind, but command received: ") << cmd.c_str()); 245 FL_WARN(_log, LMsg("ConsoleExecuter not bind, but command received: ") << cmd.c_str());
247 } 246 }
248 } 247 }
249 catch (FIFE::Exception & e) { 248 catch (const FIFE::Exception & e) {
250 FL_WARN(_log, LMsg("Console caught exception: ") << e.getMessage()); 249 FL_WARN(_log, LMsg("Console caught exception: ") << e.getMessage());
251 println(e.getMessage()); 250 println(e.getMessage());
252 } 251 }
253 } 252 }
254 253