Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5208 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Sep 19, 2005, 8:36:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: first fruits of valgrind…. delete[] are fine now :)

Location:
trunk/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine.cc

    r5179 r5208  
    104104
    105105  tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, &fontSize);
    106   if (!tmpFont)
     106  if (tmpFont == NULL)
    107107  {
    108108    PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
  • trunk/src/lib/shell/shell.cc

    r5206 r5208  
    4141    ->describe("Deactivates the Shell. (moves it into background)")
    4242    ->setAlias("hide");
     43SHELL_COMMAND(textsize, Shell, setTextSize)
     44    ->describe("Sets the size of the Text (size, linespacing)");
    4345
    4446/**
     
    5759  this->setAbsCoor2D(3, -400);
    5860  this->textSize = 15;
    59   this->lineSpacing = 5;
     61  this->lineSpacing = 0;
    6062  this->bActive = false;
    6163
     
    7274  // EVENT-Handler subscription of '`' to all States.
    7375  EventHandler::getInstance()->subscribe(this, ES_ALL, SDLK_BACKQUOTE);
    74 
    7576}
    7677
     
    139140  this->textSize = textSize;
    140141  this->lineSpacing = lineSpacing;
    141 
    142   this->rebuildText();
     142  this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize);
     143
     144//  this->rebuildText();
    143145}
    144146
     
    150152void Shell::rebuildText()
    151153{
    152   this->shellInput->setFont("fonts/Aniron_Bold.ttf", this->textSize);
     154  this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize);
    153155  this->shellInput->setColor(1, 0, 0);
    154156  this->shellInput->setAlignment(TEXT_ALIGN_LEFT);
    155   this->shellInput->setText(NULL);
    156157  this->shellInput->setParent2D(this);
    157158  this->shellInput->setRelCoor2D(5, (this->textSize + this->lineSpacing)*this->bufferDisplaySize + this->textSize);
     
    176177  for (unsigned int i = 0; i < bufferDisplaySize; i++)
    177178  {
    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);
    179180    this->bufferText[i]->setColor(1, 0, 0);
    180181    this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
  • trunk/src/lib/shell/shell.h

    r5206 r5208  
    44 *
    55 * @todo check for smooth deletion process
     6 * @todo Buffer Display in different Colors for different debug mode.
    67 */
    78
     
    7879    unsigned int             lineSpacing;            //!< The Spacing between lines.
    7980    unsigned int             textSize;               //!< The size of the text.
     81    char*                    textFont;               //!< The file containing the font.
    8082
    8183    // HANDLING TEXT INPUT
  • trunk/src/lib/shell/shell_input.h

    r5204 r5208  
    22 * @file shell_input.h
    33 * @brief Definition of ...
     4 * @todo AutoCompletion should print nice output
     5 * @todo move up and down in Buffer
     6 * @todo display old shell Commands
    47*/
    58
Note: See TracChangeset for help on using the changeset viewer.