mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 05:58:35 +01:00
Compare commits
No commits in common. "a61d7a97228526ad145cb29a72a892a6f16ddcba" and "29bbd61f8bf525eebeb1aa3510c5d8e8e7705f38" have entirely different histories.
a61d7a9722
...
29bbd61f8b
6 changed files with 12 additions and 47 deletions
|
@ -17,18 +17,10 @@ Additions
|
||||||
Improvements
|
Improvements
|
||||||
- Generify GenericFont's string drawing
|
- Generify GenericFont's string drawing
|
||||||
|
|
||||||
Fixes
|
|
||||||
- Fixed StaticSpriteBatch handling rotated sprites incorrectly
|
|
||||||
|
|
||||||
### MLEM.Ui
|
### MLEM.Ui
|
||||||
Improvements
|
Improvements
|
||||||
- Allow for checkboxes and radio buttons to be disabled
|
- Allow for checkboxes and radio buttons to be disabled
|
||||||
|
|
||||||
### MLEM.Data
|
|
||||||
Improvements
|
|
||||||
- Rethrow exceptions when no RawContentManager readers could be constructed
|
|
||||||
- Make Newtonsoft.Json dependency optional
|
|
||||||
|
|
||||||
## 5.2.0
|
## 5.2.0
|
||||||
### MLEM
|
### MLEM
|
||||||
Additions
|
Additions
|
||||||
|
|
|
@ -99,7 +99,6 @@ namespace MLEM.Data.Content {
|
||||||
|
|
||||||
private static List<RawContentReader> CollectContentReaders() {
|
private static List<RawContentReader> CollectContentReaders() {
|
||||||
var ret = new List<RawContentReader>();
|
var ret = new List<RawContentReader>();
|
||||||
var assemblyExceptions = new List<Exception>();
|
|
||||||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) {
|
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) {
|
||||||
try {
|
try {
|
||||||
if (assembly.IsDynamic)
|
if (assembly.IsDynamic)
|
||||||
|
@ -115,12 +114,10 @@ namespace MLEM.Data.Content {
|
||||||
throw new NotSupportedException($"The type {type} cannot be constructed by a RawContentManager. Does it have a visible parameterless constructor?", e);
|
throw new NotSupportedException($"The type {type} cannot be constructed by a RawContentManager. Does it have a visible parameterless constructor?", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch {
|
||||||
assemblyExceptions.Add(e);
|
// ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret.Count <= 0)
|
|
||||||
throw new AggregateException("Failed to construct any RawContentReader instances", assemblyExceptions);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,13 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<ProjectReference Include="..\MLEM\MLEM.csproj" />
|
<ProjectReference Include="..\MLEM\MLEM.csproj" />
|
||||||
|
|
||||||
<!--TODO remove lidgren support eventually (methods marked as obsolete since 5.2.0)-->
|
<!--TODO remove lidgren support eventually (methods marked as obsolete since 5.2.0)-->
|
||||||
<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.1">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2">
|
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -367,38 +367,18 @@ namespace MLEM.Graphics {
|
||||||
|
|
||||||
private Item Add(Texture2D texture, Vector2 pos, Vector2 offset, Vector2 size, float sin, float cos, Color color, Vector2 texTl, Vector2 texBr, float depth) {
|
private Item Add(Texture2D texture, Vector2 pos, Vector2 offset, Vector2 size, float sin, float cos, Color color, Vector2 texTl, Vector2 texBr, float depth) {
|
||||||
return this.Add(texture, depth,
|
return this.Add(texture, depth,
|
||||||
new VertexPositionColorTexture(new Vector3(
|
new VertexPositionColorTexture(new Vector3(pos.X + offset.X * cos - offset.Y * sin, pos.Y + offset.X * sin + offset.Y * cos, depth), color, texTl),
|
||||||
pos.X + offset.X * cos - offset.Y * sin,
|
new VertexPositionColorTexture(new Vector3(pos.X + (offset.X + size.X) * cos - offset.Y * sin, pos.Y + (offset.X + size.X) + offset.Y * cos, depth), color, new Vector2(texBr.X, texTl.Y)),
|
||||||
pos.Y + offset.X * sin + offset.Y * cos, depth),
|
new VertexPositionColorTexture(new Vector3(pos.X + offset.X * cos - (offset.Y + size.Y) * sin, pos.Y + offset.X * sin + (offset.Y + size.Y) * cos, depth), color, new Vector2(texTl.X, texBr.Y)),
|
||||||
color, texTl),
|
new VertexPositionColorTexture(new Vector3(pos.X + (offset.X + size.X) * cos - (offset.Y + size.Y) * sin, pos.Y + (offset.X + size.X) * sin + (offset.Y + size.Y) * cos, depth), color, texBr));
|
||||||
new VertexPositionColorTexture(new Vector3(
|
|
||||||
pos.X + (offset.X + size.X) * cos - offset.Y * sin,
|
|
||||||
pos.Y + (offset.X + size.X) * sin + offset.Y * cos, depth),
|
|
||||||
color, new Vector2(texBr.X, texTl.Y)),
|
|
||||||
new VertexPositionColorTexture(new Vector3(
|
|
||||||
pos.X + offset.X * cos - (offset.Y + size.Y) * sin,
|
|
||||||
pos.Y + offset.X * sin + (offset.Y + size.Y) * cos, depth),
|
|
||||||
color, new Vector2(texTl.X, texBr.Y)),
|
|
||||||
new VertexPositionColorTexture(new Vector3(
|
|
||||||
pos.X + (offset.X + size.X) * cos - (offset.Y + size.Y) * sin,
|
|
||||||
pos.Y + (offset.X + size.X) * sin + (offset.Y + size.Y) * cos, depth),
|
|
||||||
color, texBr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Item Add(Texture2D texture, Vector2 pos, Vector2 size, Color color, Vector2 texTl, Vector2 texBr, float depth) {
|
private Item Add(Texture2D texture, Vector2 pos, Vector2 size, Color color, Vector2 texTl, Vector2 texBr, float depth) {
|
||||||
return this.Add(texture, depth,
|
return this.Add(texture, depth,
|
||||||
new VertexPositionColorTexture(
|
new VertexPositionColorTexture(new Vector3(pos, depth), color, texTl),
|
||||||
new Vector3(pos, depth),
|
new VertexPositionColorTexture(new Vector3(pos.X + size.X, pos.Y, depth), color, new Vector2(texBr.X, texTl.Y)),
|
||||||
color, texTl),
|
new VertexPositionColorTexture(new Vector3(pos.X, pos.Y + size.Y, depth), color, new Vector2(texTl.X, texBr.Y)),
|
||||||
new VertexPositionColorTexture(
|
new VertexPositionColorTexture(new Vector3(pos.X + size.X, pos.Y + size.Y, depth), color, texBr));
|
||||||
new Vector3(pos.X + size.X, pos.Y, depth),
|
|
||||||
color, new Vector2(texBr.X, texTl.Y)),
|
|
||||||
new VertexPositionColorTexture(
|
|
||||||
new Vector3(pos.X, pos.Y + size.Y, depth),
|
|
||||||
color, new Vector2(texTl.X, texBr.Y)),
|
|
||||||
new VertexPositionColorTexture(
|
|
||||||
new Vector3(pos.X + size.X, pos.Y + size.Y, depth),
|
|
||||||
color, texBr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Item Add(Texture2D texture, float depth, VertexPositionColorTexture tl, VertexPositionColorTexture tr, VertexPositionColorTexture bl, VertexPositionColorTexture br) {
|
private Item Add(Texture2D texture, float depth, VertexPositionColorTexture tl, VertexPositionColorTexture tr, VertexPositionColorTexture bl, VertexPositionColorTexture br) {
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
<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.0.1641" />
|
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
|
||||||
<PackageReference Include="FontStashSharp.MonoGame" Version="1.0.4" />
|
<PackageReference Include="FontStashSharp.MonoGame" Version="1.0.4" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
<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.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
|
||||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
|
||||||
<PackageReference Include="NunitXml.TestLogger" Version="3.0.117" />
|
<PackageReference Include="NunitXml.TestLogger" Version="3.0.117" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue