mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
refactor Font
This commit is contained in:
parent
a17314d5e0
commit
79693580e0
3 changed files with 15 additions and 37 deletions
|
|
@ -201,10 +201,10 @@ void Label::draw(const DrawContext* pctx, Assets* assets) {
|
|||
if (i < cache.lines.size()-1) {
|
||||
view = std::wstring_view(text.c_str()+offset, cache.lines.at(i+1).offset-offset);
|
||||
}
|
||||
font->draw(batch, view, pos.x, pos.y + i * totalLineHeight, FontStyle::none);
|
||||
font->draw(batch, view, pos.x, pos.y + i * totalLineHeight);
|
||||
}
|
||||
} else {
|
||||
font->draw(batch, text, pos.x, pos.y, FontStyle::none);
|
||||
font->draw(batch, text, pos.x, pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue