dmuratshin 9 years ago
parent
commit
cd17676c22
4 changed files with 16 additions and 2 deletions
  1. 1 1
      oxygine/src/Sprite.cpp
  2. 1 1
      oxygine/src/Sprite.h
  3. 11 0
      oxygine/src/TextField.cpp
  4. 3 0
      oxygine/src/TextField.h

+ 1 - 1
oxygine/src/Sprite.cpp

@@ -167,7 +167,7 @@ namespace oxygine
         setAnimFrame(rs, column, row);
     }
 
-    void Sprite::setLocalScale(const Vector2 &s)
+    void Sprite::setLocalScale(const Vector2& s)
     {
         _localScale = s;
         _setSize(_frame.getSize().mult(_localScale));

+ 1 - 1
oxygine/src/Sprite.h

@@ -40,7 +40,7 @@ namespace oxygine
         void                    setRow(int row);
         void                    setColumn(int column);
         void                    setColumnRow(int column, int row);
-        void                    setLocalScale(const Vector2 &s);
+        void                    setLocalScale(const Vector2& s);
 
         bool                    isOn(const Vector2& localPosition);
 

+ 11 - 0
oxygine/src/TextField.cpp

@@ -113,6 +113,12 @@ namespace oxygine
         needRebuild();
     }
 
+    void TextField::setStyleColor(const Color& color)
+    {
+        _style.color = color;
+        needRebuild();
+    }
+
     const ResFont* TextField::getFont() const
     {
         return _style.font;
@@ -261,6 +267,11 @@ namespace oxygine
         return _style.outline;
     }
 
+    const oxygine::Color& TextField::getStyleColor() const
+    {
+        return _style.color;
+    }
+
     float TextField::getWeight() const
     {
         return _style.weight;

+ 3 - 0
oxygine/src/TextField.h

@@ -41,6 +41,7 @@ namespace oxygine
         text::Symbol*               getSymbolAt(int pos) const;
         const Color&                getOutlineColor() const;
         float                       getOutline() const;
+        const Color&                getStyleColor() const;
         float                       getWeight() const;
         float                       getBaselineScale() const;
 
@@ -67,6 +68,8 @@ namespace oxygine
         void setFontSize2Scale(int scale2size);
         /**Overwrites TextStyle fontSize*/
         void setFontSize(int size);
+        /**Overwrites TextStyle color*/
+        void setStyleColor(const Color&);
 
         /**Overwrites TextStyle font.*/
         void setFont(const ResFont* rs);