1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-26 02:09:24 +01:00

added a dotnet core template

This commit is contained in:
Ellpeck 2020-02-26 10:18:24 +01:00
parent 9a8e03a972
commit 7a06f82ab3
7 changed files with 79 additions and 1 deletions

View file

@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Ellpeck",
"classifications": ["MLEM", "MonoGame"],
"groupIdentity": "MLEM.Templates.DesktopGL.Core",
"identity": "MLEM.Templates.DesktopGL.Core",
"name": "MLEM DesktopGL Core",
"shortName": "mlemdesktopglcore",
"sourceName": "TemplateNamespace",
"preferNameDirectory": true,
"tags": {
"language": "C#",
"type": "project"
},
"primaryOutputs": [
{
"path": "TemplateNamespace.csproj"
}
]
}

View file

@ -0,0 +1,15 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin
/intermediateDir:obj
/platform:Windows
/config:
/profile:Reach
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#

View file

@ -0,0 +1,7 @@
using MLEM.Startup;
namespace TemplateNamespace {
public class GameImpl : MlemGame {
}
}

View file

@ -0,0 +1,14 @@
using Microsoft.Xna.Framework;
using MLEM.Misc;
namespace TemplateNamespace {
public static class Program {
public static void Main() {
TextInputWrapper.Current = new TextInputWrapper.DesktopGl<TextInputEventArgs>((w, c) => w.TextInput += c);
using var game = new GameImpl();
game.Run();
}
}
}

View file

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Contentless" Version="2.0.*" />
<PackageReference Include="MLEM.Startup" Version="3.2.*" />
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.*" />
<PackageReference Include="MonoGame.Framework.DesktopGL.Core" Version="3.8.*" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
<Content Include="Content\*\**" />
</ItemGroup>
</Project>

View file

@ -29,7 +29,7 @@ namespace MLEM.Misc {
public delegate void TextInputCallback(object sender, Keys key, char character);
public class DesktopGl<T> : TextInputWrapper where T : EventArgs {
public class DesktopGl<T> : TextInputWrapper {
private PropertyInfo key;
private PropertyInfo character;