public void OnChangeCountry(string key) { XsollaCountry country = _countries.GetItemByKey(key); dropDownContainer.SetActive(false); GetComponentInParent <PaymentListScreenController>().ChangeCountry(country.iso); }
public void SetCountries(string currentCountryIso, XsollaCountries countries) { _countries = countries; dropDownController.gameObject.SetActive(true); //Show countries dropdown dropDownController.SetParentForScroll(gameObject.transform.parent.parent.parent); dropDownController.OnItemSelected += (position, title) => { OnChangeCountry(position); }; dropDownController.SetData(countries.GetTitleList(), _countries.GetItemByKey(currentCountryIso).name); }