MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / AddMountedExplorer

Method AddMountedExplorer

Goldleaf/source/ui/ui_ExploreMenuLayout.cpp:176–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 }
175
176 void ExploreMenuLayout::AddMountedExplorer(fs::Explorer *exp, const std::string &name, pu::sdl2::TextureHandle::Ref icon) {
177 auto mounted_exp_item = pu::ui::elm::MenuItem::New(name);
178 mounted_exp_item->SetIcon(icon);
179 mounted_exp_item->SetColor(g_Settings.GetColorScheme().text);
180 mounted_exp_item->AddOnKey(std::bind(&ExploreMenuLayout::OnMountedExplorerSelected, this, exp, name, icon));
181 mounted_exp_item->AddOnKey(std::bind(&ExploreMenuLayout::OnMountedExplorerSelectedX, this, exp), HidNpadButton_X);
182 this->mounted_explorer_items[exp] = mounted_exp_item;
183 fs::RegisterMountedExplorer(exp);
184 this->ReloadMenu();
185 }
186
187}

Callers 2

Calls 2

ReloadMenuMethod · 0.95
RegisterMountedExplorerFunction · 0.85

Tested by

no test coverage detected