diff --git a/dotnet/extlibs/csfml-audio.dll b/dotnet/extlibs/csfml-audio.dll
index 10d3bf77..4a88df16 100644
Binary files a/dotnet/extlibs/csfml-audio.dll and b/dotnet/extlibs/csfml-audio.dll differ
diff --git a/dotnet/extlibs/csfml-graphics.dll b/dotnet/extlibs/csfml-graphics.dll
index f5e56a8e..b020e362 100644
Binary files a/dotnet/extlibs/csfml-graphics.dll and b/dotnet/extlibs/csfml-graphics.dll differ
diff --git a/dotnet/extlibs/csfml-window.dll b/dotnet/extlibs/csfml-window.dll
index 25d27359..1c527587 100644
Binary files a/dotnet/extlibs/csfml-window.dll and b/dotnet/extlibs/csfml-window.dll differ
diff --git a/dotnet/src/Audio/Music.cs b/dotnet/src/Audio/Music.cs
index ad6348aa..b6421a8a 100644
--- a/dotnet/src/Audio/Music.cs
+++ b/dotnet/src/Audio/Music.cs
@@ -215,6 +215,29 @@ namespace SFML
set {sfMusic_SetPlayingOffset(This, value);}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Music]" +
+ " SampleRate = " + SampleRate +
+ " ChannelsCount = " + ChannelsCount +
+ " Status = " + Status +
+ " Duration = " + Duration +
+ " Loop = " + Loop +
+ " Pitch = " + Pitch +
+ " Volume = " + Volume +
+ " Position = " + Position +
+ " RelativeToListener = " + RelativeToListener +
+ " MinDistance = " + MinDistance +
+ " Attenuation = " + Attenuation +
+ " PlayingOffset = " + PlayingOffset;
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
diff --git a/dotnet/src/Audio/Sound.cs b/dotnet/src/Audio/Sound.cs
index 93eb3448..40123620 100644
--- a/dotnet/src/Audio/Sound.cs
+++ b/dotnet/src/Audio/Sound.cs
@@ -53,6 +53,18 @@ namespace SFML
SoundBuffer = buffer;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the sound from another source
+ ///
+ /// Sound to copy
+ ////////////////////////////////////////////////////////////
+ public Sound(Sound copy) :
+ base(sfSound_Copy(copy.This))
+ {
+ SoundBuffer = copy.SoundBuffer;
+ }
+
////////////////////////////////////////////////////////////
///
/// Play the sound
@@ -198,6 +210,27 @@ namespace SFML
set {sfSound_SetAttenuation(This, value);}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Sound]" +
+ " Status = " + Status +
+ " Loop = " + Loop +
+ " Pitch = " + Pitch +
+ " Volume = " + Volume +
+ " Position = " + Position +
+ " RelativeToListener = " + RelativeToListener +
+ " MinDistance = " + MinDistance +
+ " Attenuation = " + Attenuation +
+ " PlayingOffset = " + PlayingOffset +
+ " SoundBuffer = " + SoundBuffer;
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
@@ -215,6 +248,9 @@ namespace SFML
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfSound_Create();
+ [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfSound_Copy(IntPtr Sound);
+
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfSound_Destroy(IntPtr Sound);
diff --git a/dotnet/src/Audio/SoundBuffer.cs b/dotnet/src/Audio/SoundBuffer.cs
index 12513f70..e800164f 100644
--- a/dotnet/src/Audio/SoundBuffer.cs
+++ b/dotnet/src/Audio/SoundBuffer.cs
@@ -77,6 +77,17 @@ namespace SFML
throw new LoadingFailedException("sound buffer");
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the sound buffer from another sound buffer
+ ///
+ /// Sound buffer to copy
+ ////////////////////////////////////////////////////////////
+ public SoundBuffer(SoundBuffer copy) :
+ base(sfSoundBuffer_Copy(copy.This))
+ {
+ }
+
////////////////////////////////////////////////////////////
///
/// Save the sound buffer to an audio file
@@ -134,6 +145,20 @@ namespace SFML
}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[SoundBuffer]" +
+ " SampleRate = " + SampleRate +
+ " ChannelsCount = " + ChannelsCount +
+ " Duration = " + Duration;
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
@@ -155,6 +180,9 @@ namespace SFML
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
unsafe static extern IntPtr sfSoundBuffer_CreateFromSamples(short* Samples, uint SamplesCount, uint ChannelsCount, uint SampleRate);
+ [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfSoundBuffer_Copy(IntPtr SoundBuffer);
+
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
static extern void sfSoundBuffer_Destroy(IntPtr SoundBuffer);
diff --git a/dotnet/src/Audio/SoundBufferRecorder.cs b/dotnet/src/Audio/SoundBufferRecorder.cs
index 3a3a12b2..14d0f2f4 100644
--- a/dotnet/src/Audio/SoundBufferRecorder.cs
+++ b/dotnet/src/Audio/SoundBufferRecorder.cs
@@ -28,6 +28,19 @@ namespace SFML
}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[SoundBufferRecorder]" +
+ " SampleRate = " + SampleRate +
+ " SoundBuffer = " + SoundBuffer;
+ }
+
////////////////////////////////////////////////////////////
///
/// Called when a new capture starts
diff --git a/dotnet/src/Audio/SoundRecorder.cs b/dotnet/src/Audio/SoundRecorder.cs
index 16b2a692..3dc7f3e5 100644
--- a/dotnet/src/Audio/SoundRecorder.cs
+++ b/dotnet/src/Audio/SoundRecorder.cs
@@ -83,6 +83,18 @@ namespace SFML
get {return sfSoundRecorder_IsAvailable();}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[SoundRecorder]" +
+ " SampleRate = " + SampleRate;
+ }
+
////////////////////////////////////////////////////////////
///
/// Called when a new capture starts
diff --git a/dotnet/src/Audio/SoundStream.cs b/dotnet/src/Audio/SoundStream.cs
index 6a3debe0..5c3e8d63 100644
--- a/dotnet/src/Audio/SoundStream.cs
+++ b/dotnet/src/Audio/SoundStream.cs
@@ -180,6 +180,28 @@ namespace SFML
set {sfSoundStream_SetPlayingOffset(This, value);}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[SoundStream]" +
+ " SampleRate = " + SampleRate +
+ " ChannelsCount = " + ChannelsCount +
+ " Status = " + Status +
+ " Loop = " + Loop +
+ " Pitch = " + Pitch +
+ " Volume = " + Volume +
+ " Position = " + Position +
+ " RelativeToListener = " + RelativeToListener +
+ " MinDistance = " + MinDistance +
+ " Attenuation = " + Attenuation +
+ " PlayingOffset = " + PlayingOffset;
+ }
+
////////////////////////////////////////////////////////////
///
/// Set the audio stream parameters, you must call it before Play()
diff --git a/dotnet/src/Audio/Vector3.cs b/dotnet/src/Audio/Vector3.cs
index d3895574..25efea73 100644
--- a/dotnet/src/Audio/Vector3.cs
+++ b/dotnet/src/Audio/Vector3.cs
@@ -106,6 +106,20 @@ namespace SFML
return new Vector3(v.X / x, v.Y / x, v.Z / x);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Vector3]" +
+ " X = " + X +
+ " Y = " + Y +
+ " Z = " + Z;
+ }
+
/// X (horizontal) component of the vector
public float X;
diff --git a/dotnet/src/Graphics/Color.cs b/dotnet/src/Graphics/Color.cs
index 2ba0a170..beccc16e 100644
--- a/dotnet/src/Graphics/Color.cs
+++ b/dotnet/src/Graphics/Color.cs
@@ -54,6 +54,21 @@ namespace SFML
{
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Color]" +
+ " R = " + R +
+ " G = " + G +
+ " B = " + B +
+ " A = " + A;
+ }
+
/// Red component of the color
public byte R;
diff --git a/dotnet/src/Graphics/Context.cs b/dotnet/src/Graphics/Context.cs
index 2bb5889d..0a68fbdf 100644
--- a/dotnet/src/Graphics/Context.cs
+++ b/dotnet/src/Graphics/Context.cs
@@ -61,6 +61,17 @@ namespace SFML
}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Context]";
+ }
+
private static Context ourGlobalContext = null;
private IntPtr myThis = IntPtr.Zero;
diff --git a/dotnet/src/Graphics/Font.cs b/dotnet/src/Graphics/Font.cs
index 746fd7b4..1a79d4ca 100644
--- a/dotnet/src/Graphics/Font.cs
+++ b/dotnet/src/Graphics/Font.cs
@@ -74,6 +74,17 @@ namespace SFML
throw new LoadingFailedException("font");
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the font from another font
+ ///
+ /// Font to copy
+ ////////////////////////////////////////////////////////////
+ public Font(Font copy) :
+ base(sfFont_Copy(copy.This))
+ {
+ }
+
////////////////////////////////////////////////////////////
///
/// Get a glyph in the font
@@ -143,6 +154,17 @@ namespace SFML
}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Font]";
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
@@ -190,6 +212,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
unsafe static extern IntPtr sfFont_CreateFromMemory(char* Data, uint SizeInBytes);
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfFont_Copy(IntPtr Font);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern void sfFont_Destroy(IntPtr This);
diff --git a/dotnet/src/Graphics/Image.cs b/dotnet/src/Graphics/Image.cs
index 46336194..2d410660 100644
--- a/dotnet/src/Graphics/Image.cs
+++ b/dotnet/src/Graphics/Image.cs
@@ -120,6 +120,17 @@ namespace SFML
throw new LoadingFailedException("image");
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the image from another image
+ ///
+ /// Image to copy
+ ////////////////////////////////////////////////////////////
+ public Image(Image copy) :
+ base(sfImage_Copy(copy.This))
+ {
+ }
+
////////////////////////////////////////////////////////////
///
/// Save the contents of the image to a file
@@ -297,6 +308,20 @@ namespace SFML
get {return sfImage_GetHeight(This);}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Image]" +
+ " Width = " + Width +
+ " Height = " + Height +
+ " Smooth = " + Smooth;
+ }
+
////////////////////////////////////////////////////////////
///
/// Internal constructor
@@ -338,6 +363,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfImage_CreateFromFile(string Filename);
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfImage_Copy(IntPtr Image);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
unsafe static extern IntPtr sfImage_CreateFromMemory(char* Data, uint Size);
diff --git a/dotnet/src/Graphics/Rect.cs b/dotnet/src/Graphics/Rect.cs
index 203e46d0..6be1bcd5 100644
--- a/dotnet/src/Graphics/Rect.cs
+++ b/dotnet/src/Graphics/Rect.cs
@@ -125,6 +125,21 @@ namespace SFML
}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[IntRect]" +
+ " Left = " + Left +
+ " Top = " + Top +
+ " Right = " + Right +
+ " Bottom = " + Bottom;
+ }
+
/// Left coordinate of the rectangle
public int Left;
@@ -258,6 +273,21 @@ namespace SFML
}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[FloatRect]" +
+ " Left = " + Left +
+ " Top = " + Top +
+ " Right = " + Right +
+ " Bottom = " + Bottom;
+ }
+
/// Left coordinate of the rectangle
public float Left;
diff --git a/dotnet/src/Graphics/RenderImage.cs b/dotnet/src/Graphics/RenderImage.cs
index 81e33042..f5172fd4 100644
--- a/dotnet/src/Graphics/RenderImage.cs
+++ b/dotnet/src/Graphics/RenderImage.cs
@@ -242,6 +242,22 @@ namespace SFML
get {return sfRenderImage_IsAvailable();}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[RenderImage]" +
+ " Width = " + Width +
+ " Height = " + Height +
+ " Image = " + Image +
+ " DefaultView = " + DefaultView +
+ " CurrentView = " + CurrentView;
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
diff --git a/dotnet/src/Graphics/RenderWindow.cs b/dotnet/src/Graphics/RenderWindow.cs
index b142838f..21e08957 100644
--- a/dotnet/src/Graphics/RenderWindow.cs
+++ b/dotnet/src/Graphics/RenderWindow.cs
@@ -425,6 +425,22 @@ namespace SFML
sfRenderWindow_Flush(This);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[RenderWindow]" +
+ " Width = " + Width +
+ " Height = " + Height +
+ " Settings = " + Settings +
+ " DefaultView = " + DefaultView +
+ " CurrentView = " + CurrentView;
+ }
+
////////////////////////////////////////////////////////////
///
/// Internal function to get the next event
diff --git a/dotnet/src/Graphics/Shader.cs b/dotnet/src/Graphics/Shader.cs
index b771d842..a96df5fe 100644
--- a/dotnet/src/Graphics/Shader.cs
+++ b/dotnet/src/Graphics/Shader.cs
@@ -41,6 +41,19 @@ namespace SFML
throw new LoadingFailedException("shader", filename);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the shader from another shader
+ ///
+ /// Shader to copy
+ ////////////////////////////////////////////////////////////
+ public Shader(Shader copy) :
+ base(sfShader_Copy(copy.This))
+ {
+ foreach (KeyValuePair pair in copy.myTextures)
+ myTextures[pair.Key] = copy.myTextures[pair.Key];
+ }
+
////////////////////////////////////////////////////////////
///
/// Load the shader from a text in memory
@@ -175,6 +188,17 @@ namespace SFML
get {return null;}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Shader]";
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
@@ -205,6 +229,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfShader_CreateFromMemory(string Shader);
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfShader_Copy(IntPtr Shader);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern void sfShader_Destroy(IntPtr Shader);
diff --git a/dotnet/src/Graphics/Shape.cs b/dotnet/src/Graphics/Shape.cs
index a4d07b62..8119db00 100644
--- a/dotnet/src/Graphics/Shape.cs
+++ b/dotnet/src/Graphics/Shape.cs
@@ -25,6 +25,17 @@ namespace SFML
{
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the shape from another shape
+ ///
+ /// Shape to copy
+ ////////////////////////////////////////////////////////////
+ public Shape(Shape copy) :
+ base(sfShape_Copy(copy.This))
+ {
+ }
+
////////////////////////////////////////////////////////////
///
/// Position of the object on screen
@@ -361,6 +372,25 @@ namespace SFML
return new Shape(sfShape_CreateCircle(center.X, center.Y, radius, color, outline, outlineColor));
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Shape]" +
+ " Position = " + Position +
+ " Rotation = " + Rotation +
+ " Scale = " + Scale +
+ " Origin = " + Origin +
+ " Color = " + Color +
+ " BlendMode = " + BlendMode +
+ " OutlineWidth = " + OutlineWidth +
+ " NbPoints = " + NbPoints;
+ }
+
////////////////////////////////////////////////////////////
///
/// Render the object into the given render window
@@ -417,6 +447,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfShape_Create();
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfShape_Copy(IntPtr Shape);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern void sfShape_Destroy(IntPtr This);
diff --git a/dotnet/src/Graphics/Sprite.cs b/dotnet/src/Graphics/Sprite.cs
index a7d7a431..deb98674 100644
--- a/dotnet/src/Graphics/Sprite.cs
+++ b/dotnet/src/Graphics/Sprite.cs
@@ -36,6 +36,18 @@ namespace SFML
Image = image;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the sprite from another sprite
+ ///
+ /// Sprite to copy
+ ////////////////////////////////////////////////////////////
+ public Sprite(Sprite copy) :
+ base(sfSprite_Copy(copy.This))
+ {
+ Image = copy.Image;
+ }
+
////////////////////////////////////////////////////////////
///
/// Position of the object on screen
@@ -215,6 +227,27 @@ namespace SFML
return sfSprite_GetPixel(This, x, y);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Sprite]" +
+ " Position = " + Position +
+ " Rotation = " + Rotation +
+ " Scale = " + Scale +
+ " Origin = " + Origin +
+ " Color = " + Color +
+ " BlendMode = " + BlendMode +
+ " Width = " + Width +
+ " Height = " + Height +
+ " SubRect = " + SubRect +
+ " Image = " + Image;
+ }
+
////////////////////////////////////////////////////////////
///
/// Render the object into the given render window
@@ -262,6 +295,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfSprite_Create();
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfSprite_Copy(IntPtr Sprite);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern void sfSprite_Destroy(IntPtr This);
diff --git a/dotnet/src/Graphics/Text.cs b/dotnet/src/Graphics/Text.cs
index 42ed4b23..46ebdf97 100644
--- a/dotnet/src/Graphics/Text.cs
+++ b/dotnet/src/Graphics/Text.cs
@@ -83,6 +83,18 @@ namespace SFML
Size = size;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the text from another text
+ ///
+ /// Text to copy
+ ////////////////////////////////////////////////////////////
+ public Text(Text copy) :
+ base(sfText_Copy(copy.This))
+ {
+ Font = copy.Font;
+ }
+
////////////////////////////////////////////////////////////
///
/// Position of the object on screen
@@ -256,6 +268,28 @@ namespace SFML
return Pos;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Text]" +
+ " Position = " + Position +
+ " Rotation = " + Rotation +
+ " Scale = " + Scale +
+ " Origin = " + Origin +
+ " Color = " + Color +
+ " BlendMode = " + BlendMode +
+ " String = " + DisplayedString +
+ " Font = " + Font +
+ " Size = " + Size +
+ " Style = " + Style +
+ " Rectangle = " + GetRect();
+ }
+
////////////////////////////////////////////////////////////
///
/// Render the object into the given render window
@@ -303,6 +337,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfText_Create();
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfText_Copy(IntPtr Text);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern void sfText_Destroy(IntPtr This);
diff --git a/dotnet/src/Graphics/Vector2.cs b/dotnet/src/Graphics/Vector2.cs
index 5de7a6e0..bf96983b 100644
--- a/dotnet/src/Graphics/Vector2.cs
+++ b/dotnet/src/Graphics/Vector2.cs
@@ -104,6 +104,19 @@ namespace SFML
return new Vector2(v.X / x, v.Y / x);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Vector2]" +
+ " X = " + X +
+ " Y = " + Y;
+ }
+
/// X (horizontal) component of the vector
public float X;
diff --git a/dotnet/src/Graphics/View.cs b/dotnet/src/Graphics/View.cs
index 10ca5019..659f5d24 100644
--- a/dotnet/src/Graphics/View.cs
+++ b/dotnet/src/Graphics/View.cs
@@ -49,6 +49,17 @@ namespace SFML
this.Size = size;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Construct the view from another view
+ ///
+ /// View to copy
+ ////////////////////////////////////////////////////////////
+ public View(View copy) :
+ base(sfView_Copy(copy.This))
+ {
+ }
+
////////////////////////////////////////////////////////////
///
/// Center of the view
@@ -138,6 +149,21 @@ namespace SFML
sfView_Zoom(This, factor);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[View]" +
+ " Center = " + Center +
+ " Size = " + Size +
+ " Rotation = " + Rotation +
+ " Viewport = " + Viewport;
+ }
+
////////////////////////////////////////////////////////////
///
/// Internal constructor for other classes which need to manipulate raw views
@@ -167,6 +193,9 @@ namespace SFML
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfView_CreateFromRect(FloatRect Rect);
+ [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
+ static extern IntPtr sfView_Copy(IntPtr View);
+
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
static extern void sfView_Destroy(IntPtr View);
diff --git a/dotnet/src/Window/ContextSettings.cs b/dotnet/src/Window/ContextSettings.cs
index bf57baa3..3d4d324d 100644
--- a/dotnet/src/Window/ContextSettings.cs
+++ b/dotnet/src/Window/ContextSettings.cs
@@ -57,6 +57,22 @@ namespace SFML
MinorVersion = minorVersion;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[ContextSettings]" +
+ " DepthBits = " + DepthBits +
+ " StencilBits = " + StencilBits +
+ " AntialiasingLevel = " + AntialiasingLevel +
+ " MajorVersion = " + MajorVersion +
+ " MinorVersion = " + MinorVersion;
+ }
+
/// Depth buffer bits (0 is disabled)
public uint DepthBits;
diff --git a/dotnet/src/Window/EventArgs.cs b/dotnet/src/Window/EventArgs.cs
index acbd040c..6c0c7bb1 100644
--- a/dotnet/src/Window/EventArgs.cs
+++ b/dotnet/src/Window/EventArgs.cs
@@ -25,6 +25,21 @@ namespace SFML
Shift = e.Shift != 0;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[KeyEventArgs]" +
+ " Code = " + Code +
+ " Alt = " + Alt +
+ " Control = " + Control +
+ " Shift = " + Shift;
+ }
+
/// Code of the key (see KeyCode enum)
public KeyCode Code;
@@ -56,6 +71,18 @@ namespace SFML
Unicode = Char.ConvertFromUtf32((int)e.Unicode);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[TextEventArgs]" +
+ " Unicode = " + Unicode;
+ }
+
/// UTF-16 value of the character
public string Unicode;
}
@@ -79,6 +106,19 @@ namespace SFML
Y = e.Y;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[MouseMoveEventArgs]" +
+ " X = " + X +
+ " Y = " + Y;
+ }
+
/// X coordinate of the mouse cursor
public int X;
@@ -106,6 +146,20 @@ namespace SFML
Y = e.Y;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[MouseButtonEventArgs]" +
+ " Button = " + Button +
+ " X = " + X +
+ " Y = " + Y;
+ }
+
/// Code of the button (see MouseButton enum)
public MouseButton Button;
@@ -136,6 +190,20 @@ namespace SFML
Y = e.Y;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[MouseWheelEventArgs]" +
+ " Delta = " + Delta +
+ " X = " + X +
+ " Y = " + Y;
+ }
+
/// Scroll amount
public int Delta;
@@ -166,6 +234,20 @@ namespace SFML
Position = e.Position;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[JoyMoveEventArgs]" +
+ " JoystickId = " + JoystickId +
+ " Axis = " + Axis +
+ " Position = " + Position;
+ }
+
/// Index of the joystick which triggered the event
public uint JoystickId;
@@ -195,6 +277,19 @@ namespace SFML
Button = e.Button;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[JoyButtonEventArgs]" +
+ " JoystickId = " + JoystickId +
+ " Button = " + Button;
+ }
+
/// Index of the joystick which triggered the event
public uint JoystickId;
@@ -221,6 +316,19 @@ namespace SFML
Height = e.Height;
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[SizeEventArgs]" +
+ " Width = " + Width +
+ " Height = " + Height;
+ }
+
/// New width of the window
public uint Width;
diff --git a/dotnet/src/Window/Input.cs b/dotnet/src/Window/Input.cs
index 8612bd03..b312aac5 100644
--- a/dotnet/src/Window/Input.cs
+++ b/dotnet/src/Window/Input.cs
@@ -98,6 +98,17 @@ namespace SFML
{
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Input]";
+ }
+
////////////////////////////////////////////////////////////
///
/// Handle the destruction of the object
diff --git a/dotnet/src/Window/VideoMode.cs b/dotnet/src/Window/VideoMode.cs
index f543a000..90c2d939 100644
--- a/dotnet/src/Window/VideoMode.cs
+++ b/dotnet/src/Window/VideoMode.cs
@@ -88,6 +88,20 @@ namespace SFML
get {return sfVideoMode_GetDesktopMode();}
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[VideoMode]" +
+ " Width = " + Width +
+ " Height = " + Height +
+ " BitsPerPixel = " + BitsPerPixel;
+ }
+
/// Video mode width, in pixels
public uint Width;
diff --git a/dotnet/src/Window/Window.cs b/dotnet/src/Window/Window.cs
index 9fd387a8..c80d6b0e 100644
--- a/dotnet/src/Window/Window.cs
+++ b/dotnet/src/Window/Window.cs
@@ -363,6 +363,20 @@ namespace SFML
CallEventHandler(e);
}
+ ////////////////////////////////////////////////////////////
+ ///
+ /// Provide a string describing the object
+ ///
+ /// String description of the object
+ ////////////////////////////////////////////////////////////
+ public override string ToString()
+ {
+ return "[Window]" +
+ " Width = " + Width +
+ " Height = " + Height +
+ " Settings = " + Settings;
+ }
+
////////////////////////////////////////////////////////////
///
/// Constructor for derived classes