private void OnAchievementButtonClicked(UXButton button) { if (GameServicesManager.IsUserAuthenticated()) { GameServicesManager.ShowAchievements(); return; } this.achievementsClicked = true; GameServicesManager.SignIn(); }
private void OnGoogleButtonClicked(UXButton button) { if (GameServicesManager.IsUserAuthenticated()) { GameServicesManager.SignOut(); Service.Get <IAccountSyncController>().UnregisterGameServicesAccount(); return; } GameServicesManager.SignIn(); }
private void OnVideoDetailsGP(string guid) { this.videoGuid = guid; if (GameServicesManager.IsUserAuthenticated()) { this.OnGPLoggedIn(); return; } EventManager eventManager = Service.Get <EventManager>(); eventManager.RegisterObserver(this, EventId.GameServicesSignedIn); eventManager.RegisterObserver(this, EventId.GameServicesSignedOut); GameServicesManager.SignIn(); }
private void InitLabels() { this.mainGroup = base.GetElement <UXElement>("DefaultContainer"); this.mainGroup.Visible = true; UXLabel element = base.GetElement <UXLabel>("LabelSettingsTitle"); element.Text = this.lang.Get("SETTINGS_TITLE", new object[0]); element = base.GetElement <UXLabel>("LabelBtnMusic"); element.Text = this.lang.Get("SETTINGS_MUSIC", new object[0]); element = base.GetElement <UXLabel>("LabelBtnSoundEffects"); element.Text = this.lang.Get("SETTINGS_SFX", new object[0]); element = base.GetElement <UXLabel>("LabelBtnLanguage"); element.Text = this.lang.GetDisplayLanguage(this.lang.Locale); this.SetFacebookButtonLabel(Service.ISocialDataController.IsLoggedIn); this.SetGoogleButtonLabel(GameServicesManager.IsUserAuthenticated()); element = base.GetElement <UXLabel>("LabelBtnAbout"); element.Text = this.lang.Get("SETTINGS_ABOUT", new object[0]); element = base.GetElement <UXLabel>("LabelBtnHelp"); element.Text = this.lang.Get("SETTINGS_HELP", new object[0]); element = base.GetElement <UXLabel>("LabelBtnPrivacyPolicy"); element.Text = this.lang.Get("SETTINGS_PRIVACY", new object[0]); element = base.GetElement <UXLabel>("LabelBtnTOS"); element.Text = this.lang.Get("SETTINGS_TOS", new object[0]); if (GameConstants.FORUMS_ENABLED) { element = base.GetElement <UXLabel>("LabelBtnForums"); element.Text = this.lang.Get("SETTINGS_FORUMS", new object[0]); } element = base.GetElement <UXLabel>("LabelFBIncentiveGoogle"); element.Text = this.lang.Get("CONNECT_FB_SETTINGS_DESC", new object[0]); element = base.GetElement <UXLabel>("LabelBtnFactionSwap"); FactionType faction = Service.CurrentPlayer.Faction; if (faction != FactionType.Empire) { if (faction == FactionType.Rebel) { element.Text = this.lang.Get("FACTION_FLIP_PLAY_EMPIRE", new object[0]); } } else { element.Text = this.lang.Get("FACTION_FLIP_PLAY_REBEL", new object[0]); } }