SaveTool: make the weapon part selector focus on the current item.

This commit is contained in:
Guillaume Jacquemin 2022-11-25 09:43:32 +01:00
parent d1712bf8cb
commit 3c4dfbda9a

View file

@ -479,6 +479,9 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) {
if(ImGui::Selectable(mapped_part.second.data(), mapped_part.first == part.id)) { if(ImGui::Selectable(mapped_part.second.data(), mapped_part.first == part.id)) {
part.id = mapped_part.first; part.id = mapped_part.first;
} }
if(mapped_part.first == part.id) {
ImGui::SetItemDefaultFocus();
}
} }
ImGui::EndListBox(); ImGui::EndListBox();