58 lines
1.1 KiB
C#
58 lines
1.1 KiB
C#
using Gameplay.Net;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.UIElements;
|
|
using Button = UnityEngine.UI.Button;
|
|
using Image = UnityEngine.UI.Image;
|
|
|
|
public class UIGiftCodeController : UIWindow
|
|
{
|
|
//UI GameObj
|
|
///Auto Gen Start///
|
|
public TMP_InputField InputField_LogIn;
|
|
public TMP_Text Text_DuiHuanMaitle;
|
|
|
|
///Auto Gen End///
|
|
|
|
// Use this for initialization
|
|
public override void OnInit()
|
|
{
|
|
//bind UI GameObj
|
|
UIGiftCodeBinder.GetComponents(this);
|
|
BindButton(GetComponent<Button>("bg/DuiHuanBtn"), OnDuiHuanBtnClick);
|
|
BindButton(GetComponent<Button>("ReturnBtn"), OnReturnBtnClick);
|
|
|
|
}
|
|
|
|
private void OnReturnBtnClick()
|
|
{
|
|
CloseWindow();
|
|
}
|
|
|
|
private void OnDuiHuanBtnClick()
|
|
{
|
|
NetHelper.GiftCode(InputField_LogIn.text);
|
|
}
|
|
|
|
//invoke when open window
|
|
protected override void OnOpenWindow(object data = null)
|
|
{
|
|
|
|
}
|
|
|
|
//invoke when reload window
|
|
protected override void OnReloadWindow(object data = null)
|
|
{
|
|
|
|
}
|
|
|
|
//invoke when close window
|
|
protected override void OnCloseWindow()
|
|
{
|
|
|
|
}
|
|
} |