MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / TryFindLoadImage

Function TryFindLoadImage

projects/uMenu/source/ul/menu/ui/ui_Common.cpp:108–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 pu::sdl2::Texture TryFindLoadImage(const std::string &path_no_ext) {
109 for(const auto &fmt: ImageFormatList) {
110 const auto path = TryGetActiveThemeResource(path_no_ext + "." + fmt);
111 const auto img = pu::ui::render::LoadImageFromFile(path);
112 if(img != nullptr) {
113 return img;
114 }
115 }
116
117 return nullptr;
118 }
119
120 void InitializeResources() {
121 if(!g_CommonResourcesLoaded) {

Callers 3

InputBarMethod · 0.85
EntryMenuMethod · 0.85
TryFindLoadImageHandleFunction · 0.85

Calls 1

Tested by

no test coverage detected