a98a76f6e5
- Work in progress but enough progress to commit because it basically works, it's just a bit ugly - Node height is now recalculated every time a new element is added to the node - Introduced `Archetype.UseFixedSize` for special nodes like *Color Gradient* or *Curve* that must rely on hardcoded size for now because the auto sizing does not take elements like the gradient editor or curve editor into account (ideally in the future it will) - Fixed input and output box spacing (still some 1px offsets that I'm unsure where they are from, could be placebo though)
76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
// Copyright (c) Wojciech Figat. All rights reserved.
|
|
|
|
using FlaxEngine;
|
|
|
|
namespace FlaxEditor.Surface
|
|
{
|
|
/// <summary>
|
|
/// Set of static properties for the surface.
|
|
/// </summary>
|
|
[HideInEditor]
|
|
public static class Constants
|
|
{
|
|
/// <summary>
|
|
/// The node close button size.
|
|
/// </summary>
|
|
public const float NodeCloseButtonSize = 12.0f;
|
|
|
|
/// <summary>
|
|
/// The node close button margin from the edges.
|
|
/// </summary>
|
|
public const float NodeCloseButtonMargin = 2.0f;
|
|
|
|
/// <summary>
|
|
/// The node header height.
|
|
/// </summary>
|
|
public const float NodeHeaderHeight = 20.0f;
|
|
|
|
public const float NodeHeaderTextScale = 0.65f;
|
|
|
|
/// <summary>
|
|
/// The node footer height.
|
|
/// </summary>
|
|
public const float NodeFooterSize = 2.0f;
|
|
|
|
/// <summary>
|
|
/// The node left margin.
|
|
/// </summary>
|
|
public const float NodeMarginX = 8.0f;
|
|
|
|
/// <summary>
|
|
/// The node right margin.
|
|
/// </summary>
|
|
public const float NodeMarginY = 5.0f;
|
|
|
|
/// <summary>
|
|
/// The box position offset on the x axis.
|
|
/// </summary>
|
|
public const float BoxOffsetX = 0.0f;
|
|
|
|
/// <summary>
|
|
/// The width of the row that is started by a box.
|
|
/// </summary>
|
|
public const float BoxRowHeight = 18.0f;
|
|
|
|
/// <summary>
|
|
/// The box size (with and height).
|
|
/// </summary>
|
|
public const float BoxSize = 13.0f;
|
|
|
|
/// <summary>
|
|
/// The node layout offset on the y axis (height of the boxes rows, etc.). It's used to make the design more consistent.
|
|
/// </summary>
|
|
public const float LayoutOffsetY = 22.0f;
|
|
|
|
/// <summary>
|
|
/// The offset between the box text and the box
|
|
/// </summary>
|
|
public const float BoxTextOffset = 4.0f;
|
|
|
|
/// <summary>
|
|
/// The width of the rectangle used to draw the box text.
|
|
/// </summary>
|
|
public const float BoxTextRectWidth = 1410.0f;
|
|
}
|
|
}
|