From 9aa0561e75b7e74c25685f7faf96f42f91435f52 Mon Sep 17 00:00:00 2001 From: jkpete <1031139173@qq.com> Date: Fri, 20 Jun 2025 11:59:53 +0800 Subject: [PATCH] add table test --- Example/SaveSystem/Script/ViewSaveSystem.cs | 38 ++--- .../Templete/Godot/EGGodotUIGenerator.cs | 64 ------- .../Templete/Godot/EGodotTable.cs | 66 -------- .../Templete/Godot/UI/EGodotSaveTable.cs | 50 ++++++ .../Templete/Godot/UI/EGodotTable.cs | 159 ++++++++++++++++++ .../Templete/Variant/EGDataStruct.cs | 30 +++- .../Templete/Variant/EGReadOnly.cs | 17 -- .../Templete/Variant/EGVariantGenerator.cs | 33 +++- 8 files changed, 269 insertions(+), 188 deletions(-) delete mode 100644 addons/EGFramework/Module/GenerateTools/Templete/Godot/EGGodotUIGenerator.cs delete mode 100644 addons/EGFramework/Module/GenerateTools/Templete/Godot/EGodotTable.cs create mode 100644 addons/EGFramework/Module/GenerateTools/Templete/Godot/UI/EGodotSaveTable.cs create mode 100644 addons/EGFramework/Module/GenerateTools/Templete/Godot/UI/EGodotTable.cs delete mode 100644 addons/EGFramework/Module/GenerateTools/Templete/Variant/EGReadOnly.cs diff --git a/Example/SaveSystem/Script/ViewSaveSystem.cs b/Example/SaveSystem/Script/ViewSaveSystem.cs index 5be98ff..5430181 100644 --- a/Example/SaveSystem/Script/ViewSaveSystem.cs +++ b/Example/SaveSystem/Script/ViewSaveSystem.cs @@ -13,38 +13,22 @@ namespace EGFramework.Examples.Test{ public string[][] DataList2 { get; set; } public override void _Ready() { - DataList = new string[3][]; - string[] a = { "Name", "Age" }; - DataList[0] = a; - string[] b = { "Tom", "18" }; - DataList[1] = b; - string[] c = { "Jerry", "20" }; - DataList[2] = c; - this.GetNode("TabContainer").CreateTable(DataList, "Student"); + + Container container = this.GetNode("TabContainer"); DataStudent dataStudent = new DataStudent("S", 18); - DataStudent dataStudent2 = new DataStudent(null, 20); + DataStudent dataStudent2 = new DataStudent("F", 20); List dataStudents = new List(); dataStudents.Add(dataStudent); dataStudents.Add(dataStudent2); - EGodotTable table = this.GetNode("TabContainer").CreateTable(dataStudents, "Teacher"); - // Button btn = this.CreateNode