unitytools/Assets/UnityTools/script/NormalPopUpWindow.cs
2024-11-12 00:30:33 +08:00

38 lines
919 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public enum ModeEnum//窗口模式枚举
{
autofill = 0,//自动填充
fixedSize = 1,//固定大小
}
public class NormalPopUpWindow : MonoBehaviour
{
public ModeEnum Mode = ModeEnum.autofill;//窗口模式
public void setMinimumHeight(int value) {
minimumHeight = value;
GetComponent<LayoutElement>().minHeight = minimumHeight;
Debug.Log(GetComponent<LayoutElement>().minHeight);
}
private int minimumHeight = -1;//最小高度
public void setMinimumWidth(int value)
{
minimumWidth = value;
GetComponent<LayoutElement>().minWidth = minimumWidth;
Debug.Log(GetComponent<LayoutElement>().minWidth);
}
private int minimumWidth = -1;//最小宽度
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}