1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-29 23:58:34 +01:00

Compare commits

..

6 commits

63 changed files with 118 additions and 72 deletions

View file

@ -33,8 +33,12 @@ Removals
- Marked GetDownTime, GetUpTime and GetTimeSincePress in Keybind and Combination as obsolete - Marked GetDownTime, GetUpTime and GetTimeSincePress in Keybind and Combination as obsolete
### MLEM.Ui ### MLEM.Ui
Additions
- Added AutoInlineCenter and AutoInlineBottom anchors
Fixes Fixes
- Fixed images not updating their hidden state properly when the displayed texture changes - Fixed images not updating their hidden state properly when the displayed texture changes
- Fixed AutoInline elements overflowing into their parent if it's taller
Improvements Improvements
- Increased Element area calculation recursion limit to 64 - Increased Element area calculation recursion limit to 64

View file

@ -48,10 +48,10 @@ public class Activity1 : AndroidGameActivity {
base.OnWindowFocusChanged(hasFocus); base.OnWindowFocusChanged(hasFocus);
// hide the status bar // hide the status bar
if (hasFocus) { if (hasFocus) {
#pragma warning disable CS0618 #pragma warning disable CA1422
// TODO this is deprecated, find out how to replace it // TODO this is deprecated, find out how to replace it
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (SystemUiFlags.ImmersiveSticky | SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen); this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (SystemUiFlags.ImmersiveSticky | SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen);
#pragma warning restore CS0618 #pragma warning restore CA1422
} }
} }

View file

@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework> <TargetFramework>net7.0-android</TargetFramework>
<SupportedOSPlatformVersion>31</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>31</SupportedOSPlatformVersion>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<ApplicationId>de.ellpeck.mlem.demos.android</ApplicationId> <ApplicationId>de.ellpeck.mlem.demos.android</ApplicationId>
<ApplicationVersion>100</ApplicationVersion> <ApplicationVersion>100</ApplicationVersion>
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion> <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
<RunAOTCompilation>false</RunAOTCompilation>
<PublishTrimmed>false</PublishTrimmed> <PublishTrimmed>false</PublishTrimmed>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ApplicationIcon>Icon.ico</ApplicationIcon> <ApplicationIcon>Icon.ico</ApplicationIcon>
<AssemblyName>MLEM Desktop Demos</AssemblyName> <AssemblyName>MLEM Desktop Demos</AssemblyName>
<RootNamespace>Demos.DesktopGL</RootNamespace> <RootNamespace>Demos.DesktopGL</RootNamespace>
@ -29,7 +29,7 @@
<Content Include="..\Demos\Content\*\**" /> <Content Include="..\Demos\Content\*\**" />
<EmbeddedResource Include="Icon.ico" /> <EmbeddedResource Include="Icon.ico" />
<EmbeddedResource Include="Icon.bmp" /> <EmbeddedResource Include="Icon.bmp" />
<Content Include="FnaNative/**"> <Content Include="../FnaNative/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>%(Filename)%(Extension)</Link> <Link>%(Filename)%(Extension)</Link>
</Content> </Content>

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ApplicationIcon>Icon.ico</ApplicationIcon> <ApplicationIcon>Icon.ico</ApplicationIcon>
<AssemblyName>MLEM Desktop Demos</AssemblyName> <AssemblyName>MLEM Desktop Demos</AssemblyName>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>

Binary file not shown.

Binary file not shown.

Binary file not shown.

2
FNA

@ -1 +1 @@
Subproject commit 9029e149358197612509e2ee4893870a3b5d590e Subproject commit 697cc63662914c0dc26c500bc9b8498b5ca8a68f

BIN
FnaNative/FAudio.dll Normal file

Binary file not shown.

BIN
FnaNative/FNA3D.dll Normal file

Binary file not shown.

BIN
FnaNative/SDL2.dll Normal file

Binary file not shown.

BIN
FnaNative/libFAudio.so.0 Normal file

Binary file not shown.

BIN
FnaNative/libFNA3D.0.dylib Normal file

Binary file not shown.

BIN
FnaNative/libFNA3D.so.0 Normal file

Binary file not shown.

Binary file not shown.

BIN
FnaNative/libSDL2-2.0.so.0 Normal file

Binary file not shown.

BIN
FnaNative/libvulkan.1.dylib Normal file

Binary file not shown.

@ -1 +1 @@
Subproject commit c50bf544bcfb217b518727a0a38eb71fc5725092 Subproject commit f11f97b709e50960dd8ce1f727974744c4f8a0dd

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>
@ -26,7 +26,7 @@
<PackageReference Include="Lidgren.Network" Version="1.0.2"> <PackageReference Include="Lidgren.Network" Version="1.0.2">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2"> <PackageReference Include="Newtonsoft.Json" Version="13.0.3">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2"> <PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2">

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>
@ -20,7 +20,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Coroutine" Version="2.1.4" /> <PackageReference Include="Coroutine" Version="2.1.5" />
<ProjectReference Include="..\MLEM.Ui\MLEM.Ui.csproj" /> <ProjectReference Include="..\MLEM.Ui\MLEM.Ui.csproj" />
<ProjectReference Include="..\MLEM\MLEM.csproj" /> <ProjectReference Include="..\MLEM\MLEM.csproj" />

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<IncludeContentInPack>true</IncludeContentInPack> <IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput> <IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders> <ContentTargetFolders>content</ContentTargetFolders>

View file

@ -11,8 +11,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Contentless" Version="3.*" /> <PackageReference Include="Contentless" Version="3.*" />
<PackageReference Include="MLEM.Startup" Version="6.*" /> <PackageReference Include="MLEM.Startup" Version="6.*" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.263" /> <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.263" /> <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -6,7 +6,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="MLEM.Startup" Version="6.*" /> <PackageReference Include="MLEM.Startup" Version="6.*" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.263"> <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>

View file

@ -2,7 +2,7 @@ using MLEM.Ui.Elements;
namespace MLEM.Ui { namespace MLEM.Ui {
/// <summary> /// <summary>
/// Represents a location for an <see cref="Element"/> to attach to within its parent (or within the screen's viewport if it is the <see cref="RootElement"/>). /// Represents a location for an <see cref="Element"/> to attach to within its parent (or within the screen's viewport if it is the <see cref="RootElement"/>).
/// </summary> /// </summary>
public enum Anchor { public enum Anchor {
@ -60,7 +60,7 @@ namespace MLEM.Ui {
AutoRight, AutoRight,
/// <summary> /// <summary>
/// This is an auto-anchoring value. /// This is an auto-anchoring value.
/// This anchor will cause an element to be placed in the same line as its older sibling, or at the start of the next line if there is no space to the right of its older sibling. /// This anchor will cause an element to be placed at the top right of its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
/// </summary> /// </summary>
AutoInline, AutoInline,
/// <summary> /// <summary>
@ -68,7 +68,29 @@ namespace MLEM.Ui {
/// This anchor is an overflow-ignoring version of <see cref="AutoInline"/>, meaning that the element will never be forced into the next line. /// This anchor is an overflow-ignoring version of <see cref="AutoInline"/>, meaning that the element will never be forced into the next line.
/// Note that, when using this property, it is very easy to cause an element to overflow out of its parent container. /// Note that, when using this property, it is very easy to cause an element to overflow out of its parent container.
/// </summary> /// </summary>
AutoInlineIgnoreOverflow AutoInlineIgnoreOverflow,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed at the center right of its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
/// </summary>
AutoInlineCenter,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor is an overflow-ignoring version of <see cref="AutoInlineCenter"/>, meaning that the element will never be forced into the next line.
/// Note that, when using this property, it is very easy to cause an element to overflow out of its parent container.
/// </summary>
AutoInlineCenterIgnoreOverflow,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed at the bottom right of its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
/// </summary>
AutoInlineBottom,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor is an overflow-ignoring version of <see cref="AutoInlineBottom"/>, meaning that the element will never be forced into the next line.
/// Note that, when using this property, it is very easy to cause an element to overflow out of its parent container.
/// </summary>
AutoInlineBottomIgnoreOverflow
} }
} }

View file

@ -673,7 +673,11 @@ namespace MLEM.Ui.Elements {
case Anchor.TopLeft: case Anchor.TopLeft:
case Anchor.AutoLeft: case Anchor.AutoLeft:
case Anchor.AutoInline: case Anchor.AutoInline:
case Anchor.AutoInlineCenter:
case Anchor.AutoInlineBottom:
case Anchor.AutoInlineIgnoreOverflow: case Anchor.AutoInlineIgnoreOverflow:
case Anchor.AutoInlineCenterIgnoreOverflow:
case Anchor.AutoInlineBottomIgnoreOverflow:
pos.X = parentArea.X + this.ScaledOffset.X; pos.X = parentArea.X + this.ScaledOffset.X;
pos.Y = parentArea.Y + this.ScaledOffset.Y; pos.Y = parentArea.Y + this.ScaledOffset.Y;
break; break;
@ -714,36 +718,33 @@ namespace MLEM.Ui.Elements {
} }
if (this.Anchor.IsAuto()) { if (this.Anchor.IsAuto()) {
Element previousChild; if (this.Anchor.IsInline()) {
if (this.Anchor == Anchor.AutoInline || this.Anchor == Anchor.AutoInlineIgnoreOverflow) { var anchorEl = this.GetOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
previousChild = this.GetOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach); if (anchorEl != null) {
} else { var anchorElArea = anchorEl.GetAreaForAutoAnchors();
previousChild = this.GetLowestOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach); var newX = anchorElArea.Right + this.ScaledOffset.X;
} // with awkward ui scale values, floating point rounding can cause an element that would usually
if (previousChild != null) { // be positioned correctly to be pushed into the next line due to a very small deviation
var prevArea = previousChild.GetAreaForAutoAnchors(); if (this.Anchor.IsIgnoreOverflow() || newX + newSize.X <= parentArea.Right + Element.Epsilon) {
switch (this.Anchor) { pos.X = newX;
case Anchor.AutoLeft: pos.Y = anchorElArea.Y + this.ScaledOffset.Y;
case Anchor.AutoCenter: if (this.Anchor == Anchor.AutoInlineCenter || this.Anchor == Anchor.AutoInlineCenterIgnoreOverflow) {
case Anchor.AutoRight: pos.Y += (anchorElArea.Height - newSize.Y) / 2;
pos.Y = prevArea.Bottom + this.ScaledOffset.Y; } else if (this.Anchor == Anchor.AutoInlineBottom || this.Anchor == Anchor.AutoInlineBottomIgnoreOverflow) {
break; pos.Y += anchorElArea.Height - newSize.Y;
case Anchor.AutoInline:
var newX = prevArea.Right + this.ScaledOffset.X;
// with awkward ui scale values, floating point rounding can cause an element that would usually
// be positioned correctly to be pushed into the next line due to a very small deviation
if (newX + newSize.X <= parentArea.Right + Element.Epsilon) {
pos.X = newX;
pos.Y = prevArea.Y + this.ScaledOffset.Y;
} else {
pos.Y = prevArea.Bottom + this.ScaledOffset.Y;
} }
break; } else {
case Anchor.AutoInlineIgnoreOverflow: // inline anchors that overflow into the next line act like AutoLeft
pos.X = prevArea.Right + this.ScaledOffset.X; var newlineAnchorEl = this.GetLowestOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
pos.Y = prevArea.Y + this.ScaledOffset.Y; if (newlineAnchorEl != null)
break; pos.Y = newlineAnchorEl.GetAreaForAutoAnchors().Bottom + this.ScaledOffset.Y;
}
} }
} else {
// auto anchors keep their x coordinates from the switch above
var anchorEl = this.GetLowestOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
if (anchorEl != null)
pos.Y = anchorEl.GetAreaForAutoAnchors().Bottom + this.ScaledOffset.Y;
} }
} }

View file

@ -234,21 +234,39 @@ namespace MLEM.Ui.Elements {
} }
/// <summary> /// <summary>
/// Returns whether the given <see cref="Anchor"/> is automatic. The anchors <see cref="Anchor.AutoLeft"/>, <see cref="Anchor.AutoCenter"/>, <see cref="Anchor.AutoRight"/>, <see cref="Anchor.AutoInline"/> and <see cref="Anchor.AutoInlineIgnoreOverflow"/> will return true. /// Returns whether the given <see cref="Anchor"/> is automatic. The anchors <see cref="Anchor.AutoLeft"/>, <see cref="Anchor.AutoCenter"/>, <see cref="Anchor.AutoRight"/>, and any anchor that <see cref="IsInline"/> will return true.
/// </summary> /// </summary>
/// <param name="anchor">The anchor to query.</param> /// <param name="anchor">The anchor to query.</param>
/// <returns>Whether the given anchor is automatic.</returns> /// <returns>Whether the given anchor is automatic.</returns>
public static bool IsAuto(this Anchor anchor) { public static bool IsAuto(this Anchor anchor) {
return anchor == Anchor.AutoLeft || anchor == Anchor.AutoCenter || anchor == Anchor.AutoRight || anchor == Anchor.AutoInline || anchor == Anchor.AutoInlineIgnoreOverflow; return anchor == Anchor.AutoLeft || anchor == Anchor.AutoCenter || anchor == Anchor.AutoRight || anchor.IsInline();
} }
/// <summary> /// <summary>
/// Returns whether the given <see cref="Anchor"/> is left-aligned for the purpose of <see cref="Element.GetRightmostChild"/>. The anchors <see cref="Anchor.TopLeft"/>, <see cref="Anchor.CenterLeft"/>, <see cref="Anchor.BottomLeft"/>, <see cref="Anchor.AutoLeft"/>, <see cref="Anchor.AutoInline"/> and <see cref="Anchor.AutoInlineIgnoreOverflow"/> will return true. /// Returns whether the given <see cref="Anchor"/> is inline. The anchors <see cref="Anchor.AutoInline"/>, <see cref="Anchor.AutoInlineCenter"/>, <see cref="Anchor.AutoInlineBottom"/>, and any anchor that <see cref="IsIgnoreOverflow"/> will return true.
/// </summary>
/// <param name="anchor">The anchor to query.</param>
/// <returns>Whether the given anchor is inline.</returns>
public static bool IsInline(this Anchor anchor) {
return anchor == Anchor.AutoInline || anchor == Anchor.AutoInlineCenter || anchor == Anchor.AutoInlineBottom || anchor.IsIgnoreOverflow();
}
/// <summary>
/// Returns whether the given <see cref="Anchor"/> ignores overflow. The anchors <see cref="Anchor.AutoInlineIgnoreOverflow"/>, <see cref="Anchor.AutoInlineCenterIgnoreOverflow"/>, and <see cref="Anchor.AutoInlineBottomIgnoreOverflow"/> will return true.
/// </summary>
/// <param name="anchor">The anchor to query.</param>
/// <returns>Whether the given anchor ignores overflow.</returns>
public static bool IsIgnoreOverflow(this Anchor anchor) {
return anchor == Anchor.AutoInlineIgnoreOverflow || anchor == Anchor.AutoInlineCenterIgnoreOverflow || anchor == Anchor.AutoInlineBottomIgnoreOverflow;
}
/// <summary>
/// Returns whether the given <see cref="Anchor"/> is left-aligned for the purpose of <see cref="Element.GetRightmostChild"/>. The anchors <see cref="Anchor.TopLeft"/>, <see cref="Anchor.CenterLeft"/>, <see cref="Anchor.BottomLeft"/>, <see cref="Anchor.AutoLeft"/>, and any anchor that <see cref="IsInline"/> will return true.
/// </summary> /// </summary>
/// <param name="anchor">The anchor to query.</param> /// <param name="anchor">The anchor to query.</param>
/// <returns>Whether the given anchor is left-aligned.</returns> /// <returns>Whether the given anchor is left-aligned.</returns>
public static bool IsLeftAligned(this Anchor anchor) { public static bool IsLeftAligned(this Anchor anchor) {
return anchor == Anchor.TopLeft || anchor == Anchor.CenterLeft || anchor == Anchor.BottomLeft || anchor == Anchor.AutoLeft || anchor == Anchor.AutoInline || anchor == Anchor.AutoInlineIgnoreOverflow; return anchor == Anchor.TopLeft || anchor == Anchor.CenterLeft || anchor == Anchor.BottomLeft || anchor == Anchor.AutoLeft || anchor.IsInline();
} }
/// <summary> /// <summary>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks> <TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsTrimmable>true</IsTrimmable> <IsTrimmable>true</IsTrimmable>

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
@ -20,7 +20,7 @@
<PackageReference Include="MonoGame.Extended.Tiled" Version="3.8.0" /> <PackageReference Include="MonoGame.Extended.Tiled" Version="3.8.0" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" /> <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
<PackageReference Include="FontStashSharp.MonoGame" Version="1.2.8" /> <PackageReference Include="FontStashSharp.MonoGame" Version="1.2.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<VSTestLogger>nunit</VSTestLogger> <VSTestLogger>nunit</VSTestLogger>
<VSTestResultsDirectory>TestResults.FNA</VSTestResultsDirectory> <VSTestResultsDirectory>TestResults.FNA</VSTestResultsDirectory>
<RootNamespace>Tests</RootNamespace> <RootNamespace>Tests</RootNamespace>
@ -34,7 +34,7 @@
<Content Include="Content/**"> <Content Include="Content/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="FnaNative/**"> <Content Include="../FnaNative/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>%(Filename)%(Extension)</Link> <Link>%(Filename)%(Extension)</Link>
</Content> </Content>

View file

@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<VSTestLogger>nunit</VSTestLogger> <VSTestLogger>nunit</VSTestLogger>
<VSTestResultsDirectory>TestResults</VSTestResultsDirectory> <VSTestResultsDirectory>TestResults</VSTestResultsDirectory>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\MLEM.Extended\MLEM.Extended.csproj" /> <ProjectReference Include="..\MLEM.Extended\MLEM.Extended.csproj" />
<ProjectReference Include="..\MLEM.Startup\MLEM.Startup.csproj" /> <ProjectReference Include="..\MLEM.Startup\MLEM.Startup.csproj" />
@ -13,22 +13,22 @@
<ProjectReference Include="..\MLEM.Ui\MLEM.Ui.csproj" /> <ProjectReference Include="..\MLEM.Ui\MLEM.Ui.csproj" />
<ProjectReference Include="..\MLEM\MLEM.csproj" /> <ProjectReference Include="..\MLEM\MLEM.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" /> <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="MonoGame.Extended" Version="3.8.0" /> <PackageReference Include="MonoGame.Extended" Version="3.8.0" />
<PackageReference Include="coverlet.collector" Version="3.2.0"> <PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NUnit" Version="3.13.3" /> <PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" /> <PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="NunitXml.TestLogger" Version="3.0.127" /> <PackageReference Include="NunitXml.TestLogger" Version="3.0.131" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Content/**"> <Content Include="Content/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>