UICreateRedDotKeyCode.cs 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #if UNITY_EDITOR
  2. namespace YIUIFramework.Editor
  3. {
  4. internal class UICreateRedDotKeyCode : BaseTemplate
  5. {
  6. public override string EventName => "红点系统 key 枚举自动生成 (注意请编译ET)";
  7. private bool m_AutoRefresh = false;
  8. public override bool AutoRefresh => m_AutoRefresh;
  9. private bool m_ShowTips = false;
  10. public override bool ShowTips => m_ShowTips;
  11. public UICreateRedDotKeyCode(out bool result, string authorName, UICreateRedDotKeyData codeData) :
  12. base(authorName)
  13. {
  14. var path = $"../{codeData.ClassPath}" ;
  15. var templatePath = $"Assets/../Packages/cn.etetet.yiuireddot/Editor/RedDot/Template";
  16. var template = $"{templatePath}/UICreateRedDotKeyTemplate.txt";
  17. CreateVo = new CreateVo(template, path);
  18. m_AutoRefresh = codeData.AutoRefresh;
  19. m_ShowTips = codeData.ShowTips;
  20. ValueDic["Content"] = codeData.Content;
  21. result = CreateNewFile();
  22. }
  23. }
  24. }
  25. #endif