Skip to content

Commit

Permalink
Fixed parenting null and loading overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeppelinGames committed Dec 10, 2024
1 parent 54e4872 commit c8805c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions Prowl.Editor/Editor/ProjectsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,28 @@ void OpenSelectedProject()
// Display load info (and possibly load bar). Placed in empty space of footer

// Opening project info

// Projects list clips overlay. Ignore clipping
gui.Draw2D.PushClip(gui.ScreenRect, true);

// Text pos + offset/padding
Vector2 openInfoTextPos = footer.Position + new Vector2(8f, 8f);
gui.Draw2D.DrawText($"Opening '{SelectedProject.Name}'...", openInfoTextPos);

// Add more information about progress here (even console output)

// Cover controls (fill EditorWindow)
gui.Draw2D.DrawRectFilled(this.Rect, GrayAlpha);
gui.Draw2D.DrawRectFilled(gui.ScreenRect, GrayAlpha);

gui.Draw2D.PopClip();

// Redirect output of logs to window
Debug.OnLog += OpeningProjectLog;
//Debug.OnLog += OpeningProjectLog;

// Should probably occur on a new thread to stop blocking UI
// Should probably occur on a new thread/async to stop blocking UI
bool projectOpened = Project.Open(SelectedProject);

Debug.OnLog -= OpeningProjectLog;
// Debug.OnLog -= OpeningProjectLog;
if (projectOpened)
isOpened = false;
}
Expand Down Expand Up @@ -518,7 +523,7 @@ private void DrawProjectContextMenu(Project project)
closePopup = true;
}


}
}
if (closePopup)
Expand Down
3 changes: 2 additions & 1 deletion Prowl.Runtime/GUI/Layout/LayoutNode.API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ public void SetNewParent(LayoutNode newParent)
if (Parent != null)
Parent.Children.Remove(this);
Parent = newParent;
Parent.Children.Add(this);
if (Parent != null)
Parent.Children.Add(this);
//Parent.GetNextNode();
_positionRelativeTo = newParent;
_sizeRelativeTo = newParent;
Expand Down

0 comments on commit c8805c5

Please sign in to comment.