mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-29 19:03:10 +00:00
24 lines
535 B
C#
24 lines
535 B
C#
using Plugins.CommonDependencies;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Raindrop.UI
|
|
{
|
|
[RequireComponent(typeof(Button))]
|
|
public class LogoutButton : MonoBehaviour
|
|
{
|
|
//get own references.
|
|
void Awake()
|
|
{
|
|
Button btn = this.GetComponent<Button>();
|
|
btn.onClick.AddListener(Logout);
|
|
}
|
|
|
|
private void Logout()
|
|
{
|
|
Debug.Log("logout requested by user UI");
|
|
RaindropInstance.GlobalInstance.Netcom.Logout();
|
|
}
|
|
}
|
|
}
|