void setCountry(ValidCountries.Country validCountry) { string countryCode = ValidCountries.CountryToString(validCountry); ImageTexture texture = new ImageTexture(); texture.Load($"Resources/Graphics/Flags/{countryCode}.png"); country.Texture = texture; }
void onTournamentInfoSent(string tournamentAlias, ValidCountries.Country country, int maxRate, int memberCount, string schemeName) { PackedScene scene = (PackedScene)ResourceLoader.Load("Scenes/AdvancedComponents/TournamentInfoField.tscn"); TournamentInfoField field = (TournamentInfoField)scene.Instance(); Tournament data = new Tournament(tournamentAlias, country, maxRate, memberCount, schemeName); field.Initialize(data); tournamentsList.AddChild(field); }