From 6813f5b78aa030d8d900b9ab72233cf4023f8877 Mon Sep 17 00:00:00 2001 From: OLDREDSTONE Date: Wed, 7 May 2025 10:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B1=9E=E6=80=A7=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.xaml.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index fea7d43..b23dd6e 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -136,6 +136,30 @@ namespace RDTKEditor Value = property.GetValue(obj)?.ToString() ?? "null", Type = RDPropertyType.String, }; + case "Int32": + return new() + { + Verifier = new RDTKPropertyVerifierDefault(), + Name = property.Name, + Value = property.GetValue(obj)?.ToString() ?? "null", + Type = RDPropertyType.Integer, + }; + case "Single": + return new() + { + Verifier = new RDTKPropertyVerifierDefault(), + Name = property.Name, + Value = property.GetValue(obj)?.ToString() ?? "null", + Type = RDPropertyType.Float, + }; + case "RDColor": + return new() + { + Verifier = new RDTKPropertyVerifierDefault(), + Name = property.Name, + Value = property.GetValue(obj)?.ToString() ?? "null", + Type = RDPropertyType.Color, + }; } return new() { @@ -196,6 +220,39 @@ namespace RDTKEditor new TextBox() { Text = property.Value, } }, }, + RDPropertyType.Integer => new() + { + AllowDrop = true, + Orientation = Orientation.Horizontal, + FlowDirection = FlowDirection.LeftToRight, + Children = + { + new Label(){Content = property.Name}, + new TextBox() { Text = property.Value, } + }, + }, + RDPropertyType.Float => new() + { + AllowDrop = true, + Orientation = Orientation.Horizontal, + FlowDirection = FlowDirection.LeftToRight, + Children = + { + new Label(){Content = property.Name}, + new TextBox() { Text = property.Value, } + }, + }, + RDPropertyType.Color => new() + { + AllowDrop = true, + Orientation = Orientation.Horizontal, + FlowDirection = FlowDirection.LeftToRight, + Children = + { + new Label(){Content = property.Name}, + new TextBox() { Text = property.Value, } + }, + }, _ => new() { Orientation = Orientation.Horizontal,