minor refactor
This commit is contained in:
@@ -9,15 +9,15 @@ using namespace gui;
|
||||
|
||||
InputBindBox::InputBindBox(Binding& binding, glm::vec4 padding)
|
||||
: Panel(glm::vec2(100,32), padding, 0),
|
||||
binding(binding) {
|
||||
label = std::make_shared<Label>(L"");
|
||||
binding(binding),
|
||||
label(std::make_shared<Label>(L"")) {
|
||||
add(label);
|
||||
setScrollable(false);
|
||||
}
|
||||
|
||||
void InputBindBox::drawBackground(const DrawContext* pctx, Assets*) {
|
||||
void InputBindBox::drawBackground(const DrawContext& pctx, const Assets&) {
|
||||
glm::vec2 pos = calcPos();
|
||||
auto batch = pctx->getBatch2D();
|
||||
auto batch = pctx.getBatch2D();
|
||||
batch->texture(nullptr);
|
||||
batch->setColor(isFocused() ? focusedColor : calcColor());
|
||||
batch->rect(pos.x, pos.y, size.x, size.y);
|
||||
|
||||
Reference in New Issue
Block a user