Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5378 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Oct 14, 2005, 6:54:55 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: crosshair now more compliant with Element2D
Element2D now also nows size

Location:
trunk/src/lib/graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5377 r5378  
    123123  this->toCoordinate = NULL;
    124124  this->toDirection = NULL;
     125  this->setSize2D(1,1);
    125126
    126127  Render2D::getInstance()->registerElement2D(this);
  • trunk/src/lib/graphics/render2D/element_2d.h

    r5371 r5378  
    9898    inline bool isActive() { return this->active; };
    9999
     100
     101    inline void setSize2D(float x, float y) { this->sizeX = x, this->sizeY = y; };
     102    inline void setSizeX2D(float x) { this->sizeX = x; };
     103    inline void setSizeY2D(float y) { this->sizeY = y; };
     104    inline float getSizeX2D() const { return this->sizeX; };
     105    inline float getSizeY2D() const { return this->sizeY; };
    100106
    101107    // LIKE PNODE
     
    179185    virtual void draw() const = 0;
    180186
    181   protected:
     187  private:
     188    const PNode*            bindNode;           //!< a node over which to display this 2D-element
    182189    float                   sizeX;              //!< The size of the rendered item in x-direction
    183190    float                   sizeY;              //!< The size of the rendered Item in y-direction
    184 
    185   private:
    186     const PNode*            bindNode;           //!< a node over which to display this 2D-element
    187191
    188192    E2D_ALIGNMENT           alignment;          //!< How the Element is aligned around its Position
  • trunk/src/lib/graphics/text_engine/text.h

    r5369 r5378  
    7171    void setSize(float size) { this->size = size; };
    7272    /** @returns the Size of the Text */
    73     float getSize() const { return this->size; };
     73//    void getSize(float &x, float& y) const { return this->size; };
    7474
    7575    void setType(TEXT_RENDER_TYPE type);
Note: See TracChangeset for help on using the changeset viewer.