Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10164 in orxonox.OLD for branches/gui/src/lib/gui


Ignore:
Timestamp:
Jan 3, 2007, 2:56:10 PM (17 years ago)
Author:
hejja
Message:

border made

Location:
branches/gui/src/lib/gui/gl
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/Makefile.am

    r9656 r10164  
    2525                glgui_frame.cc \
    2626                glgui_text.cc \
     27                glgui_multiline_text.cc \
    2728                glgui_inputline.cc \
    2829                glgui_textfield.cc \
     
    5354                glgui_frame.h \
    5455                glgui_text.h \
     56                glgui_multiline_text.h \
    5557                glgui_inputline.h \
    5658                glgui_textfield.h \
  • branches/gui/src/lib/gui/gl/glgui_container.cc

    r9869 r10164  
    4343    this->registerObject(this, GLGuiContainer::_objectList);
    4444
    45     this->setBackgroundTexture("gui_container_background.png");
     45//    this->setBackgroundTexture("gui_container_background.png");
    4646
    4747  }
  • branches/gui/src/lib/gui/gl/glgui_multiline_text.cc

    r10163 r10164  
    1616#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
    1717
    18 #include "glgui_text.h"
     18#include "glgui_multiline_text.h"
    1919
    2020#include "text.h"
     
    2222namespace OrxGui
    2323{
    24   ObjectListDefinition(GLGuiText);
     24  ObjectListDefinition(GLGuiMultiLineText);
    2525  /**
    2626   * standard constructor
    2727  */
    28   GLGuiText::GLGuiText ()
     28  GLGuiMultiLineText::GLGuiMultiLineText ()
    2929  {
    3030    this->init();
     
    3636   * standard deconstructor
    3737  */
    38   GLGuiText::~GLGuiText()
     38  GLGuiMultiLineText::~GLGuiMultiLineText()
    3939  {}
    4040
     
    4242   * initializes the GUI-element
    4343   */
    44   void GLGuiText::init()
     44  void GLGuiMultiLineText::init()
    4545  {
    46     this->registerObject(this, GLGuiText::_objectList);
     46    this->registerObject(this, GLGuiMultiLineText::_objectList);
    4747
    4848    this->_text.setParent2D(this);
     
    6161  * @param text The new Text.
    6262   */
    63   void GLGuiText::setText(const std::string& text)
     63  void GLGuiMultiLineText::setText(const std::string& text)
    6464  {
    6565    this->_text.setText(text);
     
    7171   * @param appendText the Text to append
    7272   */
    73   void GLGuiText::append(const std::string& appendText)
     73  void GLGuiMultiLineText::append(const std::string& appendText)
    7474  {
    7575    this->_text.append(appendText);
     
    8282   * @param character the Character to append.
    8383   */
    84   void GLGuiText::appendCharacter(char character)
     84  void GLGuiMultiLineText::appendCharacter(char character)
    8585  {
    8686    this->_text.appendCharacter(character);
     
    9393   * @param chars The count of characters to remove
    9494   */
    95   void GLGuiText::removeCharacters(unsigned int chars)
     95  void GLGuiMultiLineText::removeCharacters(unsigned int chars)
    9696  {
    9797    this->_text.removeCharacters(chars);
     
    9999  }
    100100
    101   void GLGuiText::clear()
     101  void GLGuiMultiLineText::clear()
    102102  {
    103103    this->_text.clear();
     
    111111  * This Function also emits the Signal textChanged.
    112112   */
    113   void GLGuiText::changedText()
     113  void GLGuiMultiLineText::changedText()
    114114  {
    115115    this->resize();
     
    118118  }
    119119
    120   void GLGuiText::setTextSize(float size)
     120  void GLGuiMultiLineText::setTextSize(float size)
    121121  {
    122122    this->_text.setSize(size);
     
    124124  }
    125125
    126   void GLGuiText::setFont(const Font& font)
     126  void GLGuiMultiLineText::setFont(const Font& font)
    127127  {
    128128    GLGuiWidget::setFont(font);
     
    130130  }
    131131
    132   void GLGuiText::setChangedTextColor(const Color& color)
     132  void GLGuiMultiLineText::setChangedTextColor(const Color& color)
    133133  {
    134134    this->_changedTextColor = color;
     
    138138   * @brief Resizes the Widget to the new Size-constraints.
    139139   */
    140   void GLGuiText::resize()
     140  void GLGuiMultiLineText::resize()
    141141  {
    142142    this->_text.setRelCoor2D(borderLeft(), borderTop());
     
    148148  }
    149149
    150   void GLGuiText::updateFrontColor()
     150  void GLGuiMultiLineText::updateFrontColor()
    151151  {
    152152    this->_text.setColor(foregroundColor());
    153153  }
    154154
    155   void GLGuiText::hiding()
     155  void GLGuiMultiLineText::hiding()
    156156  {
    157157    this->_text.setVisibility(false);
    158158  }
    159159
    160   void GLGuiText::showing()
     160  void GLGuiMultiLineText::showing()
    161161  {
    162162    this->_text.setVisibility(true);
     
    166166
    167167  /**
    168    * draws the GLGuiText
     168   * draws the GLGuiMultiLineText
    169169   */
    170   void GLGuiText::draw() const
     170  void GLGuiMultiLineText::draw() const
    171171  {
    172172    this->beginDraw();
  • branches/gui/src/lib/gui/gl/glgui_multiline_text.h

    r10163 r10164  
    11/*!
    2  * @file glgui_text.h
     2 * @file glgui_multiline_text.h
    33 * The gl_TEXT widget of th openglGUI
    44 *
    55 */
    66
    7 #ifndef _GLGUI_TEXT_H
    8 #define _GLGUI_TEXT_H
     7#ifndef _GLGUI_MULTILINE_TEXT_H
     8#define _GLGUI_MULTILINE_TEXT_H
    99
    1010#include "glgui_widget.h"
    11 #include "limited_width_text.h"
     11#include "multi_line_text.h"
    1212// FORWARD DECLARATION
    1313namespace OrxGui
     
    1818   *
    1919   */
    20   class GLGuiText : public GLGuiWidget
     20  class GLGuiMultiLineText : public GLGuiWidget
    2121  {
    22     ObjectListDeclaration(GLGuiText);
     22    ObjectListDeclaration(GLGuiMultiLineText);
    2323  public:
    24     GLGuiText();
    25     virtual ~GLGuiText();
     24    GLGuiMultiLineText();
     25    virtual ~GLGuiMultiLineText();
    2626
    2727    void setText(const std::string& text);
     
    3636
    3737    void setLineWidth(float lineWidth) { this->_text.setLineWidth(lineWidth); };
    38     void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); };
     38//    void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); };
    3939
    4040    const std::string& text() const { return _text.text(); };
     
    5757
    5858  private:
    59     LimitedWidthText    _text;
     59    MultiLineText       _text;
    6060
    6161    Color               _changedTextColor;
     
    6363}
    6464
    65 #endif /* _GLGUI_TEXT_H */
     65#endif /* _GLGUI_MULTILINE_TEXT_H */
  • branches/gui/src/lib/gui/gl/glgui_widget.cc

    r9869 r10164  
    112112
    113113
    114     this->setBackgroundColor(Color(.51, .3, .3, .5));
    115     this->setBackgroundColor(Color(.3, .5, .3, 1), OrxGui::Selected);
     114    this->setBackgroundColor(Color(.51, .3, .3, 0));
     115    this->setBackgroundColor(Color(.51, .3, .3, 0), OrxGui::Selected);
    116116    this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    117117    this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     
    127127
    128128    this->setBorderLeft(15);
    129     this->setBackgroundTexture("gui_element_background.png");
     129    //this->setBackgroundTexture("gui_element_background.png");
    130130
    131131    this->switchState(_state);
Note: See TracChangeset for help on using the changeset viewer.