Skip to content

Commit

Permalink
fix list collapsing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Sep 10, 2024
1 parent dc5f6fc commit 64df43f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"geode": "3.4.0",
"geode": "3.6.0",
"gd": {
"win": "2.206",
"android": "2.206"
Expand Down
2 changes: 1 addition & 1 deletion src/Keybinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ bool BindManager::hasDefaultBinds(ActionID const& action) const {
if (auto bindable = this->getBindable(action)) {
auto binds = this->getBindsFor(action);
auto defs = bindable->getDefaults();
ranges::remove(defs, [=](auto const& def) {
ranges::remove(defs, [=, this](auto const& def) {
return !m_devices.contains(def->getDeviceID());
});
if (binds.size() == defs.size()) {
Expand Down
7 changes: 4 additions & 3 deletions src/KeybindsLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void BindableNode::onResetToDefault(CCObject*) {
m_action.getName()
),
"Cancel", "Reset",
[=](auto*, bool btn2) {
[=, this](auto*, bool btn2) {
if (btn2) {
BindManager::get()->resetBindsToDefault(m_action.getID());
this->updateMenu();
Expand Down Expand Up @@ -597,7 +597,8 @@ bool KeybindsLayer::setup() {
->setAxisReverse(true)
->setCrossAxisLineAlignment(AxisAlignment::End)
->setAxisAlignment(AxisAlignment::End)
->setGap(0.f);
->setGap(0.f)
->setAutoGrowAxis(0.f);
layout->ignoreInvisibleChildren(true);
target->setLayout(layout, false);
}
Expand Down Expand Up @@ -705,7 +706,7 @@ void KeybindsLayer::onResetAll(CCObject*) {
"Reset All",
"Are you sure you want to <cr>reset ALL bindings to default</c>?",
"Cancel", "Reset",
[=](auto*, bool btn2) {
[=, this](auto*, bool btn2) {
if (btn2) {
for (auto& action : BindManager::get()->getAllBindables()) {
BindManager::get()->resetBindsToDefault(action.getID());
Expand Down

0 comments on commit 64df43f

Please sign in to comment.