MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / drawToolbar

Method drawToolbar

Examples/SCExample/HotReloadSystem.h:381–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379 }
380
381 [[nodiscard]] bool drawToolbar()
382 {
383 bool res = false;
384 for (size_t idx = 0; idx < system.registry.getNumberOfEntries(); ++idx)
385 {
386 const PluginDynamicLibrary& library = system.registry.getPluginDynamicLibraryAt(idx);
387 ImGui::SameLine();
388
389 SmallString<256> pluginUTF8 = StringEncoding::Utf8;
390 (void)StringConverter::appendEncodingTo(StringEncoding::Utf8, library.definition.identity.name.view(),
391 pluginUTF8, StringConverter::NullTerminate);
392 if (ImGui::Button(pluginUTF8.view().bytesIncludingTerminator()))
393 {
394 res = true;
395 viewState.page = idx;
396 if (not library.dynamicLibrary.isValid())
397 {
398 (void)system.load(library.definition.identity.identifier.view());
399 }
400 }
401 }
402 return res;
403 }
404
405 void drawBody()
406 {

Callers

nothing calls this directly

Calls 5

appendEncodingToFunction · 0.85
getNumberOfEntriesMethod · 0.80
viewMethod · 0.45
isValidMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected