This commit is contained in:
@clasher113
2025-02-04 13:31:40 +02:00
parent 2105d56b3b
commit aeb5312ed2
4 changed files with 25 additions and 21 deletions
+5 -2
View File
@@ -13,6 +13,7 @@ InputBindBox::InputBindBox(Binding& binding, glm::vec4 padding)
label(std::make_shared<Label>(L"")) {
add(label);
setScrollable(false);
hoverColor = glm::vec4(0.05f, 0.1f, 0.2f, 0.75f);
}
void InputBindBox::drawBackground(const DrawContext& pctx, const Assets&) {
@@ -25,8 +26,10 @@ void InputBindBox::drawBackground(const DrawContext& pctx, const Assets&) {
}
void InputBindBox::clicked(GUI*, mousecode button) {
binding.reset(button);
defocus();
if (isFocused()) {
binding.reset(button);
defocus();
}
}
void InputBindBox::keyPressed(keycode key) {