diff --git a/src/graphics/ui/elements/Button.cpp b/src/graphics/ui/elements/Button.cpp index 2fe6fc6a..c951e6c3 100644 --- a/src/graphics/ui/elements/Button.cpp +++ b/src/graphics/ui/elements/Button.cpp @@ -42,7 +42,7 @@ Button::Button( } if (action) { - listenClick(action); + listenAction(UIAction::CLICK, action); } setScrollable(false); diff --git a/src/graphics/ui/elements/SelectBox.cpp b/src/graphics/ui/elements/SelectBox.cpp index 7273294b..97a899e6 100644 --- a/src/graphics/ui/elements/SelectBox.cpp +++ b/src/graphics/ui/elements/SelectBox.cpp @@ -19,14 +19,14 @@ SelectBox::SelectBox( : Button(gui, selected.text, padding, nullptr, glm::vec2(contentWidth, -1)), options(std::move(options)) { - listenClick([this](GUI& gui) { + listenAction(UIAction::CLICK, [this](GUI& gui) { auto panel = std::make_shared(gui, getSize()); panel->setPos(calcPos() + glm::vec2(0, size.y)); for (const auto& option : this->options) { auto button = std::make_shared