using FairyGUI;
using UnityEngine;
using XGame.Framework.UI;

namespace XGame.Framework.FGUI
{
    public class FguiNested : IUINested
    {
        private GComponent _component;
        public GComponent Component => _component;
        public Transform Tr => _component.displayObject.gameObject.transform;
        bool IUINested.IsActiveSelf => _component.displayObject.gameObject.activeSelf;
        bool IUINested.IsActiveInHierarchy => _component.displayObject.gameObject.activeInHierarchy;


        void IUINested.SetActive(bool isActive)
        {
            _component.displayObject.visible = isActive;
        }
        public FguiNested(GComponent component)
        {
            _component = component;
        }
    }
}
