Skip to content

Commit

Permalink
Merge pull request #431 from TheSillyDoggo/v6
Browse files Browse the repository at this point in the history
Add Hide Trigger Backgrounds
  • Loading branch information
HJfod authored Oct 15, 2024
2 parents 789d94e + 50e6d33 commit 8456d76
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@
"name": "Larger Color Menu",
"description": "If you're using the <cr>New Color Menu</c>, this makes the color channel buttons a bit larger"
},
"hide-trigger-ui": {
"type": "bool",
"default": false,
"name": "Hide Trigger Backgrounds",
"description": "Hides the <cc>backgrounds</c> on all triggers when using sliders, like with <cl>shader</c> triggers"
},
"grid-size-controls": {
"type": "bool",
"default": true,
Expand Down
29 changes: 29 additions & 0 deletions src/features/ForceHideTriggerUI.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/SetupTriggerPopup.hpp>

using namespace geode::prelude;

class $modify (SetupTriggerPopup)
{
virtual void sliderBegan(Slider* slider)
{
SetupTriggerPopup::sliderBegan(slider);

if (!Mod::get()->getSettingValue<bool>("hide-trigger-ui"))
return;

getChildOfType<CCScale9Sprite>(m_mainLayer, 0)->runAction(CCFadeTo::create(0.15f, 0));
this->runAction(CCFadeTo::create(0.15f, 0));
}

virtual void sliderEnded(Slider* slider)
{
SetupTriggerPopup::sliderEnded(slider);

if (!Mod::get()->getSettingValue<bool>("hide-trigger-ui"))
return;

getChildOfType<CCScale9Sprite>(m_mainLayer, 0)->runAction(CCFadeTo::create(0.15f, 255));
this->runAction(CCFadeTo::create(0.15f, 150));
}
};

0 comments on commit 8456d76

Please sign in to comment.