conditional os in UI xml, add system dialog file open on osx, check api format or error message when opening a document, per-char text wrap on NodeText, additional info on create doc dialog like working path

This commit is contained in:
2018-10-06 14:20:07 +02:00
parent 5baa807cce
commit 739784b0d1
23 changed files with 161 additions and 63 deletions

View File

@@ -75,9 +75,14 @@ void TextMesh::update(kFont id, const char* text)
if (text[i] == '\n')
{
x = 0;
y += f.size *2;
y += f.size * 2;
continue;
}
if (max_width > 0 && x > max_width * 2 /*font scale factor*/)
{
x = 0;
y += f.size * 2;
}
int c = text[i] - f.start_char;
stbtt_aligned_quad q;
stbtt_GetBakedQuad((stbtt_bakedchar*)f.chars.data(), f.w, f.h, c, &x, &y, &q, true);