Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8619 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_inputline.cc


Ignore:
Timestamp:
Jun 20, 2006, 1:24:11 PM (19 years ago)
Author:
bensch
Message:

trunk: merged the gui-branche back.
merged with command:
svn merge -r8520:HEAD https://svn.orxonox.net/orxonox/branches/gui
no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_inputline.cc

    r8518 r8619  
    5252    this->_text.setRelCoor2D(4,4);
    5353    this->_text.setFont("fonts/final_frontier.ttf", 20);
    54     this->_text.setColor(this->frontColor());
     54    this->_text.setLineWidth(400);
     55    this->_text.setDotsPosition(LimitedWidthText::Begin);
     56    this->_text.setColor(foregroundColor());
    5557    this->_text.setVisibility(false);
    5658    this->resize();
     59
     60    this->delayNext = 0.0;
     61    this->pressedKey = SDLK_FIRST;
     62    this->pressedKeyName = SDLK_FIRST;
    5763
    5864  }
     
    116122    this->resize();
    117123    this->setFrontColor(Color(1,1,1,1), true);
    118     this->setFrontColor(Color(0,1,0,1));
    119     emit(this->textChanged(this->_text.getText()));
     124    emit(this->textChanged(this->_text.text()));
    120125  }
    121126
     
    139144  void GLGuiInputLine::pushEnter()
    140145  {
    141     emit(this->enterPushed(this->_text.getText()));
     146    emit(this->enterPushed(this->_text.text()));
    142147    if (this->_clearOnEnter)
    143148      this->clear();
     
    197202  void GLGuiInputLine::resize()
    198203  {
    199     this->_text.setRelCoor2D(this->borderLeft(), this->borderTop());
     204    this->_text.setRelCoor2D(borderLeft(), borderTop());
    200205    this->setSize2D( this->_text.getSize2D() + Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));
    201206    GLGuiWidget::resize();
    202 /*    this->frontRect().setTopLeft(borderLeft(), borderTop());
    203     this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/
     207    /*    this->frontRect().setTopLeft(borderLeft(), borderTop());
     208        this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/
    204209  }
    205210
    206211  void GLGuiInputLine::updateFrontColor()
    207212  {
    208     this->_text.setColor(this->frontColor());
     213    this->_text.setColor(foregroundColor());
    209214  }
    210215
     
    228233    if (this->delayNext > 0.0)
    229234      this->delayNext -= dt;
    230         else if (this->pressedKey != SDLK_FIRST )
     235    else if (this->pressedKey != SDLK_FIRST )
    231236    {
    232237      this->delayNext = GLGuiInputLine::repeatRate;
     
    237242          break;
    238243        default:
    239         {
    240           if (likely(this->pressedKey < 127))
    241             this->appendCharacter(this->pressedKeyName);
    242         }
     244          {
     245            if (likely(this->pressedKey < 127))
     246              this->appendCharacter(this->pressedKeyName);
     247          }
    243248      }
    244249    }
     
    255260    GLGuiWidget::draw();
    256261
    257 //     this->frontMaterial().select();
    258 //     GLGuiWidget::drawRect(this->frontRect());
     262    //     this->frontMaterial().select();
     263    //     GLGuiWidget::drawRect(this->frontRect());
    259264
    260265    this->endDraw();
Note: See TracChangeset for help on using the changeset viewer.