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
1 changed files with 3 additions and 0 deletions

View File

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