39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ResourceUI : MonoBehaviour
|
|
{
|
|
[SerializeField][Header("图片")]
|
|
private RawImage rawImageGet;
|
|
[SerializeField][Header("详情标题")]
|
|
private Text titleText;
|
|
[SerializeField][Header("详情内容")]
|
|
private Text contentText;
|
|
|
|
[SerializeField][Header("是否请求过")]
|
|
public bool isResquested = false;
|
|
|
|
[SerializeField][Header("是否加入到请求字典中")]
|
|
public bool isAdded = false;
|
|
|
|
[SerializeField][Header("是否是用户上传")]
|
|
public bool isUserUploaded = false;
|
|
|
|
[Header("详情按钮")] public Button infoBt;
|
|
[Header("分享按钮")] public Button shareBt;
|
|
[Header("关闭按钮")] public Button closeBt;
|
|
|
|
[SerializeField] [Header("资源位类型")]
|
|
public UIType uIType = UIType.Small;
|
|
public void SetResourceUIClass(Texture2D rawImageGet, string contentText, string titleText, bool isUserUploaded)
|
|
{
|
|
this.rawImageGet.texture = rawImageGet;
|
|
this.titleText.text = titleText;
|
|
this.contentText.text = contentText;
|
|
this.isUserUploaded = isUserUploaded;
|
|
}
|
|
}
|