mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
ui update,many fixes
This commit is contained in:
parent
f04bac6b43
commit
a1f9155498
12 changed files with 312 additions and 208 deletions
|
|
@ -10,21 +10,21 @@ Font::~Font(){
|
|||
delete texture;
|
||||
}
|
||||
|
||||
int Font::getGlyphWidth(char c) {
|
||||
switch (c){
|
||||
case 'l':
|
||||
case 'i':
|
||||
case 'j':
|
||||
case '|':
|
||||
case '.':
|
||||
case ',':
|
||||
case ':':
|
||||
case ';': return 7;
|
||||
case 't': return 8;
|
||||
case ' ': return 7;
|
||||
}
|
||||
return 7;
|
||||
}
|
||||
// int Font::getGlyphWidth(char c) {
|
||||
// switch (c){
|
||||
// case 'l':
|
||||
// case 'i':
|
||||
// case 'j':
|
||||
// case '|':
|
||||
// case '.':
|
||||
// case ',':
|
||||
// case ':':
|
||||
// case ';': return 7;
|
||||
// case 't': return 8;
|
||||
// case ' ': return 7;
|
||||
// }
|
||||
// return 7;
|
||||
// }
|
||||
|
||||
|
||||
bool Font::isPrintableChar(int c) {
|
||||
|
|
@ -81,7 +81,7 @@ void Font::draw(Batch2D* batch, std::wstring text, int x, int y, int style) {
|
|||
next = charpage;
|
||||
}
|
||||
}
|
||||
x += getGlyphWidth(c);
|
||||
x += 8;//getGlyphWidth(c);
|
||||
}
|
||||
page = next;
|
||||
next = 10000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue