Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8992 in orxonox.OLD


Ignore:
Timestamp:
Jul 2, 2006, 5:00:49 AM (18 years ago)
Author:
bensch
Message:

more radar work

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/event/event_handler.cc

    r8894 r8992  
    357357  else
    358358  {
    359 //     SDL_WM_GrabInput(SDL_GRAB_ON);
    360 //     SDL_ShowCursor(SDL_DISABLE);
     359     SDL_WM_GrabInput(SDL_GRAB_ON);
     360     SDL_ShowCursor(SDL_DISABLE);
    361361  }
    362362}
  • trunk/src/world_entities/elements/glgui_radar.cc

    r8991 r8992  
    3636
    3737
     38
     39  void GLGuiRadar::setAttenuation(Attenuation attenuation)
     40  {
     41    this->_attenuation = attenuation;
     42  }
     43
     44
     45  void GLGuiRadar::tick(float dt)
     46  {
     47
     48  }
     49
     50
     51  void GLGuiRadar::draw() const
     52  {
     53
     54
     55  }
     56
     57
    3858  void GLGuiRadar::resize()
    3959  {
  • trunk/src/world_entities/elements/glgui_radar.h

    r8991 r8992  
    1717  class GLGuiRadar : public GLGuiWidget
    1818  {
     19  public:
     20    typedef enum {
     21      Linear,
     22      Exponential,
     23    } Attenuation;
    1924
    2025  public:
     
    2328
    2429    void setRange(float range);
     30
     31    void setUpdateInterval(float updateInterval) { this->_updateInterval = updateInterval; };
     32    void setAttenuation(Attenuation attenuation);
     33
    2534    float range() const { return this->_range; }
     35
     36
     37    void tick(float dt);
     38    void draw() const;
    2639
    2740  protected:
     
    3346    typedef struct
    3447    {
    35 
    36       Color                     dotColor;
    37       std::list<WorldEntity*>&  entityList;
    38       std::vector<Vector2D>     position;
    39     } DotList;
     48      Color                           dotColor;
     49      const std::list<WorldEntity*>&  entityList;
     50      std::vector<Vector2D>           position;
     51    }
     52    DotList;
    4053
    4154    std::vector<DotList>        _dotLists;
    4255
     56    Attenuation                 _attenuation;
    4357    float                       _range;
    4458
     59
     60    float                       _updateInterval;
     61    float                       _timePassed;
    4562  };
    4663}
Note: See TracChangeset for help on using the changeset viewer.