This commit is contained in:
SoulliesOfficial
2026-03-30 03:23:36 -04:00
parent 7533e7031d
commit 7954ec800c
56 changed files with 23688 additions and 18808 deletions

View File

@@ -97,7 +97,7 @@ namespace Ichni.Editor
Ichni.Editor.Commands.CommandManager.ExecuteCommand(new Ichni.Editor.Commands.ChangeValueCommand(connectedBaseElement, colorParameterName, emissionColor));
colorPreview.color = emissionColor;
//connectedBaseElement.Refresh();
connectedBaseElement.Refresh();
}
public void SliderChange(float value)

View File

@@ -197,10 +197,12 @@ namespace Ichni.Editor
return highest;
}
private static float SmartInferHeight(Type t)
private static float SmartInferHeight(FieldDef fd)
{
if (t == typeof(Color)) return 240f;
// 多数基础组件默认为 100 单位高度
// EmissionColorPicker 有 Toggle/RGB滑块/Intensity输入框高度明显大于 BaseColorPicker
if (fd.Attr is DynamicUIEmissionColorAttribute) return 320f;
if (fd.ValueType == typeof(Color)) return 280f;
// 多数基础组件默认为 100
return 100f;
}
@@ -209,7 +211,7 @@ namespace Ichni.Editor
float highest = 100f;
foreach (var f in fields)
{
float height = f.Attr.Height > 0 ? f.Attr.Height : SmartInferHeight(f.ValueType);
float height = f.Attr.Height > 0 ? f.Attr.Height : SmartInferHeight(f);
if (height > highest) highest = height;
}
return highest;