File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,4 +176,11 @@ namespace horrible {
176176#define HORRIBLE_DELEGATE_HOOKS (optID ) \
177177 static void onModify (auto & self) { \
178178 horrible::delegateHooks (optID, self.m_hooks ); \
179+ }
180+
181+ #define HORRIBLE_REGISTER_OPTION_DEPENDENCY (opt, modId ) \
182+ $on_game(Loaded) { \
183+ if (Loader::get ()->isModLoaded (modId)) { \
184+ if (auto om = horrible::OptionManager::get ()) om->registerOption (opt); \
185+ }; \
179186 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ inline static Option const o = {
1919 SillyTier::Medium,
2020};
2121HORRIBLE_REGISTER_OPTION (o);
22+ HORRIBLE_REGISTER_OPTION_DEPENDENCY (o, " thesillydoggo.blur-api" );
2223
2324class $modify(BlurPlayLayer, PlayLayer) {
2425 HORRIBLE_DELEGATE_HOOKS (id);
@@ -30,7 +31,7 @@ class $modify(BlurPlayLayer, PlayLayer) {
3031 colorLayer->setID (" blur-color-layer" _spr);
3132 colorLayer->setContentSize ({getScaledContentWidth (), getScaledContentHeight ()});
3233 colorLayer->setPosition ({0 , 0 });
33- this ->addChild (colorLayer, 98 );
34+ m_uiLayer ->addChild (colorLayer, 98 );
3435 BlurAPI::addBlur (colorLayer);
3536 }
3637
You can’t perform that action at this time.
0 commit comments