40 lines
942 B
C#
40 lines
942 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class GDPRWindow : ParameterlessWindow
|
|
{
|
|
private const string PRIVACY_URL = "https://bit.games/en/privacy_policy";
|
|
private const string TESMS_OF_SERVICE_URL = "https://bit.games/en/terms_of_service";
|
|
|
|
[SerializeField] private Button _closeButton;
|
|
|
|
[SerializeField] private Button _privacyButton;
|
|
[SerializeField] private Button _termsButton;
|
|
|
|
public override int ZOrder => -10;
|
|
|
|
protected override void OnInit()
|
|
{
|
|
_closeButton.onClick.AddListener(Close);
|
|
|
|
_privacyButton.onClick.AddListener(OnClickPrivacyButton);
|
|
_termsButton.onClick.AddListener(OnClickTermsButton);
|
|
}
|
|
|
|
private void OnClickPrivacyButton()
|
|
{
|
|
OpenURL(PRIVACY_URL);
|
|
}
|
|
|
|
private void OnClickTermsButton()
|
|
{
|
|
OpenURL(TESMS_OF_SERVICE_URL);
|
|
}
|
|
|
|
private void OpenURL(string url)
|
|
{
|
|
Application.OpenURL(url);
|
|
}
|
|
|
|
}
|