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

Method SetList

Source/TitleBar.cpp:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void SpawnList::SetList(std::vector<ModuleFactory::Spawnable> spawnables)
63{
64 if (mSpawnList == nullptr)
65 mSpawnList = new DropdownList(mOwner, mLabel.c_str(), mPos.x, mPos.y, &mSpawnIndex);
66
67 mSpawnList->Clear();
68 mSpawnList->SetUnknownItemString(mLabel);
69 mSpawnables = spawnables;
70 for (int i = 0; i < mSpawnables.size(); ++i)
71 {
72 std::string name = mSpawnables[i].mLabel;
73 if (mShowDecorators && !mSpawnables[i].mDecorator.empty())
74 name += " " + mSpawnables[i].mDecorator;
75 if (TheSynth->GetModuleFactory()->IsExperimental(name))
76 name += " (exp.)";
77 mSpawnList->AddLabel(name, i);
78 }
79}
80
81namespace
82{

Callers 3

SetModuleFactoryMethod · 0.80
SetUpPrefabsDropdownMethod · 0.80
SetUpPluginsDropdownMethod · 0.80

Calls 7

SetUnknownItemStringMethod · 0.80
sizeMethod · 0.80
emptyMethod · 0.80
IsExperimentalMethod · 0.80
GetModuleFactoryMethod · 0.80
ClearMethod · 0.45
AddLabelMethod · 0.45

Tested by

no test coverage detected