parent
a1bc7517af
commit
ddaee3f069
@ -120,7 +120,7 @@ namespace big
|
|||||||
for (auto& item : components)
|
for (auto& item : components)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, ImGuiInputTextFlags_None))
|
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0))
|
||||||
{
|
{
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, 0, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, 0, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
||||||
@ -135,7 +135,7 @@ namespace big
|
|||||||
for (auto& item : components)
|
for (auto& item : components)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, ImGuiInputTextFlags_None))
|
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0))
|
||||||
{
|
{
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, item.texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, item.texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
||||||
@ -150,7 +150,7 @@ namespace big
|
|||||||
for (auto& item : props)
|
for (auto& item : props)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, ImGuiInputTextFlags_None))
|
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0))
|
||||||
{
|
{
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
if (item.drawable_id == -1)
|
if (item.drawable_id == -1)
|
||||||
@ -168,7 +168,7 @@ namespace big
|
|||||||
for (auto& item : props)
|
for (auto& item : props)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, ImGuiInputTextFlags_None))
|
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0))
|
||||||
{
|
{
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
PED::SET_PED_PROP_INDEX(self::ped, item.id, item.drawable_id, item.texture_id, TRUE, 1);
|
PED::SET_PED_PROP_INDEX(self::ped, item.id, item.drawable_id, item.texture_id, TRUE, 1);
|
||||||
@ -192,8 +192,6 @@ namespace big
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
components::button("OUTFIT_SAVE_CURRENT"_T, [] {
|
components::button("OUTFIT_SAVE_CURRENT"_T, [] {
|
||||||
if (outfit_name[0] != '\0')
|
|
||||||
{
|
|
||||||
nlohmann::json j;
|
nlohmann::json j;
|
||||||
nlohmann::json j_components;
|
nlohmann::json j_components;
|
||||||
nlohmann::json j_props;
|
nlohmann::json j_props;
|
||||||
@ -224,7 +222,6 @@ namespace big
|
|||||||
|
|
||||||
std::ofstream o(saved_outfit_path.get_file(str + ".json").get_path());
|
std::ofstream o(saved_outfit_path.get_file(str + ".json").get_path());
|
||||||
o << std::setw(4) << j << std::endl;
|
o << std::setw(4) << j << std::endl;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
@ -240,7 +237,7 @@ namespace big
|
|||||||
std::stringstream ss(item.key());
|
std::stringstream ss(item.key());
|
||||||
int id = 0;
|
int id = 0;
|
||||||
ss >> id;
|
ss >> id;
|
||||||
int draw_id = item.value()["draw_id"];
|
int draw_id = item.value()["drawable_id"];
|
||||||
int texture_id = item.value()["texture_id"];
|
int texture_id = item.value()["texture_id"];
|
||||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, id, draw_id, texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, id));
|
PED::SET_PED_COMPONENT_VARIATION(self::ped, id, draw_id, texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, id));
|
||||||
}
|
}
|
||||||
@ -250,7 +247,7 @@ namespace big
|
|||||||
std::stringstream ss(item.key());
|
std::stringstream ss(item.key());
|
||||||
int id = 0;
|
int id = 0;
|
||||||
ss >> id;
|
ss >> id;
|
||||||
int draw_id = item.value()["draw_id"];
|
int draw_id = item.value()["drawable_id"];
|
||||||
int texture_id = item.value()["texture_id"];
|
int texture_id = item.value()["texture_id"];
|
||||||
if (draw_id == -1)
|
if (draw_id == -1)
|
||||||
PED::CLEAR_PED_PROP(self::ped, id, 1);
|
PED::CLEAR_PED_PROP(self::ped, id, 1);
|
||||||
|
@ -115,7 +115,7 @@ namespace big
|
|||||||
for (auto& item : components)
|
for (auto& item : components)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), 0);
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ namespace big
|
|||||||
for (auto& item : components)
|
for (auto& item : components)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), 0);
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ namespace big
|
|||||||
for (auto& item : props)
|
for (auto& item : props)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), 0);
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ namespace big
|
|||||||
for (auto& item : props)
|
for (auto& item : props)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(60);
|
||||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), 0);
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user