Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 1, 2006, 8:16:09 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: added a Radar class, to display radar as Widget

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/elements/glgui_radar.h

    r8988 r8991  
    11/*!
    2  * @file glgui_energywidget.h
    3  * @brief Definition of an EnergyWidget, that displays a bar and a Text
     2 * @file glgui_radar.h
     3 * @brief Definition of an Radar, that displays a bar and a Text
    44*/
    55
    6 #ifndef _GLGUI_ENERGY_WIDGET_H
    7 #define _GLGUI_ENERGY_WIDGET_H
     6#ifndef _GLGUI_RADAR_H
     7#define _GLGUI_RADAR_H
    88
    9 #include "glgui_box.h"
    10 #include "glgui_bar.h"
    11 #include "glgui_text.h"
     9#include "glgui_widget.h"
     10
     11class WorldEntity;
    1212
    1313namespace OrxGui
     
    1515
    1616  //! A class for ...
    17   class GLGuiEnergyWidget : public GLGuiBox
     17  class GLGuiRadar : public GLGuiWidget
    1818  {
    1919
    2020  public:
    21     GLGuiEnergyWidget();
    22     virtual ~GLGuiEnergyWidget();
     21    GLGuiRadar();
     22    virtual ~GLGuiRadar();
    2323
    24     void setDisplayedName(const std::string& name);
    25     void setMaximum(float max);
    26     void setValue(float value);
     24    void setRange(float range);
     25    float range() const { return this->_range; }
    2726
    2827  protected:
     
    3231
    3332  private:
    34     GLGuiText               _name;
    35     GLGuiText               _valueText;
    36     GLGuiBar                _bar;
     33    typedef struct
     34    {
     35
     36      Color                     dotColor;
     37      std::list<WorldEntity*>&  entityList;
     38      std::vector<Vector2D>     position;
     39    } DotList;
     40
     41    std::vector<DotList>        _dotLists;
     42
     43    float                       _range;
    3744
    3845  };
    3946}
    40 #endif /* _GLGUI_ENERGY_WIDGET_H */
     47#endif /* _GLGUI_RADAR_H */
Note: See TracChangeset for help on using the changeset viewer.