- Timestamp:
- Jan 3, 2007, 2:56:10 PM (18 years ago)
- Location:
- branches/gui/src
- Files:
-
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/Makefile.am
r9656 r10164 25 25 glgui_frame.cc \ 26 26 glgui_text.cc \ 27 glgui_multiline_text.cc \ 27 28 glgui_inputline.cc \ 28 29 glgui_textfield.cc \ … … 53 54 glgui_frame.h \ 54 55 glgui_text.h \ 56 glgui_multiline_text.h \ 55 57 glgui_inputline.h \ 56 58 glgui_textfield.h \ -
branches/gui/src/lib/gui/gl/glgui_container.cc
r9869 r10164 43 43 this->registerObject(this, GLGuiContainer::_objectList); 44 44 45 this->setBackgroundTexture("gui_container_background.png");45 // this->setBackgroundTexture("gui_container_background.png"); 46 46 47 47 } -
branches/gui/src/lib/gui/gl/glgui_multiline_text.cc
r10163 r10164 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 #include "glgui_ text.h"18 #include "glgui_multiline_text.h" 19 19 20 20 #include "text.h" … … 22 22 namespace OrxGui 23 23 { 24 ObjectListDefinition(GLGui Text);24 ObjectListDefinition(GLGuiMultiLineText); 25 25 /** 26 26 * standard constructor 27 27 */ 28 GLGui Text::GLGuiText ()28 GLGuiMultiLineText::GLGuiMultiLineText () 29 29 { 30 30 this->init(); … … 36 36 * standard deconstructor 37 37 */ 38 GLGui Text::~GLGuiText()38 GLGuiMultiLineText::~GLGuiMultiLineText() 39 39 {} 40 40 … … 42 42 * initializes the GUI-element 43 43 */ 44 void GLGui Text::init()44 void GLGuiMultiLineText::init() 45 45 { 46 this->registerObject(this, GLGui Text::_objectList);46 this->registerObject(this, GLGuiMultiLineText::_objectList); 47 47 48 48 this->_text.setParent2D(this); … … 61 61 * @param text The new Text. 62 62 */ 63 void GLGui Text::setText(const std::string& text)63 void GLGuiMultiLineText::setText(const std::string& text) 64 64 { 65 65 this->_text.setText(text); … … 71 71 * @param appendText the Text to append 72 72 */ 73 void GLGui Text::append(const std::string& appendText)73 void GLGuiMultiLineText::append(const std::string& appendText) 74 74 { 75 75 this->_text.append(appendText); … … 82 82 * @param character the Character to append. 83 83 */ 84 void GLGui Text::appendCharacter(char character)84 void GLGuiMultiLineText::appendCharacter(char character) 85 85 { 86 86 this->_text.appendCharacter(character); … … 93 93 * @param chars The count of characters to remove 94 94 */ 95 void GLGui Text::removeCharacters(unsigned int chars)95 void GLGuiMultiLineText::removeCharacters(unsigned int chars) 96 96 { 97 97 this->_text.removeCharacters(chars); … … 99 99 } 100 100 101 void GLGui Text::clear()101 void GLGuiMultiLineText::clear() 102 102 { 103 103 this->_text.clear(); … … 111 111 * This Function also emits the Signal textChanged. 112 112 */ 113 void GLGui Text::changedText()113 void GLGuiMultiLineText::changedText() 114 114 { 115 115 this->resize(); … … 118 118 } 119 119 120 void GLGui Text::setTextSize(float size)120 void GLGuiMultiLineText::setTextSize(float size) 121 121 { 122 122 this->_text.setSize(size); … … 124 124 } 125 125 126 void GLGui Text::setFont(const Font& font)126 void GLGuiMultiLineText::setFont(const Font& font) 127 127 { 128 128 GLGuiWidget::setFont(font); … … 130 130 } 131 131 132 void GLGui Text::setChangedTextColor(const Color& color)132 void GLGuiMultiLineText::setChangedTextColor(const Color& color) 133 133 { 134 134 this->_changedTextColor = color; … … 138 138 * @brief Resizes the Widget to the new Size-constraints. 139 139 */ 140 void GLGui Text::resize()140 void GLGuiMultiLineText::resize() 141 141 { 142 142 this->_text.setRelCoor2D(borderLeft(), borderTop()); … … 148 148 } 149 149 150 void GLGui Text::updateFrontColor()150 void GLGuiMultiLineText::updateFrontColor() 151 151 { 152 152 this->_text.setColor(foregroundColor()); 153 153 } 154 154 155 void GLGui Text::hiding()155 void GLGuiMultiLineText::hiding() 156 156 { 157 157 this->_text.setVisibility(false); 158 158 } 159 159 160 void GLGui Text::showing()160 void GLGuiMultiLineText::showing() 161 161 { 162 162 this->_text.setVisibility(true); … … 166 166 167 167 /** 168 * draws the GLGui Text168 * draws the GLGuiMultiLineText 169 169 */ 170 void GLGui Text::draw() const170 void GLGuiMultiLineText::draw() const 171 171 { 172 172 this->beginDraw(); -
branches/gui/src/lib/gui/gl/glgui_multiline_text.h
r10163 r10164 1 1 /*! 2 * @file glgui_ text.h2 * @file glgui_multiline_text.h 3 3 * The gl_TEXT widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ TEXT_H8 #define _GLGUI_ TEXT_H7 #ifndef _GLGUI_MULTILINE_TEXT_H 8 #define _GLGUI_MULTILINE_TEXT_H 9 9 10 10 #include "glgui_widget.h" 11 #include " limited_width_text.h"11 #include "multi_line_text.h" 12 12 // FORWARD DECLARATION 13 13 namespace OrxGui … … 18 18 * 19 19 */ 20 class GLGui Text : public GLGuiWidget20 class GLGuiMultiLineText : public GLGuiWidget 21 21 { 22 ObjectListDeclaration(GLGui Text);22 ObjectListDeclaration(GLGuiMultiLineText); 23 23 public: 24 GLGui Text();25 virtual ~GLGui Text();24 GLGuiMultiLineText(); 25 virtual ~GLGuiMultiLineText(); 26 26 27 27 void setText(const std::string& text); … … 36 36 37 37 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); }; 39 39 40 40 const std::string& text() const { return _text.text(); }; … … 57 57 58 58 private: 59 LimitedWidthText_text;59 MultiLineText _text; 60 60 61 61 Color _changedTextColor; … … 63 63 } 64 64 65 #endif /* _GLGUI_ TEXT_H */65 #endif /* _GLGUI_MULTILINE_TEXT_H */ -
branches/gui/src/lib/gui/gl/glgui_widget.cc
r9869 r10164 112 112 113 113 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); 116 116 this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 117 117 this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); … … 127 127 128 128 this->setBorderLeft(15); 129 this->setBackgroundTexture("gui_element_background.png");129 //this->setBackgroundTexture("gui_element_background.png"); 130 130 131 131 this->switchState(_state); -
branches/gui/src/world_entities/elements/glgui_energywidget.cc
r9406 r10164 37 37 this->_valueText.setChangedTextColor(Color::white); 38 38 39 //this->setBackgroundTexture("maps/gui_element_background_2.png");39 this->setBackgroundTexture("maps/gui_element_background_2.png"); 40 40 this->setBackgroundColor(Color(.5,.5,.5,1)); 41 41 -
branches/gui/src/world_entities/questGUI/quest.cc
r10129 r10164 37 37 #include "glgui.h" 38 38 #include "menu/glgui_imagebutton.h" 39 #include "glgui_ text.h"39 #include "glgui_multiline_text.h" 40 40 #include <glgui_image.h> 41 41 -
branches/gui/src/world_entities/questGUI/quest_gui.cc
r10129 r10164 43 43 #include "glgui.h" 44 44 #include "menu/glgui_imagebutton.h" 45 #include "glgui_ text.h"45 #include "glgui_multiline_text.h" 46 46 #include <glgui_image.h> 47 47 … … 70 70 71 71 this->bKillGui = false; 72 73 this->background = "/pictures/map.jpg"; 72 74 73 75 this->myQuest = new Quest(root); … … 114 116 questImage->loadImageFromFile(this->myQuest->getQuestPicture()); 115 117 questImage->show(); 116 questImage->setBorderBottom(20);118 //questImage->setBorderBottom(20); 117 119 headerBox->pack(questImage); 118 headerBox->setBorderBottom(20);119 120 120 121 OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 121 122 { 122 OrxGui::GLGui Text* questDifficulty = new OrxGui::GLGuiText();123 OrxGui::GLGuiMultiLineText* questDifficulty = new OrxGui::GLGuiMultiLineText(); 123 124 questDifficulty->setText(this->myQuest->getQuestDifficulty()); 124 125 outlineBox->pack(questDifficulty); 125 126 } 126 127 headerBox->pack(outlineBox); 127 headerBox->setBorderBottom( 75);128 headerBox->setBorderBottom(100); 128 129 129 130 } … … 131 132 OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 132 133 { 133 OrxGui::GLGui Text* questTxt = new OrxGui::GLGuiText();134 OrxGui::GLGuiMultiLineText* questTxt = new OrxGui::GLGuiMultiLineText(); 134 135 questTxt->setText(this->myQuest->getQuestDescription()); 135 136 labelBox->pack(questTxt); 136 labelBox->setBorderBottom(75); 137 labelBox->setBorderBottom(100); 138 labelBox->setBorderTop(100); 137 139 } 138 140 … … 145 147 rewardImage->show(); 146 148 rewardBox->pack(rewardImage); 147 rewardImage->setBorderBottom(50);148 149 OrxGui::GLGui Text* rewardTxt = new OrxGui::GLGuiText();149 //rewardImage->setBorderBottom(50); 150 151 OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText(); 150 152 rewardTxt->setText(this->myQuest->getRewardDescription()); 151 153 rewardBox->pack(rewardTxt); 152 rewardBox->setBorderBottom( 75);154 rewardBox->setBorderBottom(100); 153 155 154 156 } … … 172 174 this->questBox->showAll(); 173 175 174 this->questBox->setAbsCoor2D(300, 40);176 this->questBox->setAbsCoor2D(300, 200); 175 177 OrxGui::GLGuiHandler::getInstance()->activate(); 176 178 OrxGui::GLGuiHandler::getInstance()->activateCursor(); -
branches/gui/src/world_entities/questGUI/quest_gui.h
r10129 r10164 28 28 Quest* myQuest; 29 29 bool bKillGui; 30 std::string background; 30 31 31 32 OrxGui::GLGuiBox* headerBox;
Note: See TracChangeset
for help on using the changeset viewer.