FguiPanel.cs 653 B

123456789101112131415161718192021222324252627
  1. using FairyGUI;
  2. using XGame.Framework.UI;
  3. namespace XGame.Framework.FGUI
  4. {
  5. public class FguiPanel : IUIPanel
  6. {
  7. private GComponent _panel;
  8. private UILayer _layer;
  9. public FguiPanel(GComponent uiPanel, UILayer layer)
  10. {
  11. _panel = uiPanel;
  12. _layer = layer;
  13. }
  14. public GComponent Panel => _panel;
  15. #region IUIPanel 接口实现
  16. UILayer IUIPanel.Layer => _layer;
  17. void IUIPanel.SetActive(bool isActive)
  18. {
  19. //_panel.enabled: 为false时不隐藏,会做灰度处理
  20. _panel.displayObject.visible = isActive;
  21. }
  22. #endregion
  23. }
  24. }