Browse Source

fixed text field new line

dmuratshin 9 years ago
parent
commit
6502e0f601
1 changed files with 8 additions and 9 deletions
  1. 8 9
      oxygine/src/text_utils/Node.cpp

+ 8 - 9
oxygine/src/text_utils/Node.cpp

@@ -171,17 +171,16 @@ namespace oxygine
                 while (i != (int)_data.size())
                 while (i != (int)_data.size())
                 {
                 {
                     Symbol& s = _data[i];
                     Symbol& s = _data[i];
-                    //wchar_t c = s.c;
-                    const glyph* gl = font->getGlyph(s.code);
-                    if (gl)
-                    {
-                        s.gl = *gl;
-                        i += rd.putSymbol(s);
-                    }
+                    if (s.code == '\n')
+                        rd.nextLine();
                     else
                     else
                     {
                     {
-                        if (s.code == '\n')
-                            rd.nextLine();
+                        const glyph* gl = font->getGlyph(s.code);
+                        if (gl)
+                        {
+                            s.gl = *gl;
+                            i += rd.putSymbol(s);
+                        }
                         else
                         else
                         {
                         {
                             gl = font->getGlyph(_defMissing);
                             gl = font->getGlyph(_defMissing);