- Timestamp:
- Jul 1, 2006, 3:18:43 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/limited_width_text.h
r8619 r8980 26 26 // Setup: 27 27 void setLineWidth(float lineWidth); 28 void setDotsPosition( DotsPosition dotsPosition);28 void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition); 29 29 30 30 // Retrieve: -
trunk/src/lib/gui/gl/glgui_text.cc
r8973 r8980 48 48 this->_text.setRelCoor2D(4,4); 49 49 this->_text.setFont("fonts/final_frontier.ttf", 20); 50 this->_text.setLineWidth(400); 51 this->_text.setDotsPosition(LimitedWidthText::Begin); 50 52 this->_text.setColor(foregroundColor()); 51 53 this->_text.setVisibility(false); … … 122 124 this->_text.setRelCoor2D(borderLeft(), borderTop()); 123 125 this->setSize2D( this->_text.getSize2D() + Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom())); 126 //this->_text.setLineWidth(this->size2D); 124 127 GLGuiWidget::resize(); 125 128 /* this->frontRect().setTopLeft(borderLeft(), borderTop()); -
trunk/src/lib/gui/gl/glgui_text.h
r8973 r8980 9 9 10 10 #include "glgui_widget.h" 11 #include " text.h"11 #include "limited_width_text.h" 12 12 // FORWARD DECLARATION 13 13 namespace OrxGui … … 31 31 void clear(); 32 32 33 void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); }; 34 33 35 const std::string& text() const { return _text.text(); }; 34 36 … … 50 52 51 53 private: 52 Text_text;54 LimitedWidthText _text; 53 55 }; 54 56 } -
trunk/src/world_entities/elements/glgui_energywidget.cc
r8977 r8980 27 27 { 28 28 // this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget"); 29 this->pack(&this->_name); 30 this->pack(&this->_valueText); 31 this->pack(&this->_bar); 29 32 30 this->pack(&this->name); 31 this->pack(&this->text); 32 this->pack(&this->bar); 33 this->setBackgroundTexture("maps/gui_element_background_2.png"); 34 this->setBackgroundColor(Color(.5,.5,.5,1)); 35 36 this->_name.setBackgroundTexture(Texture()); 37 this->_valueText.setBackgroundTexture("maps/gui_element_background_2.png"); 38 this->_valueText.setBackgroundTexture("maps/gui_element_background_2.png"); 39 this->_bar.setBackgroundTexture(Texture()); 33 40 } 34 41 … … 45 52 void GLGuiEnergyWidget::setDisplayedName(const std::string& name) 46 53 { 47 this-> name.setText(name);54 this->_name.setText(name); 48 55 } 49 56 50 57 void GLGuiEnergyWidget::setMaximum(float max) 51 58 { 52 this-> bar.setMaximum(max);59 this->_bar.setMaximum(max); 53 60 } 54 61 … … 58 65 val.setType(MT_INT); 59 66 60 this-> bar.setValue(value);61 this-> text.setText(val.getString());67 this->_bar.setValue(value); 68 this->_valueText.setText(val.getString()); 62 69 } 63 70 … … 65 72 void GLGuiEnergyWidget::showing() 66 73 { 67 this-> name.show();68 this-> text.show();69 this-> bar.show();74 this->_name.show(); 75 this->_valueText.show(); 76 this->_bar.show(); 70 77 } 71 78 72 79 void GLGuiEnergyWidget::hiding() 73 80 { 74 this-> name.hide();75 this-> text.hide();76 this-> bar.hide();81 this->_name.hide(); 82 this->_valueText.hide(); 83 this->_bar.hide(); 77 84 } 78 85 } -
trunk/src/world_entities/elements/glgui_energywidget.h
r8977 r8980 32 32 33 33 private: 34 GLGuiText name;35 GLGuiBar bar;36 GLGuiText text;34 GLGuiText _name; 35 GLGuiBar _bar; 36 GLGuiText _valueText; 37 37 38 38 };
Note: See TracChangeset
for help on using the changeset viewer.