Browse Source

Fixing the particles bar-descriptor.
Enabling vsync in particles sample.
Adding check to Label::setText() before setting control dirty.

Adam Blake 13 năm trước cách đây
mục cha
commit
f57a56991b
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      gameplay/src/Label.cpp

+ 5 - 2
gameplay/src/Label.cpp

@@ -58,8 +58,11 @@ void Label::setText(const char* text)
 {
 {
     assert(text);
     assert(text);
 
 
-    _text = text;
-    _dirty = true;
+    if (strcmp(text, _text.c_str()) != 0)
+    {
+        _text = text;
+        _dirty = true;
+    }
 }
 }
 
 
 const char* Label::getText()
 const char* Label::getText()