diff --git a/Source/Demos/Demo.EntityComponentSystem/Demo.EntityComponentSystem.csproj b/Source/Demos/Demo.EntityComponentSystem/Demo.EntityComponentSystem.csproj
index 4e824698..cd05be39 100644
--- a/Source/Demos/Demo.EntityComponentSystem/Demo.EntityComponentSystem.csproj
+++ b/Source/Demos/Demo.EntityComponentSystem/Demo.EntityComponentSystem.csproj
@@ -41,11 +41,20 @@
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll
+ True
+
-
- $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\$(MonoGamePlatform)\MonoGame.Framework.dll
-
@@ -54,6 +63,7 @@
+
diff --git a/Source/Demos/Demo.EntityComponentSystem/packages.config b/Source/Demos/Demo.EntityComponentSystem/packages.config
new file mode 100644
index 00000000..777c5e44
--- /dev/null
+++ b/Source/Demos/Demo.EntityComponentSystem/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos/Demo.Gui/Demo.Gui.csproj b/Source/Demos/Demo.Gui/Demo.Gui.csproj
index c2308403..ac91a5ca 100644
--- a/Source/Demos/Demo.Gui/Demo.Gui.csproj
+++ b/Source/Demos/Demo.Gui/Demo.Gui.csproj
@@ -41,15 +41,24 @@
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll
+ True
+
..\..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll
True
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll
+ True
+
-
- $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\$(MonoGamePlatform)\MonoGame.Framework.dll
-
@@ -76,6 +85,10 @@
+
+ {8e425575-378a-4f83-88c9-f8bebad227c9}
+ MonoGame.Extended.Gui
+
{41724c52-3d50-45bb-81eb-3c8a247eafd1}
MonoGame.Extended
diff --git a/Source/Demos/Demo.Gui/packages.config b/Source/Demos/Demo.Gui/packages.config
index 583acbdf..9effec2f 100644
--- a/Source/Demos/Demo.Gui/packages.config
+++ b/Source/Demos/Demo.Gui/packages.config
@@ -1,4 +1,5 @@
+
\ No newline at end of file
diff --git a/Source/Demos/Demo.NuclexGui/Demo.NuclexGui.csproj b/Source/Demos/Demo.NuclexGui/Demo.NuclexGui.csproj
index f3afd816..899b6bea 100644
--- a/Source/Demos/Demo.NuclexGui/Demo.NuclexGui.csproj
+++ b/Source/Demos/Demo.NuclexGui/Demo.NuclexGui.csproj
@@ -41,11 +41,20 @@
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll
+ True
+
-
- $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\$(MonoGamePlatform)\MonoGame.Framework.dll
-
@@ -56,6 +65,7 @@
+
diff --git a/Source/Demos/Demo.NuclexGui/packages.config b/Source/Demos/Demo.NuclexGui/packages.config
new file mode 100644
index 00000000..777c5e44
--- /dev/null
+++ b/Source/Demos/Demo.NuclexGui/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos/Demo.Platformer/Demo.Platformer.csproj b/Source/Demos/Demo.Platformer/Demo.Platformer.csproj
index b5db0db6..5b62f8fb 100644
--- a/Source/Demos/Demo.Platformer/Demo.Platformer.csproj
+++ b/Source/Demos/Demo.Platformer/Demo.Platformer.csproj
@@ -54,11 +54,20 @@
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll
+ True
+
-
- $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\$(MonoGamePlatform)\MonoGame.Framework.dll
-
@@ -70,6 +79,7 @@
+
diff --git a/Source/Demos/Demo.Platformer/packages.config b/Source/Demos/Demo.Platformer/packages.config
new file mode 100644
index 00000000..777c5e44
--- /dev/null
+++ b/Source/Demos/Demo.Platformer/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Source/Demos/Demo.Screens/Demo.Screens.csproj b/Source/Demos/Demo.Screens/Demo.Screens.csproj
index 1365e3d3..a89a43b9 100644
--- a/Source/Demos/Demo.Screens/Demo.Screens.csproj
+++ b/Source/Demos/Demo.Screens/Demo.Screens.csproj
@@ -50,15 +50,25 @@
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll
+ True
+
+
+ ..\..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll
+ True
+
-
- $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\$(MonoGamePlatform)\MonoGame.Framework.dll
-
+
diff --git a/Source/Demos/Demo.Screens/packages.config b/Source/Demos/Demo.Screens/packages.config
new file mode 100644
index 00000000..777c5e44
--- /dev/null
+++ b/Source/Demos/Demo.Screens/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Source/MonoGame.Extended.Tests/Gui/GuiControlCollectionTests.cs b/Source/MonoGame.Extended.Gui.Tests/GuiControlCollectionTests.cs
similarity index 97%
rename from Source/MonoGame.Extended.Tests/Gui/GuiControlCollectionTests.cs
rename to Source/MonoGame.Extended.Gui.Tests/GuiControlCollectionTests.cs
index ada7f03c..7437c756 100644
--- a/Source/MonoGame.Extended.Tests/Gui/GuiControlCollectionTests.cs
+++ b/Source/MonoGame.Extended.Gui.Tests/GuiControlCollectionTests.cs
@@ -2,7 +2,7 @@
using NSubstitute;
using NUnit.Framework;
-namespace MonoGame.Extended.Tests.Gui
+namespace MonoGame.Extended.Gui.Tests
{
[TestFixture]
public class GuiControlCollectionTests
diff --git a/Source/MonoGame.Extended.Gui.Tests/MonoGame.Extended.Gui.Tests.csproj b/Source/MonoGame.Extended.Gui.Tests/MonoGame.Extended.Gui.Tests.csproj
new file mode 100644
index 00000000..83882bd7
--- /dev/null
+++ b/Source/MonoGame.Extended.Gui.Tests/MonoGame.Extended.Gui.Tests.csproj
@@ -0,0 +1,71 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}
+ Library
+ Properties
+ MonoGame.Extended.Gui.Tests
+ MonoGame.Extended.Gui.Tests
+ v4.5.2
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\NSubstitute.1.10.0.0\lib\net45\NSubstitute.dll
+ True
+
+
+ ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {8e425575-378a-4f83-88c9-f8bebad227c9}
+ MonoGame.Extended.Gui
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/MonoGame.Extended.Gui.Tests/Properties/AssemblyInfo.cs b/Source/MonoGame.Extended.Gui.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..596d8f52
--- /dev/null
+++ b/Source/MonoGame.Extended.Gui.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MonoGame.Extended.Gui.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MonoGame.Extended.Gui.Tests")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("43cba868-9bfc-4e02-8a7a-142c603b087e")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Source/MonoGame.Extended.Gui.Tests/packages.config b/Source/MonoGame.Extended.Gui.Tests/packages.config
new file mode 100644
index 00000000..09e803f9
--- /dev/null
+++ b/Source/MonoGame.Extended.Gui.Tests/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/MonoGame.Extended/Gui/Controls/GuiButton.cs b/Source/MonoGame.Extended.Gui/Controls/GuiButton.cs
similarity index 97%
rename from Source/MonoGame.Extended/Gui/Controls/GuiButton.cs
rename to Source/MonoGame.Extended.Gui/Controls/GuiButton.cs
index 70d95fdc..33b493f1 100644
--- a/Source/MonoGame.Extended/Gui/Controls/GuiButton.cs
+++ b/Source/MonoGame.Extended.Gui/Controls/GuiButton.cs
@@ -43,7 +43,7 @@ namespace MonoGame.Extended.Gui.Controls
public override void OnMouseUp(object sender, MouseEventArgs args)
{
if (IsPressed && Contains(args.Position))
- Click.Raise(this, args);
+ Click?.Invoke(this, args);
IsPressed = false;
base.OnMouseUp(sender, args);
diff --git a/Source/MonoGame.Extended/Gui/Controls/GuiControl.cs b/Source/MonoGame.Extended.Gui/Controls/GuiControl.cs
similarity index 98%
rename from Source/MonoGame.Extended/Gui/Controls/GuiControl.cs
rename to Source/MonoGame.Extended.Gui/Controls/GuiControl.cs
index d58d7e82..57267ed2 100644
--- a/Source/MonoGame.Extended/Gui/Controls/GuiControl.cs
+++ b/Source/MonoGame.Extended.Gui/Controls/GuiControl.cs
@@ -156,12 +156,12 @@ namespace MonoGame.Extended.Gui.Controls
public virtual void OnMouseDown(object sender, MouseEventArgs args)
{
- MouseDown.Raise(this, args);
+ MouseDown?.Invoke(this, args);
}
public virtual void OnMouseUp(object sender, MouseEventArgs args)
{
- MouseUp.Raise(this, args);
+ MouseUp?.Invoke(this, args);
}
public virtual void OnKeyTyped(object sender, KeyboardEventArgs args)
diff --git a/Source/MonoGame.Extended/Gui/Controls/GuiControlCollection.cs b/Source/MonoGame.Extended.Gui/Controls/GuiControlCollection.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Controls/GuiControlCollection.cs
rename to Source/MonoGame.Extended.Gui/Controls/GuiControlCollection.cs
diff --git a/Source/MonoGame.Extended/Gui/Controls/GuiControlStyle.cs b/Source/MonoGame.Extended.Gui/Controls/GuiControlStyle.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Controls/GuiControlStyle.cs
rename to Source/MonoGame.Extended.Gui/Controls/GuiControlStyle.cs
diff --git a/Source/MonoGame.Extended/Gui/Controls/GuiLabel.cs b/Source/MonoGame.Extended.Gui/Controls/GuiLabel.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Controls/GuiLabel.cs
rename to Source/MonoGame.Extended.Gui/Controls/GuiLabel.cs
diff --git a/Source/MonoGame.Extended/Gui/Controls/GuiToggleButton.cs b/Source/MonoGame.Extended.Gui/Controls/GuiToggleButton.cs
similarity index 96%
rename from Source/MonoGame.Extended/Gui/Controls/GuiToggleButton.cs
rename to Source/MonoGame.Extended.Gui/Controls/GuiToggleButton.cs
index ba3e2cd5..1b98a9fc 100644
--- a/Source/MonoGame.Extended/Gui/Controls/GuiToggleButton.cs
+++ b/Source/MonoGame.Extended.Gui/Controls/GuiToggleButton.cs
@@ -45,7 +45,7 @@ namespace MonoGame.Extended.Gui.Controls
if (IsPressed && Contains(args.Position))
{
IsChecked = !IsChecked;
- CheckStateChanged.Raise(this, args);
+ CheckStateChanged?.Invoke(this, args);
}
IsPressed = false;
diff --git a/Source/MonoGame.Extended/Gui/GuiAlignmentHelper.cs b/Source/MonoGame.Extended.Gui/GuiAlignmentHelper.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/GuiAlignmentHelper.cs
rename to Source/MonoGame.Extended.Gui/GuiAlignmentHelper.cs
diff --git a/Source/MonoGame.Extended/Gui/GuiComponent.cs b/Source/MonoGame.Extended.Gui/GuiComponent.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/GuiComponent.cs
rename to Source/MonoGame.Extended.Gui/GuiComponent.cs
diff --git a/Source/MonoGame.Extended/Gui/GuiDialog.cs b/Source/MonoGame.Extended.Gui/GuiDialog.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/GuiDialog.cs
rename to Source/MonoGame.Extended.Gui/GuiDialog.cs
diff --git a/Source/MonoGame.Extended/Gui/GuiLayout.cs b/Source/MonoGame.Extended.Gui/GuiLayout.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/GuiLayout.cs
rename to Source/MonoGame.Extended.Gui/GuiLayout.cs
diff --git a/Source/MonoGame.Extended/Gui/GuiThickness.cs b/Source/MonoGame.Extended.Gui/GuiThickness.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/GuiThickness.cs
rename to Source/MonoGame.Extended.Gui/GuiThickness.cs
diff --git a/Source/MonoGame.Extended.Gui/MonoGame.Extended.Gui.csproj b/Source/MonoGame.Extended.Gui/MonoGame.Extended.Gui.csproj
new file mode 100644
index 00000000..ff2ad33a
--- /dev/null
+++ b/Source/MonoGame.Extended.Gui/MonoGame.Extended.Gui.csproj
@@ -0,0 +1,84 @@
+
+
+
+
+ 10.0
+ Debug
+ AnyCPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}
+ Library
+ Properties
+ MonoGame.Extended.Gui
+ MonoGame.Extended.Gui
+ en-US
+ 512
+ {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Profile7
+ v4.5
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\..\Dependencies\MonoGame.Framework.dll
+
+
+ ..\packages\Newtonsoft.Json.8.0.3\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll
+ True
+
+
+
+
+
+
+
+ {41724c52-3d50-45bb-81eb-3c8a247eafd1}
+ MonoGame.Extended
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/MonoGame.Extended.Gui/Properties/AssemblyInfo.cs b/Source/MonoGame.Extended.Gui/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..f5abcf19
--- /dev/null
+++ b/Source/MonoGame.Extended.Gui/Properties/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MonoGame.Extended.Gui")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MonoGame.Extended.Gui")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Source/MonoGame.Extended/Gui/Serialization/ContentConverter.cs b/Source/MonoGame.Extended.Gui/Serialization/ContentConverter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/ContentConverter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/ContentConverter.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/GuiControlConverter.cs b/Source/MonoGame.Extended.Gui/Serialization/GuiControlConverter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/GuiControlConverter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/GuiControlConverter.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/GuiControlStyleConveter.cs b/Source/MonoGame.Extended.Gui/Serialization/GuiControlStyleConveter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/GuiControlStyleConveter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/GuiControlStyleConveter.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/GuiJsonConverter.cs b/Source/MonoGame.Extended.Gui/Serialization/GuiJsonConverter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/GuiJsonConverter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/GuiJsonConverter.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/GuiJsonConverterService.cs b/Source/MonoGame.Extended.Gui/Serialization/GuiJsonConverterService.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/GuiJsonConverterService.cs
rename to Source/MonoGame.Extended.Gui/Serialization/GuiJsonConverterService.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/GuiLayoutConverter.cs b/Source/MonoGame.Extended.Gui/Serialization/GuiLayoutConverter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/GuiLayoutConverter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/GuiLayoutConverter.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/GuiTextureAtlasConverter.cs b/Source/MonoGame.Extended.Gui/Serialization/GuiTextureAtlasConverter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/GuiTextureAtlasConverter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/GuiTextureAtlasConverter.cs
diff --git a/Source/MonoGame.Extended/Gui/Serialization/TextureRegion2DConveter.cs b/Source/MonoGame.Extended.Gui/Serialization/TextureRegion2DConveter.cs
similarity index 100%
rename from Source/MonoGame.Extended/Gui/Serialization/TextureRegion2DConveter.cs
rename to Source/MonoGame.Extended.Gui/Serialization/TextureRegion2DConveter.cs
diff --git a/Source/MonoGame.Extended.Gui/packages.config b/Source/MonoGame.Extended.Gui/packages.config
new file mode 100644
index 00000000..5f2fa4d1
--- /dev/null
+++ b/Source/MonoGame.Extended.Gui/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Source/MonoGame.Extended.Tests/MonoGame.Extended.Tests.csproj b/Source/MonoGame.Extended.Tests/MonoGame.Extended.Tests.csproj
index 22db5e0f..0d0fcb2d 100644
--- a/Source/MonoGame.Extended.Tests/MonoGame.Extended.Tests.csproj
+++ b/Source/MonoGame.Extended.Tests/MonoGame.Extended.Tests.csproj
@@ -63,7 +63,6 @@
-
diff --git a/Source/MonoGame.Extended.sln b/Source/MonoGame.Extended.sln
index 299d469e..41ef940d 100644
--- a/Source/MonoGame.Extended.sln
+++ b/Source/MonoGame.Extended.sln
@@ -102,6 +102,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.NuclexGui", "Demos\Dem
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Extended.Collisions", "MonoGame.Extended.Collisions\MonoGame.Extended.Collisions.csproj", "{02562C6F-5BFB-467E-8A95-68B6CE2D635A}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Extended.Gui", "MonoGame.Extended.Gui\MonoGame.Extended.Gui.csproj", "{8E425575-378A-4F83-88C9-F8BEBAD227C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Extended.Gui.Tests", "MonoGame.Extended.Gui.Tests\MonoGame.Extended.Gui.Tests.csproj", "{43CBA868-9BFC-4E02-8A7A-142C603B087E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -286,6 +290,22 @@ Global
{02562C6F-5BFB-467E-8A95-68B6CE2D635A}.Release|Any CPU.Build.0 = Release|Any CPU
{02562C6F-5BFB-467E-8A95-68B6CE2D635A}.Release|x86.ActiveCfg = Release|Any CPU
{02562C6F-5BFB-467E-8A95-68B6CE2D635A}.Release|x86.Build.0 = Release|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Debug|x86.Build.0 = Debug|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Release|x86.ActiveCfg = Release|Any CPU
+ {8E425575-378A-4F83-88C9-F8BEBAD227C9}.Release|x86.Build.0 = Release|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Debug|x86.Build.0 = Debug|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Release|x86.ActiveCfg = Release|Any CPU
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -310,5 +330,6 @@ Global
{A2B9E42A-B2D1-476D-9F4B-E64824DA57EE} = {932F8931-4A8D-4205-BFCF-98E794207786}
{5A251894-0462-47B6-9A63-BE26AA8CABDD} = {932F8931-4A8D-4205-BFCF-98E794207786}
{8003BA78-CB44-46B5-85A2-2A6440C3EFDC} = {932F8931-4A8D-4205-BFCF-98E794207786}
+ {43CBA868-9BFC-4E02-8A7A-142C603B087E} = {E5A148A1-DE7B-4D17-ABE8-831B9673B863}
EndGlobalSection
EndGlobal
diff --git a/Source/MonoGame.Extended/EventHandlerExtensions.cs b/Source/MonoGame.Extended/EventHandlerExtensions.cs
deleted file mode 100644
index 848b14e2..00000000
--- a/Source/MonoGame.Extended/EventHandlerExtensions.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace MonoGame.Extended
-{
- internal static class EventHandlerExtensions
- {
- public static void Raise(this EventHandler eventHandler, object sender, T args)
- where T : EventArgs
- {
- var handler = eventHandler;
-
- if (handler != null)
- handler(sender, args);
- }
-
- public static void Raise(this EventHandler eventHandler, object sender, EventArgs args)
- {
- var handler = eventHandler;
-
- if (handler != null)
- handler(sender, args);
- }
- }
-}
\ No newline at end of file
diff --git a/Source/MonoGame.Extended/InputListeners/GamePadListener.cs b/Source/MonoGame.Extended/InputListeners/GamePadListener.cs
index f6c26eca..cd01421d 100644
--- a/Source/MonoGame.Extended/InputListeners/GamePadListener.cs
+++ b/Source/MonoGame.Extended/InputListeners/GamePadListener.cs
@@ -339,13 +339,13 @@ namespace MonoGame.Extended.InputListeners
{
if (Math.Abs(prevstate - curstate) >= TriggerDeltaTreshold)
{
- TriggerMoved.Raise(this, MakeArgs(button, curstate));
+ TriggerMoved?.Invoke(this, MakeArgs(button, curstate));
_lastTriggerState = _currentState;
}
}
else if (prevstate > TriggerDeltaTreshold)
{
- TriggerMoved.Raise(this, MakeArgs(button, curstate));
+ TriggerMoved?.Invoke(this, MakeArgs(button, curstate));
_lastTriggerState = _currentState;
}
}
@@ -411,13 +411,13 @@ namespace MonoGame.Extended.InputListeners
{
if (Vector2.Distance(curVector, prevVector) >= ThumbStickDeltaTreshold)
{
- ThumbStickMoved.Raise(this, MakeArgs(button, thumbStickState: curVector));
+ ThumbStickMoved?.Invoke(this, MakeArgs(button, thumbStickState: curVector));
_lastThumbStickState = _currentState;
}
}
else if (prevVector.Length() > ThumbStickDeltaTreshold)
{
- ThumbStickMoved.Raise(this, MakeArgs(button, thumbStickState: curVector));
+ ThumbStickMoved?.Invoke(this, MakeArgs(button, thumbStickState: curVector));
_lastThumbStickState = _currentState;
}
}
@@ -432,7 +432,7 @@ namespace MonoGame.Extended.InputListeners
// We need more XORs in this world
{
_gamePadConnections[(int) index] = !_gamePadConnections[(int) index];
- ControllerConnectionChanged.Raise(null,
+ ControllerConnectionChanged?.Invoke(null,
new GamePadEventArgs(GamePadState.Default, GamePad.GetState(index), TimeSpan.Zero, index));
}
}
@@ -469,15 +469,15 @@ namespace MonoGame.Extended.InputListeners
private void RaiseButtonDown(Buttons button)
{
- ButtonDown.Raise(this, MakeArgs(button));
- ButtonRepeated.Raise(this, MakeArgs(button));
+ ButtonDown?.Invoke(this, MakeArgs(button));
+ ButtonRepeated?.Invoke(this, MakeArgs(button));
_lastButton = button;
_repeatedButtonTimer = 0;
}
private void RaiseButtonUp(Buttons button)
{
- ButtonUp.Raise(this, MakeArgs(button));
+ ButtonUp?.Invoke(this, MakeArgs(button));
_lastButton = 0;
}
@@ -490,12 +490,12 @@ namespace MonoGame.Extended.InputListeners
if (_repeatedButtonTimer < RepeatInitialDelay + RepeatDelay)
{
- ButtonRepeated.Raise(this, MakeArgs(_lastButton));
+ ButtonRepeated?.Invoke(this, MakeArgs(_lastButton));
_repeatedButtonTimer = RepeatDelay + RepeatInitialDelay;
}
else if (_repeatedButtonTimer > RepeatInitialDelay + RepeatDelay*2)
{
- ButtonRepeated.Raise(this, MakeArgs(_lastButton));
+ ButtonRepeated?.Invoke(this, MakeArgs(_lastButton));
_repeatedButtonTimer = RepeatDelay + RepeatInitialDelay;
}
}
diff --git a/Source/MonoGame.Extended/InputListeners/KeyboardListener.cs b/Source/MonoGame.Extended/InputListeners/KeyboardListener.cs
index 64f537bc..5a612b91 100644
--- a/Source/MonoGame.Extended/InputListeners/KeyboardListener.cs
+++ b/Source/MonoGame.Extended/InputListeners/KeyboardListener.cs
@@ -54,10 +54,10 @@ namespace MonoGame.Extended.InputListeners
{
var args = new KeyboardEventArgs(key, currentState);
- KeyPressed.Raise(this, args);
+ KeyPressed?.Invoke(this, args);
if (args.Character.HasValue)
- KeyTyped.Raise(this, args);
+ KeyTyped?.Invoke(this, args);
_previousKey = key;
_lastPressTime = gameTime.TotalGameTime;
@@ -73,7 +73,7 @@ namespace MonoGame.Extended.InputListeners
.Where(key => currentState.IsKeyUp(key) && _previousState.IsKeyDown(key));
foreach (var key in releasedKeys)
- KeyReleased.Raise(this, new KeyboardEventArgs(key, currentState));
+ KeyReleased?.Invoke(this, new KeyboardEventArgs(key, currentState));
}
private void RaiseRepeatEvents(GameTime gameTime, KeyboardState currentState)
@@ -86,7 +86,7 @@ namespace MonoGame.Extended.InputListeners
var args = new KeyboardEventArgs(_previousKey, currentState);
if (args.Character.HasValue)
- KeyTyped.Raise(this, args);
+ KeyTyped?.Invoke(this, args);
_lastPressTime = gameTime.TotalGameTime;
_isInitial = false;
diff --git a/Source/MonoGame.Extended/InputListeners/MouseListener.cs b/Source/MonoGame.Extended/InputListeners/MouseListener.cs
index b772ca5f..a8f165eb 100644
--- a/Source/MonoGame.Extended/InputListeners/MouseListener.cs
+++ b/Source/MonoGame.Extended/InputListeners/MouseListener.cs
@@ -70,7 +70,7 @@ namespace MonoGame.Extended.InputListeners
var args = new MouseEventArgs(ViewportAdapter, _gameTime.TotalGameTime, _previousState, _currentState,
button);
- MouseDown.Raise(this, args);
+ MouseDown?.Invoke(this, args);
_mouseDownArgs = args;
if (_previousClickArgs != null)
@@ -80,7 +80,7 @@ namespace MonoGame.Extended.InputListeners
if (clickMilliseconds <= DoubleClickMilliseconds)
{
- MouseDoubleClicked.Raise(this, args);
+ MouseDoubleClicked?.Invoke(this, args);
_hasDoubleClicked = true;
}
@@ -105,16 +105,16 @@ namespace MonoGame.Extended.InputListeners
if (clickMovement < DragThreshold)
{
if (!_hasDoubleClicked)
- MouseClicked.Raise(this, args);
+ MouseClicked?.Invoke(this, args);
}
else // If the mouse has moved between mouse down and mouse up
{
- MouseDragEnd.Raise(this, args);
+ MouseDragEnd?.Invoke(this, args);
_dragging = false;
}
}
- MouseUp.Raise(this, args);
+ MouseUp?.Invoke(this, args);
_hasDoubleClicked = false;
_previousClickArgs = args;
@@ -132,7 +132,7 @@ namespace MonoGame.Extended.InputListeners
if (_mouseDownArgs.Button == args.Button)
if (_dragging)
{
- MouseDrag.Raise(this, args);
+ MouseDrag?.Invoke(this, args);
}
else
{
@@ -142,7 +142,7 @@ namespace MonoGame.Extended.InputListeners
if (clickMovement > DragThreshold)
{
_dragging = true;
- MouseDragStart.Raise(this, args);
+ MouseDragStart?.Invoke(this, args);
}
}
}
@@ -168,7 +168,7 @@ namespace MonoGame.Extended.InputListeners
// Check for any sort of mouse movement.
if (HasMouseMoved)
{
- MouseMoved.Raise(this,
+ MouseMoved?.Invoke(this,
new MouseEventArgs(ViewportAdapter, gameTime.TotalGameTime, _previousState, _currentState));
CheckMouseDragged(s => s.LeftButton, MouseButton.Left);
@@ -180,7 +180,7 @@ namespace MonoGame.Extended.InputListeners
// Handle mouse wheel events.
if (_previousState.ScrollWheelValue != _currentState.ScrollWheelValue)
- MouseWheelMoved.Raise(this,
+ MouseWheelMoved?.Invoke(this,
new MouseEventArgs(ViewportAdapter, gameTime.TotalGameTime, _previousState, _currentState));
_previousState = _currentState;
diff --git a/Source/MonoGame.Extended/InputListeners/TouchListener.cs b/Source/MonoGame.Extended/InputListeners/TouchListener.cs
index dd24e7aa..694ddb6f 100644
--- a/Source/MonoGame.Extended/InputListeners/TouchListener.cs
+++ b/Source/MonoGame.Extended/InputListeners/TouchListener.cs
@@ -29,16 +29,16 @@ namespace MonoGame.Extended.InputListeners
switch (touchLocation.State)
{
case TouchLocationState.Pressed:
- TouchStarted.Raise(this, new TouchEventArgs(touchLocation));
+ TouchStarted?.Invoke(this, new TouchEventArgs(touchLocation));
break;
case TouchLocationState.Moved:
- TouchMoved.Raise(this, new TouchEventArgs(touchLocation));
+ TouchMoved?.Invoke(this, new TouchEventArgs(touchLocation));
break;
case TouchLocationState.Released:
- TouchEnded.Raise(this, new TouchEventArgs(touchLocation));
+ TouchEnded?.Invoke(this, new TouchEventArgs(touchLocation));
break;
case TouchLocationState.Invalid:
- TouchCancelled.Raise(this, new TouchEventArgs(touchLocation));
+ TouchCancelled?.Invoke(this, new TouchEventArgs(touchLocation));
break;
}
}
diff --git a/Source/MonoGame.Extended/MonoGame.Extended.csproj b/Source/MonoGame.Extended/MonoGame.Extended.csproj
index 4f2d9853..cf0d4f8b 100644
--- a/Source/MonoGame.Extended/MonoGame.Extended.csproj
+++ b/Source/MonoGame.Extended/MonoGame.Extended.csproj
@@ -38,7 +38,6 @@
-
@@ -161,20 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -191,16 +176,11 @@
-
-
-
-
-
diff --git a/Source/MonoGame.Extended/Timers/ContinuousClock.cs b/Source/MonoGame.Extended/Timers/ContinuousClock.cs
index 8fe179f7..c31930b5 100644
--- a/Source/MonoGame.Extended/Timers/ContinuousClock.cs
+++ b/Source/MonoGame.Extended/Timers/ContinuousClock.cs
@@ -29,7 +29,7 @@ namespace MonoGame.Extended.Timers
if (CurrentTime >= NextTickTime)
{
NextTickTime = CurrentTime + Interval;
- Tick.Raise(this, EventArgs.Empty);
+ Tick?.Invoke(this, EventArgs.Empty);
}
}
}
diff --git a/Source/MonoGame.Extended/Timers/CountdownTimer.cs b/Source/MonoGame.Extended/Timers/CountdownTimer.cs
index a39ae6ae..fea76590 100644
--- a/Source/MonoGame.Extended/Timers/CountdownTimer.cs
+++ b/Source/MonoGame.Extended/Timers/CountdownTimer.cs
@@ -28,14 +28,14 @@ namespace MonoGame.Extended.Timers
protected override void OnUpdate(GameTime gameTime)
{
TimeRemaining = Interval - CurrentTime;
- TimeRemainingChanged.Raise(this, EventArgs.Empty);
+ TimeRemainingChanged?.Invoke(this, EventArgs.Empty);
if (CurrentTime >= Interval)
{
State = TimerState.Completed;
CurrentTime = Interval;
TimeRemaining = TimeSpan.Zero;
- Completed.Raise(this, EventArgs.Empty);
+ Completed?.Invoke(this, EventArgs.Empty);
}
}
}
diff --git a/Source/MonoGame.Extended/Timers/GameTimer.cs b/Source/MonoGame.Extended/Timers/GameTimer.cs
index f64302c5..6a3acfe0 100644
--- a/Source/MonoGame.Extended/Timers/GameTimer.cs
+++ b/Source/MonoGame.Extended/Timers/GameTimer.cs
@@ -36,7 +36,7 @@ namespace MonoGame.Extended.Timers
public void Start()
{
State = TimerState.Started;
- Started.Raise(this, EventArgs.Empty);
+ Started?.Invoke(this, EventArgs.Empty);
}
public void Stop()
@@ -44,7 +44,7 @@ namespace MonoGame.Extended.Timers
State = TimerState.Stopped;
CurrentTime = TimeSpan.Zero;
OnStopped();
- Stopped.Raise(this, EventArgs.Empty);
+ Stopped?.Invoke(this, EventArgs.Empty);
}
public void Restart()
@@ -56,7 +56,7 @@ namespace MonoGame.Extended.Timers
public void Pause()
{
State = TimerState.Paused;
- Paused.Raise(this, EventArgs.Empty);
+ Paused?.Invoke(this, EventArgs.Empty);
}
protected abstract void OnStopped();