feat(Outfit Editor): Add [+] & [-] buttons (#1441)

* And other general UI improvements
This commit is contained in:
tupoy-ya
2023-06-23 13:44:06 +05:00
committed by GitHub
parent 8bc6648100
commit 1eae251012
28 changed files with 415 additions and 381 deletions

View File

@ -23,7 +23,7 @@ namespace big
ImGui::PushItemWidth(250);
components::sub_title("CREATOR_SAVED_JOBS"_T);
if (ImGui::ListBoxHeader("##empty", ImVec2(200, 200)))
if (ImGui::BeginListBox("##empty", ImVec2(200, 200)))
{
for (const auto& pair : creator_files)
{
@ -31,7 +31,7 @@ namespace big
selected_creator_file = pair;
}
ImGui::ListBoxFooter();
ImGui::EndListBox();
}
ImGui::SameLine();

View File

@ -121,7 +121,7 @@ namespace big
if (!new_template.m_ped_model.empty() && ped_found == g_gta_data_service->peds().end())
{
if (ImGui::ListBoxHeader("##pedlist", ImVec2(250, 200)))
if (ImGui::BeginListBox("##pedlist", ImVec2(250, 200)))
{
for (auto& p : g_gta_data_service->peds() | std::ranges::views::values)
{
@ -135,7 +135,7 @@ namespace big
}
}
ImGui::ListBoxFooter();
ImGui::EndListBox();
}
}
@ -149,7 +149,7 @@ namespace big
if (!new_template.m_vehicle_model.empty() && veh_found == g_gta_data_service->vehicles().end())
{
if (ImGui::ListBoxHeader("##vehlist", ImVec2(250, 200)))
if (ImGui::BeginListBox("##vehlist", ImVec2(250, 200)))
{
for (auto& p : g_gta_data_service->vehicles() | std::ranges::views::values)
{
@ -163,7 +163,7 @@ namespace big
}
}
ImGui::ListBoxFooter();
ImGui::EndListBox();
}
}
@ -177,7 +177,7 @@ namespace big
if (!new_template.m_weapon_model.empty() && weap_found == g_gta_data_service->weapons().end())
{
if (ImGui::ListBoxHeader("##weaplist", ImVec2(250, 200)))
if (ImGui::BeginListBox("##weaplist", ImVec2(250, 200)))
{
for (auto& p : g_gta_data_service->weapons() | std::ranges::views::values)
{
@ -191,7 +191,7 @@ namespace big
}
}
ImGui::ListBoxFooter();
ImGui::EndListBox();
}
}