add 3D text render (WIP)
This commit is contained in:
@@ -194,9 +194,9 @@ void SlotView::draw(const DrawContext* pctx, Assets* assets) {
|
||||
int y = pos.y+slotSize-16;
|
||||
|
||||
batch->setColor({0, 0, 0, 1.0f});
|
||||
font->draw(batch, text, x+1, y+1);
|
||||
font->draw(*batch, text, x+1, y+1);
|
||||
batch->setColor(glm::vec4(1.0f));
|
||||
font->draw(batch, text, x, y);
|
||||
font->draw(*batch, text, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
font->draw(*batch, view, pos.x, pos.y + i * totalLineHeight);
|
||||
}
|
||||
} else {
|
||||
font->draw(batch, text, pos.x, pos.y);
|
||||
font->draw(*batch, text, pos.x, pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,6 @@ void Plotter::draw(const DrawContext* pctx, Assets* assets) {
|
||||
batch->setColor({1,1,1,0.2f});
|
||||
string = util::to_wstring(y / multiplier, 3);
|
||||
}
|
||||
font->draw(batch, string, pos.x+dmwidth+2, pos.y+dmheight-y-labelsInterval);
|
||||
font->draw(*batch, string, pos.x+dmwidth+2, pos.y+dmheight-y-labelsInterval);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user