MainHomePanelVM.cs 837 B

123456789101112131415161718192021222324252627282930313233
  1. using FairyGUI;
  2. namespace FL.FGUI
  3. {
  4. public partial class MainHomePanelVM
  5. {
  6. public bool SysMenuActive
  7. {
  8. get => SysMenuCtrl.selectedIndex > 0;
  9. set
  10. {
  11. SysMenuCtrl.selectedIndex = value ? 1 : 0;
  12. }
  13. }
  14. /// <summary>
  15. /// 0:没有奖励
  16. /// 1:有奖励未满
  17. /// 2:奖励满
  18. /// 3:未解锁
  19. /// </summary>
  20. /// <param name="state"></param>
  21. public void SetMapRewardState(int state)
  22. {
  23. MapRewardBtn.GetController("RewardStateCtrl").selectedIndex = state;
  24. }
  25. public void SetMapRewardUnlockTxt(string text)
  26. {
  27. var textField = MapRewardBtn.GetChild("UnlockTxt") as GTextField;
  28. textField.text = text;
  29. }
  30. }
  31. }