Merge branch 'master' into 1.5

# Conflicts:
#	Source/Engine/Renderer/AmbientOcclusionPass.cpp
This commit is contained in:
Wojtek Figat
2023-01-15 18:27:49 +01:00
10 changed files with 761 additions and 29 deletions

View File

@@ -101,18 +101,6 @@ namespace FlaxEditor.GUI
_timeRemaining = Mathf.CeilToInt(time);
if (_timeLabel != null)
_timeLabel.Text = "Auto Save in: " + _timeRemaining;
// Move on text update if the progress bar is visible - removes this call from update
if (Editor.Instance.UI.ProgressVisible && !_isMoved)
{
_isMoved = true;
LocalX -= 250;
}
else if (!Editor.Instance.UI.ProgressVisible && _isMoved)
{
LocalX += 250;
_isMoved = false;
}
}
/// <inheritdoc />
@@ -123,6 +111,18 @@ namespace FlaxEditor.GUI
_saveNowButton.TextColor = _saveNowButton.IsMouseOver ? Style.Current.BackgroundHighlighted : _defaultTextColor;
_cancelSaveButton.TextColor = _cancelSaveButton.IsMouseOver ? Style.Current.BackgroundHighlighted : _defaultTextColor;
}
// Move if the progress bar is visible
if (Editor.Instance.UI.ProgressVisible && !_isMoved)
{
_isMoved = true;
LocalX -= 280;
}
else if (!Editor.Instance.UI.ProgressVisible && _isMoved)
{
LocalX += 280;
_isMoved = false;
}
base.Update(deltaTime);
}

View File

@@ -30,6 +30,11 @@ namespace FlaxEditor.GUI
/// </summary>
public string Text { get; set; }
/// <summary>
/// Gets or sets the status text color
/// </summary>
public Color TextColor { get; set; } = Style.Current.Foreground;
/// <summary>
/// Initializes a new instance of the <see cref="StatusBar"/> class.
/// </summary>
@@ -51,7 +56,7 @@ namespace FlaxEditor.GUI
Render2D.DrawSprite(style.StatusBarSizeGrip, new Rectangle(Width - 12, 10, 12, 12), style.Foreground);
// Draw status text
Render2D.DrawText(style.FontSmall, Text, new Rectangle(4, 0, Width - 20, Height), style.Foreground, TextAlignment.Near, TextAlignment.Center);
Render2D.DrawText(style.FontSmall, Text, new Rectangle(4, 0, Width - 20, Height), TextColor, TextAlignment.Near, TextAlignment.Center);
}
}
}