Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 18, 2005, 3:51:43 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: added Shell Class to the utils.
This class should enable us to print all the output from orxonox directly onto the screen.
Also it should allow inputting some little Commands, so that we have more force over our little project :)

Also added a new Function to tList, removeLast, that is very quick in deleting the last element, as this is used inside of the Shell (deleting the Last Element is a major issue)

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

Legend:

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

    r4862 r5068  
    5555
    5656  this->setVisibility(true);
     57  this->setActiveness(true);
    5758  this->setPosition2D(0,0);
    5859  this->setAlignment(E2D_ALIGN_NONE);
  • orxonox/trunk/src/lib/graphics/render2D/element_2d.h

    r4862 r5068  
    6969    /** @param visible true if the Element should be visible false otherwise (will not be rendered) */
    7070    inline void setVisibility(bool visible) { this->visible = visible; };
     71    /** @param active true if the Element should be active, false otherwise (will not be ticked) */
     72    inline void setActiveness(bool active) { this->active = active; };
     73
    7174
    7275    /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */
     
    7679    /** @returns the visibility state */
    7780    inline bool isVisible() { return this->visible; };
     81    /** @returns the active-State */
     82    inline bool isActive() { return this->active; };
    7883
    7984    virtual void tick(float dt);
     
    9196
    9297  private:
    93     bool                    visible;
    94     E2D_LAYER               layer;
     98    bool                    visible;          //!< If the given Element2D is visible.
     99    bool                    active;           //!< If the given Element2D is active.
     100    E2D_LAYER               layer;            //!< What layer this Element2D is on.
    95101};
    96102
  • orxonox/trunk/src/lib/graphics/render2D/render_2d.cc

    r4955 r5068  
    105105    while (elem != NULL)
    106106    {
    107       elem->tick(dt);
     107      if (elem->isActive())
     108        elem->tick(dt);
    108109      elem = iterator->nextElement();
    109110    }
Note: See TracChangeset for help on using the changeset viewer.