From 449ebf4c42ec531aab513c3266445ec17e103390 Mon Sep 17 00:00:00 2001 From: lonelybud <139460769+lonelybud@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:38:41 +0530 Subject: [PATCH] fix(Weapon Combo Boxes): use unique ids for weapon combos (#3428) --- src/views/self/view_weapons.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/self/view_weapons.cpp b/src/views/self/view_weapons.cpp index f3367ed4..9692afea 100644 --- a/src/views/self/view_weapons.cpp +++ b/src/views/self/view_weapons.cpp @@ -130,7 +130,7 @@ namespace big components::command_checkbox<"modifyexplosionradius">(); ImGui::InputFloat("VIEW_WEAPON_EXPLOSION_RADIUS"_T.data(), &g.weapons.set_explosion_radius, .1, 200, "%.1f"); - + ImGui::PushID("custom_weapon_view"); ImGui::SeparatorText("CUSTOM_WEAPONS"_T.data()); ImGui::Checkbox("VIEW_WEAPON_CUSTOM_GUN_ONLY_FIRES_WHEN_THE_WEAPON_IS_OUT"_T.data(), &g.self.custom_weapon_stop); @@ -154,6 +154,7 @@ namespace big ImGui::EndCombo(); } + ImGui::PopID(); switch (selected) { @@ -228,6 +229,7 @@ namespace big ImGui::PopItemWidth(); } + ImGui::PushID("ammunation_view"); if (ImGui::CollapsingHeader("VIEW_WEAPON_AMMUNATION"_T.data())) { static Hash selected_weapon_hash, selected_weapon_attachment_hash{}; @@ -326,6 +328,7 @@ namespace big WEAPON::SET_PED_WEAPON_TINT_INDEX(self::ped, selected_weapon_hash, tint); }); } + ImGui::PopID(); if (ImGui::CollapsingHeader("VIEW_WEAPON_PERSIST_WEAPONS"_T.data())) { ImGui::PushID(1);