Changeset 5998 for code/branches/console/src
- Timestamp:
- Oct 28, 2009, 11:03:30 AM (15 years ago)
- Location:
- code/branches/console/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/libraries/core/IOConsole.cc
r5995 r5998 112 112 unsigned char c = 0; 113 113 std::string escapeSequence; 114 EscapeMode escapeMode = EscapeMode::None;114 EscapeMode::Value escapeMode = EscapeMode::None; 115 115 while (read(STDIN_FILENO, &c, 1) == 1) 116 116 { … … 118 118 escapeMode = EscapeMode::Second; 119 119 // Get Alt+Tab combination when switching applications 120 else if (escapeMode == First && c == '\t')120 else if (escapeMode == EscapeMode::First && c == '\t') 121 121 { 122 122 this->buffer_->buttonPressed(KeyEvent(KeyCode::Tab, '\t', KeyboardModifier::Alt)); … … 236 236 //std::cout << std::fixed << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgFPS() << " fps, " << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgTickTime() << " ms avg ticktime # "; 237 237 // Indicate a command prompt 238 std::cout << promptString ;238 std::cout << promptString_g; 239 239 // Save cursor position 240 240 std::cout << "\033[s"; … … 258 258 } 259 259 // Check terminal size 260 /* 260 261 int x, y; 261 262 if (this->getTerminalSize(&x, &y) && (x < statusTextWidth_g || y < (2 + statusTextHeight_g))) … … 264 265 return; 265 266 } 267 */ 266 268 } 267 269 } … … 358 360 { 359 361 // Save cursor position and move it to the beginning of the first output line 360 std::cout << "\033[s\033[" << (1 + statusTextHeight_g) << "F";362 std::cout << "\033[s\033[" << (1 + 0/*statusTextHeight_g*/) << "F"; 361 363 // Erase the line 362 364 std::cout << "\033[K"; … … 375 377 { 376 378 // Save cursor and move it to the beginning of the first status line 377 std::cout << "\033[s\033[" << statusTextHeight_g<< "F";379 std::cout << "\033[s\033[" << 0/*statusTextHeight_g*/ << "F"; 378 380 // Create a new line and move cursor to the beginning of it (one cell up) 379 381 std::cout << std::endl << "\033[1F"; … … 381 383 this->printLogText(*(this->shell_.getNewestLineIterator())); 382 384 // Restore cursor (for horizontal position) and move it down again (just in case the lines were shifted) 383 std::cout << "\033[u\033[" << (1 + statusTextHeight_g) << "B";385 std::cout << "\033[u\033[" << (1 + 0/*statusTextHeight_g*/) << "B"; 384 386 std::cout.flush(); 385 387 } -
code/branches/console/src/libraries/core/IOConsole.h
r5995 r5998 58 58 int getTerminalSize(int* x, int* y); 59 59 60 void print (const std::string& line);60 void printLogText(const std::string& line); 61 61 void printInputLine(); 62 62 void printStatusLines();
Note: See TracChangeset
for help on using the changeset viewer.