From 2d54fd12ac727c66276c142ef5ec66b8db51352e Mon Sep 17 00:00:00 2001 From: jkpete <1031139173@qq.com> Date: Thu, 8 May 2025 17:34:50 +0800 Subject: [PATCH] fixed cs --- Example/SaveSystem/Script/ViewSaveSystem.cs | 1 + .../GodotUITemplete/EGodotTable.cs | 17 +++++++++++++++++ .../PlatformGenerate/EGGodotUIGenerator.cs | 5 +++-- .../PlatformInterface/IGodotTable.cs | 5 ++++- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 addons/EGFramework/Module/GenerateTools/GodotUITemplete/EGodotTable.cs diff --git a/Example/SaveSystem/Script/ViewSaveSystem.cs b/Example/SaveSystem/Script/ViewSaveSystem.cs index 07d4e21..b2e2604 100644 --- a/Example/SaveSystem/Script/ViewSaveSystem.cs +++ b/Example/SaveSystem/Script/ViewSaveSystem.cs @@ -26,6 +26,7 @@ namespace EGFramework.Examples.Test{ dataStudents.Add(dataStudent); dataStudents.Add(dataStudent2); this.GetNode("TabContainer").CreateTable(dataStudents,"Teacher"); + this.Alert("Hello World"); } public override void _ExitTree() diff --git a/addons/EGFramework/Module/GenerateTools/GodotUITemplete/EGodotTable.cs b/addons/EGFramework/Module/GenerateTools/GodotUITemplete/EGodotTable.cs new file mode 100644 index 0000000..c994709 --- /dev/null +++ b/addons/EGFramework/Module/GenerateTools/GodotUITemplete/EGodotTable.cs @@ -0,0 +1,17 @@ +using Godot; + +namespace EGFramework.UI{ + public partial class EGodotTable : VBoxContainer,IEGFramework + { + public override void _Ready() + { + + } + + public override void _ExitTree() + { + + } + + } +} \ No newline at end of file diff --git a/addons/EGFramework/Module/GenerateTools/PlatformGenerate/EGGodotUIGenerator.cs b/addons/EGFramework/Module/GenerateTools/PlatformGenerate/EGGodotUIGenerator.cs index 7c99432..e8d0c32 100644 --- a/addons/EGFramework/Module/GenerateTools/PlatformGenerate/EGGodotUIGenerator.cs +++ b/addons/EGFramework/Module/GenerateTools/PlatformGenerate/EGGodotUIGenerator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using EGFramework.UI; using Godot; namespace EGFramework{ @@ -35,8 +36,8 @@ namespace EGFramework{ self.AddChild(Table); return Table; } - public static VBoxContainer CreateTable(this Node self,IEnumerable tableData,string tableName = "ObjectTable",int limit = 0){ - VBoxContainer Table = new VBoxContainer(); + public static EGodotTable CreateTable(this Node self,IEnumerable tableData,string tableName = "ObjectTable",int limit = 0){ + EGodotTable Table = new EGodotTable(); Table.Name = tableName; MemberInfo[] propertyNames = typeof(T).GetProperties(); MemberInfo[] fieldNames = typeof(T).GetFields(); diff --git a/addons/EGFramework/Module/GenerateTools/PlatformInterface/IGodotTable.cs b/addons/EGFramework/Module/GenerateTools/PlatformInterface/IGodotTable.cs index fa1f798..acda932 100644 --- a/addons/EGFramework/Module/GenerateTools/PlatformInterface/IGodotTable.cs +++ b/addons/EGFramework/Module/GenerateTools/PlatformInterface/IGodotTable.cs @@ -1,3 +1,6 @@ namespace EGFramework{ - + public interface IGodotTable + { + + } } \ No newline at end of file