Changeset 5208 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Sep 19, 2005, 8:36:45 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine.cc
r5179 r5208 104 104 105 105 tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, &fontSize); 106 if ( !tmpFont)106 if (tmpFont == NULL) 107 107 { 108 108 PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile); -
trunk/src/lib/shell/shell.cc
r5206 r5208 41 41 ->describe("Deactivates the Shell. (moves it into background)") 42 42 ->setAlias("hide"); 43 SHELL_COMMAND(textsize, Shell, setTextSize) 44 ->describe("Sets the size of the Text (size, linespacing)"); 43 45 44 46 /** … … 57 59 this->setAbsCoor2D(3, -400); 58 60 this->textSize = 15; 59 this->lineSpacing = 5;61 this->lineSpacing = 0; 60 62 this->bActive = false; 61 63 … … 72 74 // EVENT-Handler subscription of '`' to all States. 73 75 EventHandler::getInstance()->subscribe(this, ES_ALL, SDLK_BACKQUOTE); 74 75 76 } 76 77 … … 139 140 this->textSize = textSize; 140 141 this->lineSpacing = lineSpacing; 141 142 this->rebuildText(); 142 this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize); 143 144 // this->rebuildText(); 143 145 } 144 146 … … 150 152 void Shell::rebuildText() 151 153 { 152 this->shellInput->setFont("fonts/ Aniron_Bold.ttf", this->textSize);154 this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize); 153 155 this->shellInput->setColor(1, 0, 0); 154 156 this->shellInput->setAlignment(TEXT_ALIGN_LEFT); 155 this->shellInput->setText(NULL);156 157 this->shellInput->setParent2D(this); 157 158 this->shellInput->setRelCoor2D(5, (this->textSize + this->lineSpacing)*this->bufferDisplaySize + this->textSize); … … 176 177 for (unsigned int i = 0; i < bufferDisplaySize; i++) 177 178 { 178 this->bufferText[i] = TextEngine::getInstance()->createText("fonts/ Aniron_Bold.ttf", this->textSize, TEXT_RENDER_DYNAMIC);179 this->bufferText[i] = TextEngine::getInstance()->createText("fonts/dpquake_.ttf", this->textSize, TEXT_RENDER_DYNAMIC); 179 180 this->bufferText[i]->setColor(1, 0, 0); 180 181 this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT); -
trunk/src/lib/shell/shell.h
r5206 r5208 4 4 * 5 5 * @todo check for smooth deletion process 6 * @todo Buffer Display in different Colors for different debug mode. 6 7 */ 7 8 … … 78 79 unsigned int lineSpacing; //!< The Spacing between lines. 79 80 unsigned int textSize; //!< The size of the text. 81 char* textFont; //!< The file containing the font. 80 82 81 83 // HANDLING TEXT INPUT -
trunk/src/lib/shell/shell_input.h
r5204 r5208 2 2 * @file shell_input.h 3 3 * @brief Definition of ... 4 * @todo AutoCompletion should print nice output 5 * @todo move up and down in Buffer 6 * @todo display old shell Commands 4 7 */ 5 8
Note: See TracChangeset
for help on using the changeset viewer.