mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
minor refactor
This commit is contained in:
parent
5fcefaf52e
commit
bad871b0a2
8 changed files with 21 additions and 27 deletions
|
|
@ -148,12 +148,7 @@ void Label::draw(const DrawContext* pctx, Assets* assets) {
|
|||
if (cache.resetFlag) {
|
||||
cache.update(text, multiline, textWrap);
|
||||
}
|
||||
|
||||
if (isEnabled()) {
|
||||
batch->setColor(isPressed() ? pressedColor : (hover ? hoverColor : color));
|
||||
} else {
|
||||
batch->setColor({color.r, color.g, color.b, color.a * 0.5f});
|
||||
}
|
||||
batch->setColor(calcColor());
|
||||
|
||||
uint lineHeight = font->getLineHeight();
|
||||
if (cache.lines.size() > 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue