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

Method TextEntryComplete

Source/ModuleSaveDataPanel.cpp:370–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void ModuleSaveDataPanel::TextEntryComplete(TextEntry* entry)
371{
372 if (entry == mNameEntry)
373 {
374 std::string desiredName = mSaveModule->Name();
375 ofStringReplace(desiredName, "~", ""); //strip out illegal character
376 if (desiredName.empty())
377 desiredName = mSaveModule->GetTypeName();
378 mSaveModule->SetName("~~~~~~~~~~~");
379 std::string availableName = GetUniqueName(desiredName, mSaveModule->GetOwningContainer()->GetModuleNames<IDrawableModule*>());
380 mSaveModule->SetName(availableName.c_str());
381 }
382}
383
384void ModuleSaveDataPanel::DropdownClicked(DropdownList* list)
385{

Callers

nothing calls this directly

Calls 7

ofStringReplaceFunction · 0.85
GetUniqueNameFunction · 0.85
emptyMethod · 0.80
GetTypeNameMethod · 0.80
GetOwningContainerMethod · 0.80
NameMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected