Merge remote-tracking branch 'origin/master' into 1.8
# Conflicts: # Flax.flaxproj
This commit is contained in:
@@ -617,8 +617,9 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
public override void SetLocation(int index, Float2 location)
|
||||
{
|
||||
var dataA = (Float4)_node.Values[4 + index * 2];
|
||||
var ranges = (Float4)_node.Values[0];
|
||||
|
||||
dataA.X = location.X;
|
||||
dataA.X = Mathf.Clamp(location.X, ranges.X, ranges.Y);
|
||||
|
||||
_node.Values[4 + index * 2] = dataA;
|
||||
_node.Surface.MarkAsEdited();
|
||||
@@ -750,9 +751,10 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
public override void SetLocation(int index, Float2 location)
|
||||
{
|
||||
var dataA = (Float4)_node.Values[4 + index * 2];
|
||||
var ranges = (Float4)_node.Values[0];
|
||||
|
||||
dataA.X = location.X;
|
||||
dataA.Y = location.Y;
|
||||
dataA.X = Mathf.Clamp(location.X, ranges.X, ranges.Y);
|
||||
dataA.Y = Mathf.Clamp(location.Y, ranges.Z, ranges.W);
|
||||
|
||||
_node.Values[4 + index * 2] = dataA;
|
||||
_node.Surface.MarkAsEdited();
|
||||
|
||||
@@ -64,7 +64,11 @@ namespace FlaxEditor.Surface
|
||||
/// </summary>
|
||||
protected virtual void DrawBackground()
|
||||
{
|
||||
var background = Style.Background;
|
||||
DrawBackgroundDefault(Style.Background, Width, Height);
|
||||
}
|
||||
|
||||
internal static void DrawBackgroundDefault(Texture background, float width, float height)
|
||||
{
|
||||
if (background && background.ResidentMipLevels > 0)
|
||||
{
|
||||
var bSize = background.Size;
|
||||
@@ -77,8 +81,8 @@ namespace FlaxEditor.Surface
|
||||
if (pos.Y > 0)
|
||||
pos.Y -= bh;
|
||||
|
||||
int maxI = Mathf.CeilToInt(Width / bw + 1.0f);
|
||||
int maxJ = Mathf.CeilToInt(Height / bh + 1.0f);
|
||||
int maxI = Mathf.CeilToInt(width / bw + 1.0f);
|
||||
int maxJ = Mathf.CeilToInt(height / bh + 1.0f);
|
||||
|
||||
for (int i = 0; i < maxI; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user