From 4897e60b7973b4fbe0b9cd480c41c4c31ab528cd Mon Sep 17 00:00:00 2001 From: Catto_ <57293929+CattoDev@users.noreply.github.com> Date: Sun, 11 Feb 2024 02:34:53 +0100 Subject: [PATCH] Fix scale control keybind and layer input in playtest good night --- src/features/Keybinds.cpp | 4 +++- src/features/TypeInZLayer.cpp | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/features/Keybinds.cpp b/src/features/Keybinds.cpp index 47b02db6..f79db4c3 100644 --- a/src/features/Keybinds.cpp +++ b/src/features/Keybinds.cpp @@ -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); diff --git a/src/features/TypeInZLayer.cpp b/src/features/TypeInZLayer.cpp index 57cc9b47..203ee568 100644 --- a/src/features/TypeInZLayer.cpp +++ b/src/features/TypeInZLayer.cpp @@ -1,5 +1,6 @@ #include +#include #include using namespace geode::prelude; @@ -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); + } +}; \ No newline at end of file