Commit 544747eab95fc86d8a6500a4f786cad49cffe583
1 parent
893905a5
Added memory consumption test for small text in large TextLabel
Change-Id: Ibbc99557b52a033632fb90358ba6d205fd5bd662
Showing
1 changed file
with
10 additions
and
1 deletions
examples/text-memory-profiling/text-memory-profiling-example.cpp
| ... | ... | @@ -45,6 +45,7 @@ enum TextType |
| 45 | 45 | MULTI_COLOR_TEXT_WITH_STYLE, |
| 46 | 46 | MULTI_COLOR_TEXT_WITH_EMOJI, |
| 47 | 47 | MULTI_COLOR_TEXT_WITH_STYLE_EMOJI, |
| 48 | + SMALL_TEXT_IN_LARGE_TEXT_LABEL, | |
| 48 | 49 | NUMBER_OF_TYPES |
| 49 | 50 | }; |
| 50 | 51 | |
| ... | ... | @@ -57,7 +58,8 @@ std::string TEXT_TYPE_STRING[ NUMBER_OF_TYPES ] = |
| 57 | 58 | "Multi color text", |
| 58 | 59 | "Multi color text with style", |
| 59 | 60 | "Multi color text with emoji", |
| 60 | - "Multi color text with style and emoji" | |
| 61 | + "Multi color text with style and emoji", | |
| 62 | + "Small text in large Text Label" | |
| 61 | 63 | }; |
| 62 | 64 | |
| 63 | 65 | const int NUMBER_OF_LABELS = 500; |
| ... | ... | @@ -156,6 +158,13 @@ public: |
| 156 | 158 | label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) ); |
| 157 | 159 | break; |
| 158 | 160 | } |
| 161 | + case SMALL_TEXT_IN_LARGE_TEXT_LABEL: | |
| 162 | + { | |
| 163 | + label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); | |
| 164 | + label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); | |
| 165 | + label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size | |
| 166 | + break; | |
| 167 | + } | |
| 159 | 168 | default: |
| 160 | 169 | break; |
| 161 | 170 | } | ... | ... |