Xml Map Loader (Menyoo) (#2233)

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
DayibBaba
2023-11-04 00:23:37 +01:00
committed by GitHub
parent ab5c484948
commit db5e47d2ce
7 changed files with 595 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#include "views/view.hpp"
#include "services/xml_maps/xml_map_service.hpp"
namespace big
{
void view::xml_maps()
{
components::button("REFRESH"_T, [] {
g_fiber_pool->queue_job([] {
g_xml_map_service->fetch_xml_files();
});
});
if(ImGui::BeginListBox("##xmlmaps", get_listbox_dimensions()))
{
for (auto& [name, xml_map] : g_xml_map_service->m_all_xml_maps)
{
if (ImGui::Selectable(name.c_str()))
{
g_fiber_pool->queue_job([=, &xml_map] {
g_xml_map_service->spawn_from_xml(xml_map);
});
}
}
ImGui::EndListBox();
}
}
}