@@ -569,6 +569,9 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
// Grid
|
||||
_node.DrawEditorGrid(ref rect);
|
||||
|
||||
var features = Render2D.Features;
|
||||
Render2D.Features = features & ~Render2D.RenderingFeatures.VertexSnapping;
|
||||
|
||||
base.Draw();
|
||||
|
||||
// Draw debug position
|
||||
@@ -584,6 +587,8 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
Render2D.DrawSprite(icon, debugRect, style.ProgressNormal);
|
||||
}
|
||||
|
||||
Render2D.Features = features;
|
||||
|
||||
// Frame
|
||||
var frameColor = containsFocus ? style.BackgroundSelected : (IsMouseOver ? style.ForegroundGrey : style.ForegroundDisabled);
|
||||
Render2D.DrawRectangle(new Rectangle(1, 1, rect.Width - 2, rect.Height - 2), frameColor);
|
||||
|
||||
@@ -190,7 +190,6 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
public override void Draw()
|
||||
{
|
||||
var style = Style.Current;
|
||||
|
||||
var backgroundRect = new Rectangle(Float2.Zero, Size);
|
||||
|
||||
// Shadow
|
||||
@@ -201,7 +200,7 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
}
|
||||
|
||||
// Background
|
||||
Render2D.FillRectangle(backgroundRect, ArchetypeColor);
|
||||
Render2D.FillRectangle(backgroundRect, BackgroundColor);
|
||||
|
||||
// Breakpoint hit
|
||||
if (Breakpoint.Hit)
|
||||
@@ -819,10 +818,10 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
{
|
||||
base.OnSurfaceLoaded(action);
|
||||
|
||||
var node = Node;
|
||||
if (action == SurfaceNodeActions.Undo)
|
||||
{
|
||||
// Update parent node layout when restoring decorator from undo
|
||||
var node = Node;
|
||||
if (node != null)
|
||||
{
|
||||
node._decorators = null;
|
||||
@@ -832,7 +831,7 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
else
|
||||
{
|
||||
// Correctly size decorators when surface is loaded
|
||||
Node.ResizeAuto();
|
||||
node?.ResizeAuto();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -932,7 +932,7 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
new NodeArchetype
|
||||
{
|
||||
TypeID = 36,
|
||||
Title = "HSVToRGB",
|
||||
Title = "HSV To RGB",
|
||||
Description = "Converts a HSV value to linear RGB [X = 0/360, Y = 0/1, Z = 0/1]",
|
||||
Flags = NodeFlags.MaterialGraph,
|
||||
Size = new Float2(160, 25),
|
||||
@@ -949,7 +949,7 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
new NodeArchetype
|
||||
{
|
||||
TypeID = 37,
|
||||
Title = "RGBToHSV",
|
||||
Title = "RGB To HSV",
|
||||
Description = "Converts a linear RGB value to HSV [X = 0/360, Y = 0/1, Z = 0/1]",
|
||||
Flags = NodeFlags.MaterialGraph,
|
||||
Size = new Float2(160, 25),
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace FlaxEditor.Surface
|
||||
public const float NodeMarginY = 8.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The width of the row that is started by a box.
|
||||
/// The size of the row that is started by a box.
|
||||
/// </summary>
|
||||
public const float BoxRowHeight = 19.0f;
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ namespace FlaxEditor.Surface
|
||||
{
|
||||
GroupID = Custom.GroupID,
|
||||
Name = "Custom",
|
||||
Color = Color.Wheat
|
||||
Color = Color.Wheat.RGBMultiplied(0.4f),
|
||||
};
|
||||
}
|
||||
else
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace FlaxEngine
|
||||
/// <returns>Offseted rectangle.</returns>
|
||||
public Rectangle MakeOffsetted(float offset)
|
||||
{
|
||||
return new Rectangle(Location + new Float2(offset, offset), Size);
|
||||
return new Rectangle(Location + offset, Size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user