refactor!: Modify command argument handling and move on_ method to bool_command (#1826)

This commit is contained in:
Andreas Maerten
2023-07-26 22:22:40 +02:00
committed by GitHub
parent f73c1bdc98
commit 96493b5a22
104 changed files with 562 additions and 381 deletions

View File

@ -113,8 +113,8 @@ namespace big
ImGui::PushItemWidth(250);
components::input_text_with_hint("##name", "Name", &new_template.m_name);
components::input_text_with_hint("##pedmodel", "Ped model", &new_template.m_ped_model);
components::input_text_with_hint("##name", "Name", new_template.m_name);
components::input_text_with_hint("##pedmodel", "Ped model", new_template.m_ped_model);
auto ped_found = std::find_if(g_gta_data_service->peds().begin(), g_gta_data_service->peds().end(), [=](const auto& pair) {
return pair.second.m_name == new_template.m_ped_model;
@ -140,7 +140,7 @@ namespace big
}
}
components::input_text_with_hint("##vehmodel", "Vehicle model", &new_template.m_vehicle_model);
components::input_text_with_hint("##vehmodel", "Vehicle model", new_template.m_vehicle_model);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Leave empty to spawn on foot");
@ -168,7 +168,7 @@ namespace big
}
}
components::input_text_with_hint("##weapmodel", "Weapon model", &new_template.m_weapon_model);
components::input_text_with_hint("##weapmodel", "Weapon model", new_template.m_weapon_model);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Leave empty to spawn unarmed, beware that a player can only attain 3 melee attackers at a time");
@ -325,7 +325,7 @@ namespace big
ImGui::PopItemWidth();
ImGui::EndGroup();
components::input_text_with_hint("##new_template.m_description", "Description", &new_template.m_description);
components::input_text_with_hint("##new_template.m_description", "Description", new_template.m_description);
ImGui::TreePop();
}