MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / loadAssets

Method loadAssets

src/gui2/imhex_overrides/splash_window.cpp:496–507  ·  view source on GitHub ↗

* @brief Initialize resources for the splash window */

Source from the content-addressed store, hash-verified

494 * @brief Initialize resources for the splash window
495 */
496 void WindowSplash::loadAssets() {
497
498 // Load splash screen image from romfs
499 const auto backingScale = ImHexApi::System::getNativeScale();
500 m_splashBackgroundTexture = ImGuiExt::Texture::fromSVG(romfs::get("splash_background.svg").span(), WindowSize.x * backingScale, WindowSize.y * backingScale, ImGuiExt::Texture::Filter::Linear);
501
502 // If the image couldn't be loaded correctly, something went wrong during the build process
503 // Close the application since this would lead to errors later on anyway.
504 if (!m_splashBackgroundTexture.isValid()) {
505 log::error("Could not load splash screen image!");
506 }
507 }
508
509 void WindowSplash::addStartupTask(const std::string &taskName, const TaskFunction &function, bool async) {
510 std::scoped_lock lock(m_tasksMutex);

Callers 1

WindowSplashMethod · 0.95

Calls 2

errorFunction · 0.85
spanMethod · 0.45

Tested by

no test coverage detected