diff --git a/dotnet/src/Window/Event.cs b/dotnet/src/Window/Event.cs index 08374c409..06ec8356f 100644 --- a/dotnet/src/Window/Event.cs +++ b/dotnet/src/Window/Event.cs @@ -228,6 +228,7 @@ namespace SFML /// Keyboard event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct KeyEvent { /// Code of the key (see KeyCode enum) @@ -248,6 +249,7 @@ namespace SFML /// Text event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct TextEvent { /// UTF-32 value of the character @@ -259,6 +261,7 @@ namespace SFML /// Mouse move event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct MouseMoveEvent { /// X coordinate of the mouse cursor @@ -273,6 +276,7 @@ namespace SFML /// Mouse buttons event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct MouseButtonEvent { /// Code of the button (see MouseButton enum) @@ -290,6 +294,7 @@ namespace SFML /// Mouse wheel event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct MouseWheelEvent { /// Scroll amount @@ -307,6 +312,7 @@ namespace SFML /// Joystick axis move event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct JoyMoveEvent { /// Index of the joystick which triggered the event @@ -324,6 +330,7 @@ namespace SFML /// Joystick buttons event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct JoyButtonEvent { /// Index of the joystick which triggered the event @@ -338,6 +345,7 @@ namespace SFML /// Size event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct SizeEvent { /// New width of the window