Skip to content

Commit

Permalink
fix isProEnabled use in Keybinds
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Jul 10, 2024
1 parent aeff655 commit 07e3d05
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/features/Keybinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <Geode/binding/EditButtonBar.hpp>
#include <utils/HolyUB.hpp>

#include <utils/Pro.hpp>
#ifdef BETTEREDIT_PRO
#include <pro/features/GroupSummaryPopup.hpp>
#endif
Expand Down Expand Up @@ -142,11 +143,13 @@ struct $modify(EditorUI) {
this->moveObjectCall(EditCommand::BigDown);
});

#ifdef BETTEREDIT_PRO
this->defineKeybind("group-summary"_spr, [this] {
GroupSummaryPopup::create()->show();
});
#endif
if (isProEnabled()) {
this->defineKeybind("group-summary"_spr, [this] {
#ifdef BETTEREDIT_PRO
GroupSummaryPopup::create()->show();
#endif
});
}

return true;
}
Expand Down Expand Up @@ -423,15 +426,15 @@ struct $modify(EditorUI) {
Category::EDITOR_MOVE, true
});

#ifdef BETTEREDIT_PRO
BindManager::get()->registerBindable({
"group-summary"_spr,
"Open Group Summary",
"",
{},
Category::EDITOR, false
});
#endif
if (isProEnabled()) {
BindManager::get()->registerBindable({
"group-summary"_spr,
"Open Group Summary",
"",
{},
Category::EDITOR, false
});
}
}

#endif

0 comments on commit 07e3d05

Please sign in to comment.