第一次提交
This commit is contained in:
54
Assets/Scripts/UI/UIConditionItem.cs
Normal file
54
Assets/Scripts/UI/UIConditionItem.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using HxGame.Data;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIConditionItem : MonoBehaviour
|
||||
{
|
||||
public Dropdown dropMode; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public InputField txtLevel; //<2F><><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>
|
||||
public InputField txtItemID; //<2F><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>
|
||||
public InputField txtMoney; //<2F><><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>
|
||||
public InputField txtTime; //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
public Button btnDel; //ɾ<><C9BE>
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
btnDel.onClick.AddListener(RemoveSelf);
|
||||
}
|
||||
|
||||
private void RemoveSelf()
|
||||
{
|
||||
DestroyImmediate(gameObject);
|
||||
}
|
||||
|
||||
public bool CheckValid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtLevel.text))
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtItemID.text))
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>ID");
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtMoney.text))
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtTime.text))
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>дʱ<D0B4><CAB1>");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user