コード例 #1
0
ファイル: TypeDrawer.cs プロジェクト: code2X/dniPrints
 public override void DrawName(string name, Type type, Type parent, object instance = null)
 {
     Caller.Try(() =>
     {
         if (type.IsArray)
         {
             if (ImGui.Button(name) && instance != null)
             {
                 //instance = new Mesh[5];
                 ArrayInfoWindow.GetInstance().Show(instance, name);
             }
         }
         else if (IsGeneralType(type) == false && type.IsEnum == false)
         {
             if (ImGui.Button(name) && instance != null)
             {
                 InstanceView.GetInstance().Add(parent.Name, name, type, instance);
             }
         }
         else
         {
             ImGui.Text(name);
         }
     });
 }
コード例 #2
0
ファイル: DotInside.cs プロジェクト: code2X/dniPrints
        static void TestArray()
        {
            int[] array = new int[5];
            array[0] = 1;
            array[1] = 4;
            array[2] = 3;
            array[3] = 3;
            array[4] = 5;

            object obj = array;

            ArrayInfoWindow.GetInstance().Show(obj);
        }