Skip to content

Commit

Permalink
Updated dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilchRatchet committed Sep 4, 2024
1 parent ac0193b commit 92ab5f0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
6 changes: 3 additions & 3 deletions LibReplanetizer/LibReplanetizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ImGui.NET" Version="1.90.6.1" />
<PackageReference Include="NLog" Version="5.3.2" />
<PackageReference Include="ImGui.NET" Version="1.91.0.1" />
<PackageReference Include="NLog" Version="5.3.3" />
<PackageReference Include="OpenTK.Mathematics" Version="4.8.2" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
11 changes: 5 additions & 6 deletions Replanetizer/Frames/LevelFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,10 @@ private void UpdateWindowSize()
{
int prevWidth = width, prevHeight = height;

System.Numerics.Vector2 vMin = ImGui.GetWindowContentRegionMin();
System.Numerics.Vector2 vMax = ImGui.GetWindowContentRegionMax();
System.Numerics.Vector2 avail = ImGui.GetContentRegionAvail();

width = (int) (vMax.X - vMin.X);
height = (int) (vMax.Y - vMin.Y);
width = (int) avail.X;
height = (int) avail.Y;

if (width <= 0 || height <= 0) return;

Expand All @@ -456,8 +455,8 @@ private void UpdateWindowSize()
OnResize();
}

System.Numerics.Vector2 windowPos = ImGui.GetWindowPos();
Vector2 windowZero = new Vector2(windowPos.X + vMin.X, windowPos.Y + vMin.Y);
System.Numerics.Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
Vector2 windowZero = new Vector2(cursorScreenPos.X, cursorScreenPos.Y);
mousePos = wnd.MousePosition - windowZero;
contentRegion = new Rectangle((int) windowZero.X, (int) windowZero.Y, width, height);
}
Expand Down
14 changes: 5 additions & 9 deletions Replanetizer/Frames/ModelFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,10 @@ private void UpdateWindowSize()
{
int prevWidth = width, prevHeight = height;

System.Numerics.Vector2 vMin = ImGui.GetWindowContentRegionMin();
System.Numerics.Vector2 vMax = ImGui.GetWindowContentRegionMax();
System.Numerics.Vector2 avail = ImGui.GetContentRegionAvail();

vMin.X += 250;
vMax.X -= PROPERTIES_WIDTH - 20;

width = (int) (vMax.X - vMin.X);
height = (int) (vMax.Y - vMin.Y);
width = (int) avail.X - PROPERTIES_WIDTH - 230;
height = (int) avail.Y;

if (width <= 0 || height <= 0)
{
Expand All @@ -500,8 +496,8 @@ private void UpdateWindowSize()
OnResize();
}

System.Numerics.Vector2 windowPos = ImGui.GetWindowPos();
Vector2 windowZero = new Vector2(windowPos.X + vMin.X, windowPos.Y + vMin.Y);
System.Numerics.Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
Vector2 windowZero = new Vector2(cursorScreenPos.X, cursorScreenPos.Y);
mousePos = wnd.MousePosition - windowZero;
contentRegion = new Rectangle((int) windowZero.X, (int) windowZero.Y, width, height);
}
Expand Down
2 changes: 1 addition & 1 deletion Replanetizer/Frames/TextureFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public TextureFrame(Window wnd, LevelFrame levelFrame) : base(wnd, levelFrame)

public static void RenderTextureList(List<Texture> textures, float itemSizeX, Dictionary<Texture, GLTexture> textureIds, string prefix = "", int additionalOffset = 0)
{
var width = ImGui.GetWindowContentRegionMax().X - ImGui.GetWindowContentRegionMin().X - additionalOffset;
var width = ImGui.GetContentRegionAvail().X - additionalOffset;
var itemsPerRow = (int) Math.Floor(width / itemSizeX);

if (itemsPerRow == 0) return;
Expand Down
6 changes: 3 additions & 3 deletions Replanetizer/Replanetizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ImGui.NET" Version="1.90.6.1" />
<PackageReference Include="ImGui.NET" Version="1.91.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.3.2" />
<PackageReference Include="NLog" Version="5.3.3" />
<PackageReference Include="OpenTK" Version="4.8.2" />
<PackageReference Include="OpenTK.Mathematics" Version="4.8.2" />
<PackageReference Include="OpenTK.Windowing.GraphicsLibraryFramework" Version="4.8.2" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 92ab5f0

Please sign in to comment.