Skip to content

Commit

Permalink
fix: projects window warning symbol alignment and last access time
Browse files Browse the repository at this point in the history
  • Loading branch information
sinnwrig committed Oct 3, 2024
1 parent 6b4ec22 commit 675baa6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Prowl.Editor/Editor/ProjectsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,13 @@ private void DisplayProject(Project project)

if (!project.IsValid())
{
using (gui.Node("WarningLabel").Width(35).ExpandHeight().Enter())
using (gui.Node("WarningLabel").Width(40).ExpandHeight().Enter())
{
Interactable warnInteract = gui.GetInteractable();

gui.Draw2D.DrawText(Font.DefaultFont, FontAwesome6.TriangleExclamation, 35, gui.CurrentNode.LayoutData.Rect, Color.yellow);
Rect wrect = gui.CurrentNode.LayoutData.Rect;
wrect.y += 1;
gui.Draw2D.DrawText(Font.DefaultFont, FontAwesome6.TriangleExclamation, 35, wrect, Color.yellow);

Vector2 warningPos = gui.CurrentNode.LayoutData.Rect.Position;
warningPos.y += gui.CurrentNode.LayoutData.Rect.height / 2;
Expand All @@ -399,7 +401,8 @@ private void DisplayProject(Project project)

gui.Draw2D.DrawText(Font.DefaultFont, path, 20, rect.Position + new Vector2(8, 22), Color.white * 0.5f);

gui.Draw2D.DrawText(Font.DefaultFont, GetFormattedLastModifiedTime(project.ProjectDirectory.LastAccessTime), 20, rect.Position + new Vector2(rect.width - 125, 14), Color.white * 0.5f);
if (project.IsValid())
gui.Draw2D.DrawText(Font.DefaultFont, GetFormattedLastModifiedTime(project.ProjectDirectory.LastAccessTime), 20, rect.Position + new Vector2(rect.width - 125, 14), Color.white * 0.5f);
}

using (gui.Node("RemoveProject").Scale(20).Top(10).Enter())
Expand Down

0 comments on commit 675baa6

Please sign in to comment.