fix cursor multiline
This commit is contained in:
@@ -199,7 +199,7 @@ void TextMesh::update(kFont id, const std::string& text)
|
||||
idx.push_back(n + 3);
|
||||
bbmin = glm::min(bbmin, xy(f.bounds));
|
||||
bbmax = glm::max(bbmax, { q.x1 / f.scale, y + f.bounds.w });
|
||||
if (q.x1 / f.scale + 5 > max_width * f.scale)
|
||||
if (max_width > 0 && q.x1 / f.scale + 5 > max_width * f.scale)
|
||||
cur_box = glm::vec4(0, (y + spacing * f.scale) / f.scale + f.bounds.y, 5, spacing);
|
||||
else
|
||||
cur_box = glm::vec4(q.x1 / f.scale + 2, y / f.scale + f.bounds.y, 5, spacing);
|
||||
|
||||
Reference in New Issue
Block a user