bug fix
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace gui {
|
||||
|
||||
class InputBindBox : public Panel {
|
||||
protected:
|
||||
glm::vec4 hoverColor {0.05f, 0.1f, 0.2f, 0.75f};
|
||||
glm::vec4 focusedColor {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
glm::vec4 focusedColor {0.1f, 0.15f, 0.35f, 0.75f};
|
||||
std::shared_ptr<Label> label;
|
||||
Binding& binding;
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user