Skip to content

Commit

Permalink
Fix scale control keybind and layer input in playtest
Browse files Browse the repository at this point in the history
good night
  • Loading branch information
CattoDev committed Feb 11, 2024
1 parent 998e516 commit 4897e60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/features/Keybinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ struct $modify(EditorUI) {
this->transformObjectCall(EditCommand::RotateSnap);
});
this->defineKeybind("show-scale"_spr, [this]() {
this->activateScaleControl(nullptr);
if(auto scaleBtn = m_editButtonBar->m_buttonArray->objectAtIndex(m_editButtonBar->m_buttonArray->count() - 3)) {
this->activateScaleControl(scaleBtn);
}
});
this->defineKeybind("show-ui"_spr, [this]() {
this->showUI(true);
Expand Down
14 changes: 13 additions & 1 deletion src/features/TypeInZLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#include <Geode/modify/EditorUI.hpp>
#include <Geode/modify/CCTextInputNode.hpp>
#include <utils/EditableBMLabelProxy.hpp>

using namespace geode::prelude;
Expand All @@ -23,4 +24,15 @@ class $modify(EditorUI) {

return true;
}
};

void showUI(bool toggle) {
EditorUI::showUI(toggle);

// playtest no ui option
if(!GameManager::sharedState()->getGameVariable("0046")) {
toggle = true;
}

m_currentLayerLabel->setVisible(toggle);
}
};

0 comments on commit 4897e60

Please sign in to comment.