/// <summary> /// Sets the provider type to represent. /// </summary> public void SetProvider(ApiProviderType provider) { this.provider = provider; iconSprite.SpriteName = Model.GetProviderIcon(provider); RefreshFocus(); }
/// <summary> /// Event called when the last login api setting has been changed. /// </summary> private void OnLastLoginApiChange(ApiProviderType type) { currentProvider.Value = Api.GetProvider(type); DisposeAuthRequest(false); DisposeMeRequest(false); }
/// <summary> /// Event called on api provider change. /// </summary> private void OnProviderChange(ApiProviderType provider) => RefreshStatus();
/// <summary> /// Returns the sprite name of the api provider icon. /// </summary> public string GetProviderIcon(ApiProviderType type) { return(Api.GetProvider(type).IconName); }
/// <summary> /// Selects the API provider to use. /// </summary> public void SelectApi(ApiProviderType type) { GameConfiguration.LastLoginApi.Value = type; GameConfiguration.Save(); }
public IApiProvider GetProvider(ApiProviderType type) => providers[type];