Merge branch 'IconOverhaul' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-IconOverhaul

This commit is contained in:
Wojtek Figat
2021-05-14 10:48:18 +02:00
83 changed files with 688 additions and 272 deletions

View File

@@ -61,7 +61,7 @@ namespace FlaxEditor.GUI.Dialogs
public ColorSelector(float wheelSize = 64)
: base(0, 0, wheelSize, wheelSize)
{
_colorWheelSprite = Editor.Instance.Icons.ColorWheel;
_colorWheelSprite = Editor.Instance.Icons.ColorWheel128;
_wheelRect = new Rectangle(0, 0, wheelSize, wheelSize);
}

View File

@@ -184,7 +184,7 @@ namespace FlaxEditor.GUI.Input
var style = Style.Current;
// Draw sliding UI
Render2D.DrawSprite(style.Scale, SlideRect, style.Foreground);
Render2D.DrawSprite(style.Scalar, SlideRect, style.Foreground);
// Check if is sliding
if (_isSliding)

View File

@@ -82,14 +82,15 @@ namespace FlaxEditor.GUI
var icons = Editor.Instance.Icons;
var platforms = new[]
{
new PlatformData(PlatformType.Windows, icons.Windows, "Windows"),
new PlatformData(PlatformType.XboxOne, icons.XboxOne, "Xbox One"),
new PlatformData(PlatformType.UWP, icons.WindowsStore, "Windows Store"),
new PlatformData(PlatformType.Linux, icons.Linux, "Linux"),
new PlatformData(PlatformType.PS4, icons.PS4, "PlayStation 4"),
new PlatformData(PlatformType.XboxScarlett, icons.XboxSeriesX, "Xbox Scarlett"),
new PlatformData(PlatformType.Android, icons.Android, "Android"),
new PlatformData(PlatformType.Switch, icons.ColorWheel, "Switch"),
new PlatformData(PlatformType.Windows, icons.WindowsIcon128, "Windows"),
new PlatformData(PlatformType.XboxOne, icons.XBoxOne128, "Xbox One"),
new PlatformData(PlatformType.UWP, icons.UWPStore128, "Windows Store"),
new PlatformData(PlatformType.Linux, icons.LinuxIcon128, "Linux"),
new PlatformData(PlatformType.PS4, icons.PS4Icon128, "PlayStation 4"),
new PlatformData(PlatformType.XboxScarlett, icons.XBoxScarletIcon128, "Xbox Scarlett"),
new PlatformData(PlatformType.Android, icons.AndroidIcon128, "Android"),
new PlatformData(PlatformType.Switch, icons.ColorWheel128, "Switch"),
};
const float IconSize = 48.0f;

View File

@@ -63,7 +63,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
var isMouseOver = IsMouseOver;
var color = Gradient._data[Index].Value;
var icons = Editor.Instance.Icons;
var icon = icons.VisjectBoxClose;
var icon = icons.VisjectBoxClosed32;
Render2D.DrawSprite(icon, new Rectangle(0.0f, 0.0f, 10.0f, 10.0f), isMouseOver ? Color.Gray : Color.Black);
Render2D.DrawSprite(icon, new Rectangle(1.0f, 1.0f, 8.0f, 8.0f), color);

View File

@@ -26,7 +26,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
public override void Draw()
{
var style = Style.Current;
var icon = Editor.Instance.Icons.VisjectArrowClose;
var icon = Editor.Instance.Icons.VisjectArrowClosed32;
var timeAxisHeaderOffset = -_timeline.MediaBackground.ViewOffset.Y;
Matrix3x3.RotationZ(Mathf.PiOverTwo, out var m1);

View File

@@ -738,7 +738,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackNavigation[0] = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Rewind to timeline start (Home)",
Brush = new SpriteBrush(icons.Step32),
Brush = new SpriteBrush(icons.Skip64),
Enabled = false,
Visible = false,
Rotation = 180.0f,
@@ -750,7 +750,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackNavigation[1] = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Seek back to the previous keyframe (Page Down)",
Brush = new SpriteBrush(icons.Next32),
Brush = new SpriteBrush(icons.Shift64),
Enabled = false,
Visible = false,
Rotation = 180.0f,
@@ -766,7 +766,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackNavigation[2] = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Move one frame back (Left Arrow)",
Brush = new SpriteBrush(icons.ArrowLeft32),
Brush = new SpriteBrush(icons.Left32),
Enabled = false,
Visible = false,
Parent = playbackButtonsPanel
@@ -779,7 +779,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackStop = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Stop playback",
Brush = new SpriteBrush(icons.Stop32),
Brush = new SpriteBrush(icons.Stop64),
Visible = false,
Enabled = false,
Parent = playbackButtonsPanel
@@ -792,7 +792,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackPlay = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Play/pause playback (Space)",
Brush = new SpriteBrush(icons.Play32),
Brush = new SpriteBrush(icons.Play64),
Visible = false,
Tag = false, // Set to true if image is set to Pause, false if Play
Parent = playbackButtonsPanel
@@ -805,7 +805,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackNavigation[3] = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Move one frame forward (Right Arrow)",
Brush = new SpriteBrush(icons.ArrowRight32),
Brush = new SpriteBrush(icons.Right32),
Enabled = false,
Visible = false,
Parent = playbackButtonsPanel
@@ -816,7 +816,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackNavigation[4] = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Seek to the next keyframe (Page Up)",
Brush = new SpriteBrush(icons.Next32),
Brush = new SpriteBrush(icons.Shift64),
Enabled = false,
Visible = false,
Parent = playbackButtonsPanel
@@ -831,7 +831,7 @@ namespace FlaxEditor.GUI.Timeline
_playbackNavigation[5] = new Image(playbackButtonsPanel.Width, 0, playbackButtonsSize, playbackButtonsSize)
{
TooltipText = "Rewind to timeline end (End)",
Brush = new SpriteBrush(icons.Step32),
Brush = new SpriteBrush(icons.Skip64),
Enabled = false,
Visible = false,
Parent = playbackButtonsPanel
@@ -1189,7 +1189,7 @@ namespace FlaxEditor.GUI.Timeline
{
_playbackPlay.Visible = true;
_playbackPlay.Enabled = _canPlayPauseStop;
_playbackPlay.Brush = new SpriteBrush(icons.Play32);
_playbackPlay.Brush = new SpriteBrush(icons.Play64);
_playbackPlay.Tag = false;
}
if (_positionHandle != null)
@@ -1215,7 +1215,7 @@ namespace FlaxEditor.GUI.Timeline
{
_playbackPlay.Visible = true;
_playbackPlay.Enabled = _canPlayPauseStop;
_playbackPlay.Brush = new SpriteBrush(icons.Pause32);
_playbackPlay.Brush = new SpriteBrush(icons.Pause64);
_playbackPlay.Tag = true;
}
if (_positionHandle != null)
@@ -1241,7 +1241,7 @@ namespace FlaxEditor.GUI.Timeline
{
_playbackPlay.Visible = true;
_playbackPlay.Enabled = _canPlayPauseStop;
_playbackPlay.Brush = new SpriteBrush(icons.Play32);
_playbackPlay.Brush = new SpriteBrush(icons.Play64);
_playbackPlay.Tag = false;
}
if (_positionHandle != null)

View File

@@ -322,7 +322,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Margin = new Margin(1),
Brush = new SpriteBrush(icons.ArrowRight32),
Brush = new SpriteBrush(icons.Right32),
Offsets = new Margin(-buttonSize - 2 + _muteCheckbox.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};
@@ -335,7 +335,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Margin = new Margin(3),
Brush = new SpriteBrush(icons.Add48),
Brush = new SpriteBrush(icons.Add32),
Offsets = new Margin(-buttonSize - 2 + rightKey.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};
@@ -348,7 +348,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Margin = new Margin(1),
Brush = new SpriteBrush(icons.ArrowLeft32),
Brush = new SpriteBrush(icons.Left32),
Offsets = new Margin(-buttonSize - 2 + addKey.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};

View File

@@ -695,7 +695,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Margin = new Margin(1),
Brush = new SpriteBrush(icons.Camera32),
Brush = new SpriteBrush(icons.Camera64),
Offsets = new Margin(-buttonSize - 2 + _selectActor.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};

View File

@@ -128,7 +128,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Margin = new Margin(1),
Brush = new SpriteBrush(icons.ArrowRight32),
Brush = new SpriteBrush(icons.Right64),
Offsets = new Margin(-buttonSize - 2 + uiLeft, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};
@@ -138,9 +138,9 @@ namespace FlaxEditor.GUI.Timeline.Tracks
AutoFocus = true,
AnchorPreset = AnchorPresets.MiddleRight,
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Color = Style.Current.Foreground,
Margin = new Margin(3),
Brush = new SpriteBrush(icons.Add48),
Brush = new SpriteBrush(icons.Add64),
Offsets = new Margin(-buttonSize - 2 + _rightKey.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};
@@ -150,9 +150,9 @@ namespace FlaxEditor.GUI.Timeline.Tracks
AutoFocus = true,
AnchorPreset = AnchorPresets.MiddleRight,
IsScrollable = false,
Color = Style.Current.ForegroundGrey,
Color = Style.Current.Foreground,
Margin = new Margin(1),
Brush = new SpriteBrush(icons.ArrowLeft32),
Brush = new SpriteBrush(icons.Left64),
Offsets = new Margin(-buttonSize - 2 + _addKey.Offsets.Left, buttonSize, buttonSize * -0.5f, buttonSize),
Parent = this,
};