Merge remote-tracking branch 'origin/master' into linux-editor

# Conflicts:
#	Source/Engine/Core/Math/Color.cs
#	Source/Engine/Navigation/Navigation.cpp
#	Source/Engine/Platform/Win32/Win32Platform.cpp
This commit is contained in:
Wojtek Figat
2021-02-23 22:29:07 +01:00
147 changed files with 1740 additions and 1311 deletions

View File

@@ -40,9 +40,7 @@ namespace FlaxEngine.GUI
get => _cellsV;
set
{
if (value == null)
throw new ArgumentNullException();
_cellsV = value;
_cellsV = value ?? throw new ArgumentNullException();
PerformLayout();
}
}
@@ -56,9 +54,7 @@ namespace FlaxEngine.GUI
get => _cellsH;
set
{
if (value == null)
throw new ArgumentNullException();
_cellsH = value;
_cellsH = value ?? throw new ArgumentNullException();
PerformLayout();
}
}

View File

@@ -64,8 +64,10 @@ namespace FlaxEngine.GUI
VScrollBar = GetChild<VScrollBar>();
if (VScrollBar == null)
{
VScrollBar = new VScrollBar(this, Width - ScrollBar.DefaultSize, Height);
VScrollBar.AnchorPreset = AnchorPresets.TopLeft;
VScrollBar = new VScrollBar(this, Width - ScrollBar.DefaultSize, Height)
{
AnchorPreset = AnchorPresets.TopLeft
};
//VScrollBar.X += VScrollBar.Width;
VScrollBar.ValueChanged += () => SetViewOffset(Orientation.Vertical, VScrollBar.Value);
}
@@ -82,8 +84,10 @@ namespace FlaxEngine.GUI
HScrollBar = GetChild<HScrollBar>();
if (HScrollBar == null)
{
HScrollBar = new HScrollBar(this, Height - ScrollBar.DefaultSize, Width);
HScrollBar.AnchorPreset = AnchorPresets.TopLeft;
HScrollBar = new HScrollBar(this, Height - ScrollBar.DefaultSize, Width)
{
AnchorPreset = AnchorPresets.TopLeft
};
//HScrollBar.Y += HScrollBar.Height;
//HScrollBar.Offsets += new Margin(0, 0, HScrollBar.Height * 0.5f, 0);
HScrollBar.ValueChanged += () => SetViewOffset(Orientation.Horizontal, HScrollBar.Value);