Merge branch 'Zode-visject-larger-inputs'
This commit is contained in:
@@ -363,10 +363,10 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
Assert.AreEqual(r1, r2);
|
Assert.AreEqual(r1, r2);
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
ConnectionTick();
|
|
||||||
box.ConnectionTick();
|
|
||||||
OnConnectionsChanged();
|
OnConnectionsChanged();
|
||||||
box.OnConnectionsChanged();
|
box.OnConnectionsChanged();
|
||||||
|
ConnectionTick();
|
||||||
|
box.ConnectionTick();
|
||||||
Surface?.OnNodesDisconnected(this, box);
|
Surface?.OnNodesDisconnected(this, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,10 +390,10 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
Assert.IsTrue(AreConnected(box));
|
Assert.IsTrue(AreConnected(box));
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
ConnectionTick();
|
|
||||||
box.ConnectionTick();
|
|
||||||
OnConnectionsChanged();
|
OnConnectionsChanged();
|
||||||
box.OnConnectionsChanged();
|
box.OnConnectionsChanged();
|
||||||
|
ConnectionTick();
|
||||||
|
box.ConnectionTick();
|
||||||
Surface?.OnNodesConnected(this, box);
|
Surface?.OnNodesConnected(this, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = IntegerValue.Get(box.ParentNode, box.Archetype, box.Value);
|
var value = IntegerValue.Get(box.ParentNode, box.Archetype, box.Value);
|
||||||
var width = 40;
|
var width = 50;
|
||||||
var control = new IntValueBox(value, bounds.X, bounds.Y, width + 12, int.MinValue, int.MaxValue, 0.01f)
|
var control = new IntValueBox(value, bounds.X, bounds.Y, width + 12, int.MinValue, int.MaxValue, 0.01f)
|
||||||
{
|
{
|
||||||
Height = bounds.Height,
|
Height = bounds.Height,
|
||||||
@@ -166,7 +166,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = UnsignedIntegerValue.Get(box.ParentNode, box.Archetype, box.Value);
|
var value = UnsignedIntegerValue.Get(box.ParentNode, box.Archetype, box.Value);
|
||||||
var width = 40;
|
var width = 50;
|
||||||
var control = new UIntValueBox(value, bounds.X, bounds.Y, width + 12, uint.MinValue, uint.MaxValue, 0.01f)
|
var control = new UIntValueBox(value, bounds.X, bounds.Y, width + 12, uint.MinValue, uint.MaxValue, 0.01f)
|
||||||
{
|
{
|
||||||
Height = bounds.Height,
|
Height = bounds.Height,
|
||||||
@@ -212,7 +212,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = FloatValue.Get(box.ParentNode, box.Archetype, box.Value);
|
var value = FloatValue.Get(box.ParentNode, box.Archetype, box.Value);
|
||||||
var width = 40;
|
var width = 50;
|
||||||
var control = new FloatValueBox(value, bounds.X, bounds.Y, width + 12, float.MinValue, float.MaxValue, 0.01f)
|
var control = new FloatValueBox(value, bounds.X, bounds.Y, width + 12, float.MinValue, float.MaxValue, 0.01f)
|
||||||
{
|
{
|
||||||
Height = bounds.Height,
|
Height = bounds.Height,
|
||||||
@@ -303,7 +303,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 30;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 2 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 2 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -377,7 +377,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 30;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -460,7 +460,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 20;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 4 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 4 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -553,7 +553,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 30;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 2 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 2 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -627,7 +627,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 30;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -710,7 +710,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 20;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 4 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 4 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -803,7 +803,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 30;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 2 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 2 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -877,7 +877,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 30;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -960,7 +960,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box);
|
var value = GetValue(box);
|
||||||
var width = 20;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 4 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 4 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
@@ -1053,7 +1053,7 @@ namespace FlaxEditor.Surface.Elements
|
|||||||
public Control Create(InputBox box, ref Rectangle bounds)
|
public Control Create(InputBox box, ref Rectangle bounds)
|
||||||
{
|
{
|
||||||
var value = GetValue(box).EulerAngles;
|
var value = GetValue(box).EulerAngles;
|
||||||
var width = 20;
|
var width = 50;
|
||||||
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
var control = new ContainerControl(bounds.X, bounds.Y, (width + 2) * 3 - 2, bounds.Height)
|
||||||
{
|
{
|
||||||
ClipChildren = false,
|
ClipChildren = false,
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ namespace FlaxEditor.Surface
|
|||||||
if (child is InputBox inputBox)
|
if (child is InputBox inputBox)
|
||||||
{
|
{
|
||||||
var boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 25;
|
var boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 25;
|
||||||
if (inputBox.DefaultValueEditor != null)
|
if (inputBox.DefaultValueEditor != null && inputBox.DefaultValueEditor.Visible)
|
||||||
boxWidth += inputBox.DefaultValueEditor.Width + 4;
|
boxWidth += inputBox.DefaultValueEditor.Width + 4;
|
||||||
leftWidth = Mathf.Max(leftWidth, boxWidth);
|
leftWidth = Mathf.Max(leftWidth, boxWidth);
|
||||||
leftHeight = Mathf.Max(leftHeight, inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderHeight + Constants.BoxRowHeight);
|
leftHeight = Mathf.Max(leftHeight, inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderHeight + Constants.BoxRowHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user