Przeglądaj źródła

text line end is based on last advx

dmuratshin 9 lat temu
rodzic
commit
adb9966caa
2 zmienionych plików z 10 dodań i 1 usunięć
  1. 9 0
      oxygine/src/TweenQueue.h
  2. 1 1
      oxygine/src/text_utils/Aligner.cpp

+ 9 - 0
oxygine/src/TweenQueue.h

@@ -40,6 +40,9 @@ namespace oxygine
         template<class GS>
         spTween add(const GS& gs, timeMS duration, int loops = 1, bool twoSides = false, timeMS delay = 0, Tween::EASE ease = Tween::ease_linear);
 
+        template<class GS>
+        spTween add(const GS& gs, const TweenOptions &);
+
         void complete(timeMS deltaTime);
 
     private:
@@ -58,4 +61,10 @@ namespace oxygine
     {
         return add(createTween(gs, duration, loops, twoSides, delay, ease));
     }
+
+    template<class GS>
+    spTween TweenQueue::add(const GS& gs, const TweenOptions &opt)
+    {
+        return add(createTween2(gs, opt));
+    }
 }

+ 1 - 1
oxygine/src/text_utils/Aligner.cpp

@@ -171,7 +171,7 @@ namespace oxygine
             s.y = _y + s.gl.offset_y;
             _x += s.gl.advance_x + getStyle().kerning;
 
-            int rx = s.x + s.gl.sw;
+            int rx = s.x + s.gl.advance_x;
 
 
             _lineWidth = std::max(rx, _lineWidth);