mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
mouse caret movement
This commit is contained in:
parent
c674bd4ec5
commit
90057e1f30
4 changed files with 31 additions and 11 deletions
|
|
@ -34,8 +34,8 @@ bool Font::isPrintableChar(int c) {
|
|||
|
||||
const int RES = 16;
|
||||
|
||||
int Font::calcWidth(std::wstring text) {
|
||||
return text.length() * 8;
|
||||
int Font::calcWidth(std::wstring text, size_t length) {
|
||||
return std::min(text.length(), length) * 8;
|
||||
}
|
||||
|
||||
void Font::draw(Batch2D* batch, std::wstring text, int x, int y) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue