public void ChangeSelectedButton(PopupType type, int buttonIdx) { switch (type) { case PopupType.ShipControl: shipControlPanelPopup.SetSelectedButton(buttonIdx); break; case PopupType.ChangeFireMode: changeFireModePopup.SetSelectedButton(buttonIdx); break; case PopupType.LaunchSquadron: launchSquadronPopup.SetSelectedButton(buttonIdx); break; } }