82 lines
No EOL
2.4 KiB
C#
82 lines
No EOL
2.4 KiB
C#
using Analytics;
|
|
using Audio;
|
|
using ConsoleConnection;
|
|
using Online;
|
|
using UnityEngine;
|
|
//MARIANNE
|
|
using UnityEngine.UI;
|
|
//MARIANNE
|
|
|
|
namespace Settings
|
|
{
|
|
public class SettingsController : MonoBehaviour
|
|
{
|
|
[Header("Container")]
|
|
public RectTransform containerToggle;
|
|
public RectTransform containerButtons;
|
|
|
|
//MARIANNNE
|
|
[HideInInspector]
|
|
public Scrollbar scrollBarVertical = null;
|
|
|
|
[HideInInspector]
|
|
public Image scrollViewOutline = null;
|
|
|
|
[HideInInspector]
|
|
public ScrollRect scrollrect = null;
|
|
[HideInInspector]
|
|
public Image viewportImage = null;
|
|
|
|
private void Update()
|
|
{
|
|
if (scrollViewOutline == null || scrollBarVertical == null)
|
|
return;
|
|
|
|
if (scrollViewOutline.enabled == scrollBarVertical.gameObject.activeInHierarchy)
|
|
return;
|
|
|
|
scrollViewOutline.enabled = scrollBarVertical.gameObject.activeInHierarchy;
|
|
|
|
}
|
|
|
|
public void SendToUbiWebpage()
|
|
{
|
|
Application.OpenURL("http://ubisoft.com");
|
|
}
|
|
|
|
public void ShowPairingCodeScreen()
|
|
{
|
|
Statistics.LaunchWizardSession("HelpManualPairingCode");
|
|
ConnectionManager.Instance.ShowPairingCodeScreen();
|
|
}
|
|
|
|
public void ShowLicenses()
|
|
{
|
|
var newScreen = UiBuilder.Instance.BuildLicenseScreen();
|
|
UiManager.Instance.DisplayAppPopupScreen(newScreen, 0, true, AudioManager.SoundIds.NoSound, true);
|
|
}
|
|
|
|
public void GiveFeedback()
|
|
{
|
|
if (Application.internetReachability == NetworkReachability.NotReachable)
|
|
{
|
|
var wifiPopup = UiBuilder.Instance.BuildWifiPopup();
|
|
Statistics.NewWizardScreen("WifiPopup");
|
|
UiManager.Instance.DisplayAppPopupScreen(wifiPopup);
|
|
UbimobileToolkit.instance.ubimobileAccessToken_delete();
|
|
return;
|
|
}
|
|
|
|
UiManager.Instance.PrepareScreenTransition();
|
|
|
|
const string BaseUrl = "https://ubisoft.ca1.qualtrics.com/jfe/form/SV_0998gVPQUd9O3xH";
|
|
OnlineEngine.Session.Refresh()
|
|
.Then(credentials =>
|
|
{
|
|
Application.OpenURL(BaseUrl + "?UplayID=" + credentials.ProfileId);
|
|
});
|
|
|
|
UiManager.Instance.UndisplayTransition();
|
|
}
|
|
}
|
|
} |