Skip to content

Commit

Permalink
Debug Test Log
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsakharov committed Mar 31, 2024
1 parent 55cb64d commit 1bfb1b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Prowl.Editor/Editor/AssetBrowserWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,30 @@ private void RenderHeader()
if (!Project.HasProject)
return;

Console.WriteLine(153);
ImGui.SetCursorPosY(cPY);
Console.WriteLine(155);
ImGui.SetCursorPosX(cPX + searchBarSize + padding);
string assetPath = Path.GetRelativePath(Project.ProjectDirectory, CurDirectory.FullName);
ImGui.Text(assetPath);

Console.WriteLine(160);
ImGui.SetCursorPosY(cPY);
Console.WriteLine(161);
ImGui.SetCursorPosX(windowWidth - rightOffset - sizeSliderSize - padding - 30);
if (ImGui.Button(Locked ? FontAwesome6.Lock : FontAwesome6.LockOpen))
Locked = !Locked;

Console.WriteLine(167);
ImGui.SetCursorPosY(cPY);
Console.WriteLine(169);
ImGui.SetCursorPosX(windowWidth - rightOffset - sizeSliderSize - padding);
ImGui.SetNextItemWidth(sizeSliderSize);
ImGui.SliderFloat("##ThumbnailSizeSlider", ref AssetPipelinePreferences.Instance.ThumbnailSize, -0.2f, 1.0f);

Console.WriteLine(174);
ImGui.SetCursorPosY(cPY);
Console.WriteLine(176);
ImGui.SetCursorPosX(windowWidth - rightOffset);
if (ImGui.Button(" " + FontAwesome6.Gears + " "))
_ = new ProjectSettingsWindow(typeof(AssetPipelinePreferences));
Expand Down Expand Up @@ -214,6 +222,7 @@ private void RenderBody()
private void RenderEntry(int rowCount, float itemSize, ref System.Numerics.Vector2 curPos, ref int i, FileSystemInfo entry)
{
ImGui.PushID(i);
Console.WriteLine(225);
ImGui.SetCursorPos(curPos);
ImGui.BeginChild("ClipBox", new System.Numerics.Vector2(ThumbnailSize, ThumbnailSize), ImGuiChildFlags.None, ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse);
RenderFileSystemEntry(entry);
Expand Down Expand Up @@ -373,6 +382,7 @@ private void DrawThumbnailForEntry(Texture2D thumbnail, float thumbnailSize)
thumbnailSize -= 30;
float thumbnailWidth = ((float)thumbnail.Width / thumbnail.Height) * thumbnailSize;
float xOffset = ((thumbnailSize - thumbnailWidth) / 2) + 15;
Console.WriteLine(385);
ImGui.SetCursorPos(new System.Numerics.Vector2(xOffset, 10));
ImGui.Image((IntPtr)thumbnail.Handle, new System.Numerics.Vector2(thumbnailWidth, thumbnailSize), System.Numerics.Vector2.UnitY, System.Numerics.Vector2.UnitX);
}
Expand Down

0 comments on commit 1bfb1b0

Please sign in to comment.