尝试优化Inspector的排版
在输数字的地方输入框的输入限制可以改成十进制数,这样就不会因为输了字母然后报错了
This commit is contained in:
@@ -87,6 +87,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
inspector.GenerateCompositeParameterWindow(this, "Position Z", nameof(positionZ)).SetAsFlexibleFloat();
|
||||
});
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace Ichni.RhythmGame
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
var container = inspector.GenerateContainer("Transform");
|
||||
|
||||
var originalPosInputField =
|
||||
inspector.GenerateVec3InputField(this, container, "Start Position", nameof(originalPosition));
|
||||
var originalRotInputField =
|
||||
@@ -103,6 +104,9 @@ namespace Ichni.RhythmGame
|
||||
originalPosInputField.AddListenerFunction(Refresh);
|
||||
originalRotInputField.AddListenerFunction(Refresh);
|
||||
originalScaleInputField.AddListenerFunction(Refresh);
|
||||
|
||||
//这玩意得放在最下面
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace Ichni.RhythmGame
|
||||
var timeEffectsCollectionButton = inspector.GenerateButton(this, container, "Time Effects Collection",
|
||||
() => TimeEffectsCollection.GenerateElement("New Time Effects Collection", Guid.NewGuid(),
|
||||
new List<string>(), true, this, 0f));
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ namespace Ichni.RhythmGame
|
||||
Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
|
||||
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
|
||||
});
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user