dmuratshin 9 years ago
parent
commit
a06aad7564
2 changed files with 3 additions and 1 deletions
  1. 1 1
      examples/Demo/src/TestPolygon.h
  2. 2 0
      examples/Demo/src/TestText.h

+ 1 - 1
examples/Demo/src/TestPolygon.h

@@ -54,7 +54,7 @@ public:
         float theta = 2.0f * MATH_PI / num * i;
         float theta = 2.0f * MATH_PI / num * i;
 
 
         Vector2 dir = Vector2(scalar::cos(theta), scalar::sin(theta));
         Vector2 dir = Vector2(scalar::cos(theta), scalar::sin(theta));
-        float rad = getRoot()->getHeight() * 0.4f * (1 + scalar::sin(theta * 10) / 10);
+        float rad = getStage()->getHeight() * 0.4f * (1 + scalar::sin(theta * 10) / 10);
         Vector2 p = dir * rad;
         Vector2 p = dir * rad;
 
 
         Color c = lerp(Color(Color::Lime), Color(Color::Red), scalar::abs(scalar::sin(theta * 3)));
         Color c = lerp(Color(Color::Lime), Color(Color::Red), scalar::abs(scalar::sin(theta * 3)));

+ 2 - 0
examples/Demo/src/TestText.h

@@ -135,6 +135,8 @@ public:
         style.font = resourcesUI.getResFont("big")->getFont();
         style.font = resourcesUI.getResFont("big")->getFont();
         style.color = Color(0xffffffff);
         style.color = Color(0xffffffff);
         style.fontSize = test.scale2size;
         style.fontSize = test.scale2size;
+        if (!style.fontSize)
+            style.fontSize = style.font->getSize();
         text->setStyle(style);
         text->setStyle(style);
 
 
         text->setSize(test.size);
         text->setSize(test.size);