mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-29 23:58:34 +01:00
Compare commits
No commits in common. "6607a5f48caa92e3c6edfc04f1e7cc56f49fb52a" and "bef670c09b22977dd2120f15535a724ed217e98f" have entirely different histories.
6607a5f48c
...
bef670c09b
63 changed files with 73 additions and 119 deletions
|
@ -33,12 +33,8 @@ Removals
|
|||
- Marked GetDownTime, GetUpTime and GetTimeSincePress in Keybind and Combination as obsolete
|
||||
|
||||
### MLEM.Ui
|
||||
Additions
|
||||
- Added AutoInlineCenter and AutoInlineBottom anchors
|
||||
|
||||
Fixes
|
||||
- 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
|
||||
- Increased Element area calculation recursion limit to 64
|
||||
|
|
|
@ -48,10 +48,10 @@ public class Activity1 : AndroidGameActivity {
|
|||
base.OnWindowFocusChanged(hasFocus);
|
||||
// hide the status bar
|
||||
if (hasFocus) {
|
||||
#pragma warning disable CA1422
|
||||
#pragma warning disable CS0618
|
||||
// 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);
|
||||
#pragma warning restore CA1422
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-android</TargetFramework>
|
||||
<TargetFramework>net6.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>31</SupportedOSPlatformVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ApplicationId>de.ellpeck.mlem.demos.android</ApplicationId>
|
||||
<ApplicationVersion>100</ApplicationVersion>
|
||||
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
|
||||
<RunAOTCompilation>false</RunAOTCompilation>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
<AssemblyName>MLEM Desktop Demos</AssemblyName>
|
||||
<RootNamespace>Demos.DesktopGL</RootNamespace>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<Content Include="..\Demos\Content\*\**" />
|
||||
<EmbeddedResource Include="Icon.ico" />
|
||||
<EmbeddedResource Include="Icon.bmp" />
|
||||
<Content Include="../FnaNative/**">
|
||||
<Content Include="FnaNative/**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
</Content>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
<AssemblyName>MLEM Desktop Demos</AssemblyName>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
|
BIN
Demos.DesktopGL/FnaNative/FAudio.dll
Normal file
BIN
Demos.DesktopGL/FnaNative/FAudio.dll
Normal file
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/FNA3D.dll
Normal file
BIN
Demos.DesktopGL/FnaNative/FNA3D.dll
Normal file
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/SDL2.dll
Normal file
BIN
Demos.DesktopGL/FnaNative/SDL2.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/libFAudio.so.0
Normal file
BIN
Demos.DesktopGL/FnaNative/libFAudio.so.0
Normal file
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/libFNA3D.0.dylib
Normal file
BIN
Demos.DesktopGL/FnaNative/libFNA3D.0.dylib
Normal file
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/libFNA3D.so.0
Normal file
BIN
Demos.DesktopGL/FnaNative/libFNA3D.so.0
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/libSDL2-2.0.0.dylib
Normal file
BIN
Demos.DesktopGL/FnaNative/libSDL2-2.0.0.dylib
Normal file
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/libSDL2-2.0.so.0
Normal file
BIN
Demos.DesktopGL/FnaNative/libSDL2-2.0.so.0
Normal file
Binary file not shown.
BIN
Demos.DesktopGL/FnaNative/libvulkan.1.dylib
Normal file
BIN
Demos.DesktopGL/FnaNative/libvulkan.1.dylib
Normal file
Binary file not shown.
2
FNA
2
FNA
|
@ -1 +1 @@
|
|||
Subproject commit 697cc63662914c0dc26c500bc9b8498b5ca8a68f
|
||||
Subproject commit 9029e149358197612509e2ee4893870a3b5d590e
|
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.
|
@ -1 +1 @@
|
|||
Subproject commit f11f97b709e50960dd8ce1f727974744c4f8a0dd
|
||||
Subproject commit c50bf544bcfb217b518727a0a38eb71fc5725092
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<PackageReference Include="Lidgren.Network" Version="1.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3">
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Coroutine" Version="2.1.5" />
|
||||
<PackageReference Include="Coroutine" Version="2.1.4" />
|
||||
<ProjectReference Include="..\MLEM.Ui\MLEM.Ui.csproj" />
|
||||
<ProjectReference Include="..\MLEM\MLEM.csproj" />
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<IncludeContentInPack>true</IncludeContentInPack>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<ContentTargetFolders>content</ContentTargetFolders>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Contentless" Version="3.*" />
|
||||
<PackageReference Include="MLEM.Startup" Version="6.*" />
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
|
||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.263" />
|
||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.263" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MLEM.Startup" Version="6.*" />
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303">
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.263">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@ using MLEM.Ui.Elements;
|
|||
|
||||
namespace MLEM.Ui {
|
||||
/// <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>
|
||||
public enum Anchor {
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace MLEM.Ui {
|
|||
AutoRight,
|
||||
/// <summary>
|
||||
/// This is an auto-anchoring value.
|
||||
/// 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.
|
||||
/// 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.
|
||||
/// </summary>
|
||||
AutoInline,
|
||||
/// <summary>
|
||||
|
@ -68,29 +68,7 @@ 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.
|
||||
/// Note that, when using this property, it is very easy to cause an element to overflow out of its parent container.
|
||||
/// </summary>
|
||||
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
|
||||
AutoInlineIgnoreOverflow
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -673,11 +673,7 @@ namespace MLEM.Ui.Elements {
|
|||
case Anchor.TopLeft:
|
||||
case Anchor.AutoLeft:
|
||||
case Anchor.AutoInline:
|
||||
case Anchor.AutoInlineCenter:
|
||||
case Anchor.AutoInlineBottom:
|
||||
case Anchor.AutoInlineIgnoreOverflow:
|
||||
case Anchor.AutoInlineCenterIgnoreOverflow:
|
||||
case Anchor.AutoInlineBottomIgnoreOverflow:
|
||||
pos.X = parentArea.X + this.ScaledOffset.X;
|
||||
pos.Y = parentArea.Y + this.ScaledOffset.Y;
|
||||
break;
|
||||
|
@ -718,33 +714,36 @@ namespace MLEM.Ui.Elements {
|
|||
}
|
||||
|
||||
if (this.Anchor.IsAuto()) {
|
||||
if (this.Anchor.IsInline()) {
|
||||
var anchorEl = this.GetOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
|
||||
if (anchorEl != null) {
|
||||
var anchorElArea = anchorEl.GetAreaForAutoAnchors();
|
||||
var newX = anchorElArea.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 (this.Anchor.IsIgnoreOverflow() || newX + newSize.X <= parentArea.Right + Element.Epsilon) {
|
||||
pos.X = newX;
|
||||
pos.Y = anchorElArea.Y + this.ScaledOffset.Y;
|
||||
if (this.Anchor == Anchor.AutoInlineCenter || this.Anchor == Anchor.AutoInlineCenterIgnoreOverflow) {
|
||||
pos.Y += (anchorElArea.Height - newSize.Y) / 2;
|
||||
} else if (this.Anchor == Anchor.AutoInlineBottom || this.Anchor == Anchor.AutoInlineBottomIgnoreOverflow) {
|
||||
pos.Y += anchorElArea.Height - newSize.Y;
|
||||
}
|
||||
} else {
|
||||
// inline anchors that overflow into the next line act like AutoLeft
|
||||
var newlineAnchorEl = this.GetLowestOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
|
||||
if (newlineAnchorEl != null)
|
||||
pos.Y = newlineAnchorEl.GetAreaForAutoAnchors().Bottom + this.ScaledOffset.Y;
|
||||
}
|
||||
}
|
||||
Element previousChild;
|
||||
if (this.Anchor == Anchor.AutoInline || this.Anchor == Anchor.AutoInlineIgnoreOverflow) {
|
||||
previousChild = this.GetOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
|
||||
} 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;
|
||||
previousChild = this.GetLowestOlderSibling(e => !e.IsHidden && e.CanAutoAnchorsAttach);
|
||||
}
|
||||
if (previousChild != null) {
|
||||
var prevArea = previousChild.GetAreaForAutoAnchors();
|
||||
switch (this.Anchor) {
|
||||
case Anchor.AutoLeft:
|
||||
case Anchor.AutoCenter:
|
||||
case Anchor.AutoRight:
|
||||
pos.Y = prevArea.Bottom + this.ScaledOffset.Y;
|
||||
break;
|
||||
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;
|
||||
case Anchor.AutoInlineIgnoreOverflow:
|
||||
pos.X = prevArea.Right + this.ScaledOffset.X;
|
||||
pos.Y = prevArea.Y + this.ScaledOffset.Y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -234,39 +234,21 @@ namespace MLEM.Ui.Elements {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="anchor">The anchor to query.</param>
|
||||
/// <returns>Whether the given anchor is automatic.</returns>
|
||||
public static bool IsAuto(this Anchor anchor) {
|
||||
return anchor == Anchor.AutoLeft || anchor == Anchor.AutoCenter || anchor == Anchor.AutoRight || anchor.IsInline();
|
||||
return anchor == Anchor.AutoLeft || anchor == Anchor.AutoCenter || anchor == Anchor.AutoRight || anchor == Anchor.AutoInline || anchor == Anchor.AutoInlineIgnoreOverflow;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="anchor">The anchor to query.</param>
|
||||
/// <returns>Whether the given anchor is left-aligned.</returns>
|
||||
public static bool IsLeftAligned(this Anchor anchor) {
|
||||
return anchor == Anchor.TopLeft || anchor == Anchor.CenterLeft || anchor == Anchor.BottomLeft || anchor == Anchor.AutoLeft || anchor.IsInline();
|
||||
return anchor == Anchor.TopLeft || anchor == Anchor.CenterLeft || anchor == Anchor.BottomLeft || anchor == Anchor.AutoLeft || anchor == Anchor.AutoInline || anchor == Anchor.AutoInlineIgnoreOverflow;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0;net7.0</TargetFrameworks>
|
||||
<TargetFrameworks>net452;netstandard2.0;net6.0</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
<PackageReference Include="MonoGame.Extended.Tiled" Version="3.8.0" />
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
|
||||
<PackageReference Include="FontStashSharp.MonoGame" Version="1.2.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
BIN
Tests/FnaNative/FAudio.dll
Normal file
BIN
Tests/FnaNative/FAudio.dll
Normal file
Binary file not shown.
BIN
Tests/FnaNative/FNA3D.dll
Normal file
BIN
Tests/FnaNative/FNA3D.dll
Normal file
Binary file not shown.
BIN
Tests/FnaNative/SDL2.dll
Normal file
BIN
Tests/FnaNative/SDL2.dll
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libFAudio.0.dylib
Normal file
BIN
Tests/FnaNative/libFAudio.0.dylib
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libFAudio.so.0
Normal file
BIN
Tests/FnaNative/libFAudio.so.0
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libFNA3D.0.dylib
Normal file
BIN
Tests/FnaNative/libFNA3D.0.dylib
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libFNA3D.so.0
Normal file
BIN
Tests/FnaNative/libFNA3D.so.0
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libMoltenVK.dylib
Normal file
BIN
Tests/FnaNative/libMoltenVK.dylib
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libSDL2-2.0.0.dylib
Normal file
BIN
Tests/FnaNative/libSDL2-2.0.0.dylib
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libSDL2-2.0.so.0
Normal file
BIN
Tests/FnaNative/libSDL2-2.0.so.0
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libtheorafile.dll
Normal file
BIN
Tests/FnaNative/libtheorafile.dll
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libtheorafile.dylib
Normal file
BIN
Tests/FnaNative/libtheorafile.dylib
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libtheorafile.so
Normal file
BIN
Tests/FnaNative/libtheorafile.so
Normal file
Binary file not shown.
BIN
Tests/FnaNative/libvulkan.1.dylib
Normal file
BIN
Tests/FnaNative/libvulkan.1.dylib
Normal file
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<VSTestLogger>nunit</VSTestLogger>
|
||||
<VSTestResultsDirectory>TestResults.FNA</VSTestResultsDirectory>
|
||||
<RootNamespace>Tests</RootNamespace>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<Content Include="Content/**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="../FnaNative/**">
|
||||
<Content Include="FnaNative/**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
</Content>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<VSTestLogger>nunit</VSTestLogger>
|
||||
<VSTestResultsDirectory>TestResults</VSTestResultsDirectory>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MLEM.Extended\MLEM.Extended.csproj" />
|
||||
<ProjectReference Include="..\MLEM.Startup\MLEM.Startup.csproj" />
|
||||
|
@ -13,22 +13,22 @@
|
|||
<ProjectReference Include="..\MLEM.Ui\MLEM.Ui.csproj" />
|
||||
<ProjectReference Include="..\MLEM\MLEM.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="MonoGame.Extended" Version="3.8.0" />
|
||||
|
||||
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||
<PackageReference Include="NunitXml.TestLogger" Version="3.0.131" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
|
||||
<PackageReference Include="NunitXml.TestLogger" Version="3.0.127" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Content/**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
|
Loading…
Reference in a new issue