MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / CanAddDropModules

Method CanAddDropModules

Source/Prefab.cpp:100–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool Prefab::CanAddDropModules()
101{
102 if (IsMouseHovered() && !TheSynth->IsGroupSelecting())
103 {
104 if (IsAddableModule(TheSynth->GetMoveModule()))
105 return true;
106 if (IsAddableModule(sJustReleasedModule))
107 return true;
108 if (!TheSynth->GetGroupSelectedModules().empty())
109 {
110 for (auto* module : TheSynth->GetGroupSelectedModules())
111 {
112 if (module == this || module->IsSingleton())
113 return false;
114 if (IsAddableModule(module))
115 return true;
116 }
117 }
118 }
119 return false;
120}
121
122bool Prefab::IsAddableModule(IDrawableModule* module)
123{

Callers

nothing calls this directly

Calls 4

IsGroupSelectingMethod · 0.80
GetMoveModuleMethod · 0.80
emptyMethod · 0.80
IsSingletonMethod · 0.45

Tested by

no test coverage detected