minor refactor

This commit is contained in:
MihailRis
2024-12-05 19:18:53 +03:00
parent 69779f0cc0
commit 04b6b6b546
29 changed files with 130 additions and 91 deletions
+3 -3
View File
@@ -52,7 +52,7 @@ Button::Button(
void Button::setText(std::wstring text) {
if (label) {
label->setText(text);
label->setText(std::move(text));
}
}
@@ -77,9 +77,9 @@ void Button::refresh() {
}
}
void Button::drawBackground(const DrawContext* pctx, Assets*) {
void Button::drawBackground(const DrawContext& pctx, const Assets&) {
glm::vec2 pos = calcPos();
auto batch = pctx->getBatch2D();
auto batch = pctx.getBatch2D();
batch->texture(nullptr);
batch->setColor(calcColor());
batch->rect(pos.x, pos.y, size.x, size.y);