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 9a610851cb
commit fba0098ca3
7 changed files with 595 additions and 0 deletions

View File

@ -69,6 +69,7 @@ namespace big
static void blackhole();
static void model_swapper();
static void world();
static void xml_maps();
static void gta_cache();
static void lua_scripts();
static void vfx();

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();
}
}
}