refactor(TabWeapons): CustomWeapon enum renamed
This commit is contained in:
parent
4d942c998e
commit
a39276f248
@ -10,18 +10,18 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (ImGui::TreeNode("Custom Weapons"))
|
if (ImGui::TreeNode("Custom Weapons"))
|
||||||
{
|
{
|
||||||
int selected = (int)g.weapons.custom_weapon;
|
CustomWeapon selected = g.weapons.custom_weapon;
|
||||||
|
|
||||||
if (ImGui::BeginCombo("Weapon", custom_weapons[selected].name))
|
if (ImGui::BeginCombo("Weapon", custom_weapons[(int)selected].name))
|
||||||
{
|
{
|
||||||
for (custom_weapon weapon : custom_weapons)
|
for (custom_weapon weapon : custom_weapons)
|
||||||
{
|
{
|
||||||
if (ImGui::Selectable(weapon.name, weapon.id == (CustomWeapons)selected))
|
if (ImGui::Selectable(weapon.name, weapon.id == selected))
|
||||||
{
|
{
|
||||||
g.weapons.custom_weapon = weapon.id;
|
g.weapons.custom_weapon = weapon.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (weapon.id == (CustomWeapons)selected)
|
if (weapon.id == selected)
|
||||||
ImGui::SetItemDefaultFocus();
|
ImGui::SetItemDefaultFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user