Browse Source

fixed cs

master
jkpete 3 months ago
parent
commit
2d54fd12ac
  1. 1
      Example/SaveSystem/Script/ViewSaveSystem.cs
  2. 17
      addons/EGFramework/Module/GenerateTools/GodotUITemplete/EGodotTable.cs
  3. 5
      addons/EGFramework/Module/GenerateTools/PlatformGenerate/EGGodotUIGenerator.cs
  4. 3
      addons/EGFramework/Module/GenerateTools/PlatformInterface/IGodotTable.cs

1
Example/SaveSystem/Script/ViewSaveSystem.cs

@ -26,6 +26,7 @@ namespace EGFramework.Examples.Test{ @@ -26,6 +26,7 @@ namespace EGFramework.Examples.Test{
dataStudents.Add(dataStudent);
dataStudents.Add(dataStudent2);
this.GetNode<TabContainer>("TabContainer").CreateTable<DataStudent>(dataStudents,"Teacher");
this.Alert("Hello World");
}
public override void _ExitTree()

17
addons/EGFramework/Module/GenerateTools/GodotUITemplete/EGodotTable.cs

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
using Godot;
namespace EGFramework.UI{
public partial class EGodotTable : VBoxContainer,IEGFramework
{
public override void _Ready()
{
}
public override void _ExitTree()
{
}
}
}

5
addons/EGFramework/Module/GenerateTools/PlatformGenerate/EGGodotUIGenerator.cs

@ -1,6 +1,7 @@ @@ -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{ @@ -35,8 +36,8 @@ namespace EGFramework{
self.AddChild(Table);
return Table;
}
public static VBoxContainer CreateTable<T>(this Node self,IEnumerable<T> tableData,string tableName = "ObjectTable",int limit = 0){
VBoxContainer Table = new VBoxContainer();
public static EGodotTable CreateTable<T>(this Node self,IEnumerable<T> tableData,string tableName = "ObjectTable",int limit = 0){
EGodotTable Table = new EGodotTable();
Table.Name = tableName;
MemberInfo[] propertyNames = typeof(T).GetProperties();
MemberInfo[] fieldNames = typeof(T).GetFields();

3
addons/EGFramework/Module/GenerateTools/PlatformInterface/IGodotTable.cs

@ -1,3 +1,6 @@ @@ -1,3 +1,6 @@
namespace EGFramework{
public interface IGodotTable
{
}
}
Loading…
Cancel
Save