Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 14, 2005, 2:49:33 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: introducing Layers

File:
1 edited

Legend:

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

    r4861 r4862  
    1616typedef enum
    1717{
    18   E2D_TOP,                             //!< Will be rendered on top of everything else
    19   E2D_MEDIUM,                          //!< Will be rendered on the medium Layer.
    20   E2D_BOTTOM,                          //!< Will be rendered on the bottom Layer
    21   E2D_BELOW_ALL,                       //!< Will be rendered below the 3D-scene. @todo make this work.
     18  E2D_BELOW_ALL                 =     1,        //!< Will be rendered below the 3D-scene. @todo make this work.
     19  E2D_BOTTOM                    =     2,        //!< Will be rendered on the bottom Layer
     20  E2D_MEDIUM                    =     4,        //!< Will be rendered on the medium Layer.
     21  E2D_TOP                       =     8,        //!< Will be rendered on top of everything else
    2222
    23   E2D_LAYER_COUNT                      //!< The count of Layers.
    24 } E2DLayer;
    25 
     23  E2D_LAYER_COUNT               =     4         //!< The count of Layers.
     24} E2D_LAYER;
     25#define E2D_DEFAULT_LAYER       E2D_TOP
     26#define E2D_ALL_LAYERS          E2D_TOP | E2D_MEDIUM | E2D_BOTTOM | E2D_BELOW_ALL
    2627
    2728typedef enum
     
    5657    /** this returns the Absolute Position on the screen set by positioning in the tick-phase */
    5758    inline const Position2D& getPosition2D() { return this->absPos2D; };
     59
    5860    /** @param alignment the new Alignment of the 2D-Element */
    5961    inline void setAlignment(E2D_ALIGNMENT alignment) { this->alignment = alignment; };
    6062    void setAlignment(const char* alignment);
    61     /** @param layer the Layer this is drawn on */
    62     inline void setLayer(E2DLayer layer) { this->layer = layer; };
     63
     64    void setLayer(E2D_LAYER layer);
    6365    void setLayer(const char* layer);
     66    /** @returns the Layer this Element is drawn to */
     67    inline E2D_LAYER getLayer() { return this->layer; };
     68
    6469    /** @param visible true if the Element should be visible false otherwise (will not be rendered) */
    6570    inline void setVisibility(bool visible) { this->visible = visible; };
     71
    6672    /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */
    6773    inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };
     
    8692  private:
    8793    bool                    visible;
    88     E2DLayer                layer;
     94    E2D_LAYER               layer;
    8995};
    9096
Note: See TracChangeset for help on using the changeset viewer.