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

Method drawBody

Examples/SCExample/HotReloadSystem.h:405–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403 }
404
405 void drawBody()
406 {
407 const PluginDynamicLibrary& library = system.registry.getPluginDynamicLibraryAt(viewState.page);
408
409 ISCExample* example = nullptr;
410 if (library.queryInterface(example))
411 {
412 example->onDraw();
413 }
414 else if (not library.lastErrorLog.isEmpty())
415 {
416 SmallString<256> pluginUTF8 = StringEncoding::Utf8;
417 (void)StringConverter::appendEncodingTo(StringEncoding::Utf8, library.definition.identity.name.view(),
418 pluginUTF8, StringConverter::NullTerminate);
419 ImGui::Text("Example %s failed to compile:", pluginUTF8.view().bytesIncludingTerminator());
420 ImGui::PushStyleColor(ImGuiCol_Text, 0xff0000ff);
421 ImGui::Text("%s", library.lastErrorLog.bytesIncludingTerminator());
422 ImGui::PopStyleColor();
423 }
424 }
425};
426
427} // namespace SC

Callers 1

drawMethod · 0.80

Calls 4

appendEncodingToFunction · 0.85
queryInterfaceMethod · 0.80
isEmptyMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected