瀏覽代碼

Fix LLVM / Xcode 7.2 linking warnings

Andrey Fidrya 10 年之前
父節點
當前提交
6d0bd4db03
共有 4 個文件被更改,包括 22 次插入4 次删除
  1. 10 0
      oxygine/src/Actor.cpp
  2. 2 2
      oxygine/src/Actor.h
  3. 8 0
      oxygine/src/VisualStyle.cpp
  4. 2 2
      oxygine/src/VisualStyle.h

+ 10 - 0
oxygine/src/Actor.cpp

@@ -590,6 +590,11 @@ namespace oxygine
         _clock = clock;
     }
 
+    void Actor::setAlpha(unsigned char alpha)
+    {
+        _alpha = alpha;
+    }
+    
     const Renderer::transform& Actor::getTransform() const
     {
         updateTransform();
@@ -608,6 +613,11 @@ namespace oxygine
         return _transformInvert;
     }
 
+    unsigned char Actor::getAlpha() const
+    {
+        return _alpha;
+    }
+
     const spClock&  Actor::getClock() const
     {
         return _clock;

+ 2 - 2
oxygine/src/Actor.h

@@ -132,7 +132,7 @@ namespace oxygine
         Vector2             getScaledSize() const { return _size.mult(_scale); }
         float               getWidth() const {return getSize().x;}
         float               getHeight() const {return getSize().y;}
-        unsigned char       getAlpha() const {return _alpha;}
+        unsigned char       getAlpha() const;
         const spClock&      getClock() const;
         virtual RectF       getDestRect() const;
         /**returns touch id if actor is pressed down*/
@@ -190,7 +190,7 @@ namespace oxygine
         /**Enable/Disable culling this actor outside of clip area (use it with ClipRectActor)*/
         void setCull(bool enable) {_flags &= ~flag_cull; if (enable) _flags |= flag_cull;}
         /**Sets transparency. if alpha is 0 actor and children are completely invisible, don't rendering and don't receive events.*/
-        void setAlpha(unsigned char alpha) {_alpha = alpha;}
+        void setAlpha(unsigned char alpha);
 
         /**Deprecated, use setTouchEnabled*/
         void setInputEnabled(bool enabled) { setTouchEnabled(enabled); }

+ 8 - 0
oxygine/src/VisualStyle.cpp

@@ -69,4 +69,12 @@ namespace oxygine
         _Actor::deserialize(data);
         setColor(hex2color(data->node.attribute("color").as_string("ffffffff")));
     }
+    
+    const Color& VStyleActor::getColor() const {
+        return _vstyle.getColor();
+    }
+
+    void VStyleActor::setColor(const Color& color) {
+        _vstyle.setColor(color);
+    }
 }

+ 2 - 2
oxygine/src/VisualStyle.h

@@ -37,9 +37,9 @@ namespace oxygine
         void deserialize(const deserializedata* data);
 
         blend_mode              getBlendMode() const {return _vstyle.getBlendMode();}
-        const Color&            getColor() const {return _vstyle.getColor();}
+        const Color&            getColor() const;
 
-        void                    setColor(const Color& color) {_vstyle.setColor(color);}
+        void                    setColor(const Color& color);
         void                    setBlendMode(blend_mode mode) {_vstyle.setBlendMode(mode);}
 
         typedef Property<Color, const Color&, VStyleActor, &VStyleActor::getColor, &VStyleActor::setColor> TweenColor;