Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 22, 2008, 12:06:55 AM (16 years ago)
Author:
rgrieder
Message:
  • added blankString to String so you can return ""; even if it's a const std::string&
  • fixed several bugs with aspect correct and margin alignment
  • added console commands for OrxonoxOverlays and OverlayGroups for rotate, scale and scroll (you can access the by name (from name=.. in xml file), e.g. "OrxonoxOverlay rotateOverlay SpeedBar 90)
  • converted everything in overlays/ to 4 spaces/tab ;)
  • removed all using namespace Ogre;
  • added background_ Panel to OrxonoxOverlay, since most of the derived classes can use that
  • should work now, but I'll have to test on a tardis box first
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/orxonox/overlays/OverlayGroup.h

    r1614 r1615  
    3939namespace orxonox
    4040{
    41     class HUDBar;
    42     class OrxonoxOverlay;
    43 
    4441    class _OrxonoxExport OverlayGroup : public BaseObject
    4542    {
    46       public:
     43    public:
    4744        OverlayGroup();
    4845        ~OverlayGroup();
    4946
    50         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    51 
    52         void scale(const Vector2& scale);
    53         Vector2 getScale() const { return this->scale_; }
     47        void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    5448
    5549        static void toggleVisibility(const std::string& name);
    5650        static void scaleGroup(const std::string& name, float scale);
     51        static void scrollGroup(const std::string& name, const Vector2& scroll);
     52        static void rotateGroup(const std::string& name, Radian angle);
    5753
    58       private:
    59         OverlayGroup(const OverlayGroup& instance);
     54    private:
     55        void scale(const Vector2& scale) { this->setScale(scale * this->scale_); }
     56        void setScale(const Vector2& scale);
     57        Vector2 getScale() const { return this->scale_; }
     58
     59        void scroll(const Vector2& scroll) { this->setScroll(scroll + this->scroll_); }
     60        void setScroll(const Vector2& scroll);
     61        Vector2 getScroll() const { return this->scale_; }
    6062
    6163        void addElement(OrxonoxOverlay* element);
     
    6466        std::map<std::string, OrxonoxOverlay*> hudElements_;
    6567        Vector2 scale_;
     68        Vector2 scroll_;
    6669    };
    6770}
Note: See TracChangeset for help on using the changeset viewer.