From 544747eab95fc86d8a6500a4f786cad49cffe583 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Thu, 21 Dec 2017 18:18:25 +0000 Subject: [PATCH] Added memory consumption test for small text in large TextLabel Change-Id: Ibbc99557b52a033632fb90358ba6d205fd5bd662 --- .../text-memory-profiling/text-memory-profiling-example.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/text-memory-profiling/text-memory-profiling-example.cpp b/examples/text-memory-profiling/text-memory-profiling-example.cpp index 09e6f69..eae8319 100644 --- a/examples/text-memory-profiling/text-memory-profiling-example.cpp +++ b/examples/text-memory-profiling/text-memory-profiling-example.cpp @@ -45,6 +45,7 @@ enum TextType MULTI_COLOR_TEXT_WITH_STYLE, MULTI_COLOR_TEXT_WITH_EMOJI, MULTI_COLOR_TEXT_WITH_STYLE_EMOJI, + SMALL_TEXT_IN_LARGE_TEXT_LABEL, NUMBER_OF_TYPES }; @@ -57,7 +58,8 @@ std::string TEXT_TYPE_STRING[ NUMBER_OF_TYPES ] = "Multi color text", "Multi color text with style", "Multi color text with emoji", - "Multi color text with style and emoji" + "Multi color text with style and emoji", + "Small text in large Text Label" }; const int NUMBER_OF_LABELS = 500; @@ -156,6 +158,13 @@ public: label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) ); break; } + case SMALL_TEXT_IN_LARGE_TEXT_LABEL: + { + label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); + label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); + label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size + break; + } default: break; } -- 2.7.4