Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10164 in orxonox.OLD


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

border made

Location:
branches/gui/src
Files:
7 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);
  • branches/gui/src/world_entities/elements/glgui_energywidget.cc

    r9406 r10164  
    3737    this->_valueText.setChangedTextColor(Color::white);
    3838
    39     //this->setBackgroundTexture("maps/gui_element_background_2.png");
     39    this->setBackgroundTexture("maps/gui_element_background_2.png");
    4040    this->setBackgroundColor(Color(.5,.5,.5,1));
    4141
  • branches/gui/src/world_entities/questGUI/quest.cc

    r10129 r10164  
    3737#include "glgui.h"
    3838#include "menu/glgui_imagebutton.h"
    39 #include "glgui_text.h"
     39#include "glgui_multiline_text.h"
    4040#include <glgui_image.h>
    4141
  • branches/gui/src/world_entities/questGUI/quest_gui.cc

    r10129 r10164  
    4343#include "glgui.h"
    4444#include "menu/glgui_imagebutton.h"
    45 #include "glgui_text.h"
     45#include "glgui_multiline_text.h"
    4646#include <glgui_image.h>
    4747
     
    7070 
    7171  this->bKillGui = false;
     72 
     73  this->background = "/pictures/map.jpg";
    7274
    7375  this->myQuest = new Quest(root);
     
    114116      questImage->loadImageFromFile(this->myQuest->getQuestPicture());
    115117      questImage->show();
    116       questImage->setBorderBottom(20);
     118      //questImage->setBorderBottom(20);
    117119      headerBox->pack(questImage);
    118       headerBox->setBorderBottom(20);
    119120     
    120121      OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
    121122      {
    122         OrxGui::GLGuiText* questDifficulty = new OrxGui::GLGuiText();
     123        OrxGui::GLGuiMultiLineText* questDifficulty = new OrxGui::GLGuiMultiLineText();
    123124        questDifficulty->setText(this->myQuest->getQuestDifficulty());
    124125        outlineBox->pack(questDifficulty);
    125126      }
    126127      headerBox->pack(outlineBox);
    127       headerBox->setBorderBottom(75);
     128      headerBox->setBorderBottom(100);
    128129     
    129130    }
     
    131132    OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
    132133    {
    133       OrxGui::GLGuiText* questTxt = new OrxGui::GLGuiText();
     134      OrxGui::GLGuiMultiLineText* questTxt = new OrxGui::GLGuiMultiLineText();
    134135      questTxt->setText(this->myQuest->getQuestDescription());
    135136      labelBox->pack(questTxt);
    136       labelBox->setBorderBottom(75);
     137      labelBox->setBorderBottom(100);
     138      labelBox->setBorderTop(100);
    137139    }
    138140   
     
    145147      rewardImage->show();
    146148      rewardBox->pack(rewardImage);
    147       rewardImage->setBorderBottom(50);
    148    
    149       OrxGui::GLGuiText* rewardTxt = new OrxGui::GLGuiText();
     149      //rewardImage->setBorderBottom(50);
     150   
     151      OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText();
    150152      rewardTxt->setText(this->myQuest->getRewardDescription());
    151153      rewardBox->pack(rewardTxt);
    152       rewardBox->setBorderBottom(75);
     154      rewardBox->setBorderBottom(100);
    153155     
    154156    }
     
    172174    this->questBox->showAll();
    173175   
    174     this->questBox->setAbsCoor2D(300, 40);
     176    this->questBox->setAbsCoor2D(300, 200);
    175177    OrxGui::GLGuiHandler::getInstance()->activate();
    176178    OrxGui::GLGuiHandler::getInstance()->activateCursor();
  • branches/gui/src/world_entities/questGUI/quest_gui.h

    r10129 r10164  
    2828    Quest*                  myQuest;
    2929    bool                    bKillGui;
     30    std::string             background;
    3031   
    3132    OrxGui::GLGuiBox*       headerBox;
Note: See TracChangeset for help on using the changeset viewer.