21 lines
420 B
C#
21 lines
420 B
C#
|
|
using Godot;
|
|
using Rokojori;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Rokojori
|
|
{
|
|
public interface UIHolderControl
|
|
{
|
|
public void SetUI( UI ui, bool computeDepth = true );
|
|
public UI GetUI( bool computeDepth = true );
|
|
}
|
|
|
|
public class UIHolder
|
|
{
|
|
public static UI GetUI( Control c )
|
|
{
|
|
return c is UIHolderControl ? ( (UIHolderControl)c ).GetUI() : c.FindParentThatIs<UI>();
|
|
}
|
|
}
|
|
} |