added code from unity
This commit is contained in:
23
Runtime/UI/PopupReference.cs
Normal file
23
Runtime/UI/PopupReference.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Jovian.PopupSystem.UI {
|
||||
/// <summary>
|
||||
/// Reference-only MonoBehaviour for a popup prefab. Holds serialized scene references
|
||||
/// to the content container, canvas group, and background. All behavior is in
|
||||
/// <see cref="PopupView"/>.
|
||||
/// </summary>
|
||||
public class PopupReference : MonoBehaviour {
|
||||
[SerializeField] RectTransform content;
|
||||
[SerializeField] CanvasGroup canvasGroup;
|
||||
[SerializeField] RectTransform background;
|
||||
|
||||
/// <summary>The content RectTransform where popup elements are parented.</summary>
|
||||
public RectTransform Content => content;
|
||||
|
||||
/// <summary>The CanvasGroup for fade animation control.</summary>
|
||||
public CanvasGroup CanvasGroup => canvasGroup;
|
||||
|
||||
/// <summary>The background RectTransform that sizes to content.</summary>
|
||||
public RectTransform Background => background;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user