From 8ba9495c02f95dbff8aee44121a13f999234fb2f Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Sun, 17 Jan 2010 10:03:46 +0000 Subject: [PATCH] Improved the string format used in ToString() functions git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1361 4e206d99-4929-0410-ac5d-dfc041789085 --- dotnet/src/Audio/Music.cs | 24 +++++++-------- dotnet/src/Audio/Sound.cs | 20 ++++++------- dotnet/src/Audio/SoundBuffer.cs | 6 ++-- dotnet/src/Audio/SoundBufferRecorder.cs | 4 +-- dotnet/src/Audio/SoundRecorder.cs | 2 +- dotnet/src/Audio/SoundStream.cs | 22 +++++++------- dotnet/src/Audio/Vector3.cs | 6 ++-- dotnet/src/Graphics/Color.cs | 8 ++--- dotnet/src/Graphics/Image.cs | 6 ++-- dotnet/src/Graphics/Rect.cs | 16 +++++----- dotnet/src/Graphics/RenderImage.cs | 10 +++---- dotnet/src/Graphics/RenderWindow.cs | 10 +++---- dotnet/src/Graphics/Shape.cs | 16 +++++----- dotnet/src/Graphics/Sprite.cs | 20 ++++++------- dotnet/src/Graphics/Text.cs | 22 +++++++------- dotnet/src/Graphics/Vector2.cs | 4 +-- dotnet/src/Graphics/View.cs | 8 ++--- dotnet/src/Window/ContextSettings.cs | 10 +++---- dotnet/src/Window/EventArgs.cs | 40 ++++++++++++------------- dotnet/src/Window/VideoMode.cs | 6 ++-- dotnet/src/Window/Window.cs | 6 ++-- 21 files changed, 133 insertions(+), 133 deletions(-) diff --git a/dotnet/src/Audio/Music.cs b/dotnet/src/Audio/Music.cs index b6421a8a5..edf59f2ff 100644 --- a/dotnet/src/Audio/Music.cs +++ b/dotnet/src/Audio/Music.cs @@ -224,18 +224,18 @@ namespace SFML 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; + " SampleRate(" + SampleRate + ")" + + " ChannelsCount(" + ChannelsCount + ")" + + " Status(" + Status + ")" + + " Duration(" + Duration + ")" + + " Loop(" + Loop + ")" + + " Pitch(" + Pitch + ")" + + " Volume(" + Volume + ")" + + " Position(" + Position + ")" + + " RelativeToListener(" + RelativeToListener + ")" + + " MinDistance(" + MinDistance + ")" + + " Attenuation(" + Attenuation + ")" + + " PlayingOffset(" + PlayingOffset + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Audio/Sound.cs b/dotnet/src/Audio/Sound.cs index 401236201..e2eeb8195 100644 --- a/dotnet/src/Audio/Sound.cs +++ b/dotnet/src/Audio/Sound.cs @@ -219,16 +219,16 @@ namespace SFML 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; + " Status(" + Status + ")" + + " Loop(" + Loop + ")" + + " Pitch(" + Pitch + ")" + + " Volume(" + Volume + ")" + + " Position(" + Position + ")" + + " RelativeToListener(" + RelativeToListener + ")" + + " MinDistance(" + MinDistance + ")" + + " Attenuation(" + Attenuation + ")" + + " PlayingOffset(" + PlayingOffset + ")" + + " SoundBuffer(" + SoundBuffer + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Audio/SoundBuffer.cs b/dotnet/src/Audio/SoundBuffer.cs index e800164fe..3164ac5d9 100644 --- a/dotnet/src/Audio/SoundBuffer.cs +++ b/dotnet/src/Audio/SoundBuffer.cs @@ -154,9 +154,9 @@ namespace SFML public override string ToString() { return "[SoundBuffer]" + - " SampleRate = " + SampleRate + - " ChannelsCount = " + ChannelsCount + - " Duration = " + Duration; + " SampleRate(" + SampleRate + ")" + + " ChannelsCount(" + ChannelsCount + ")" + + " Duration(" + Duration + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Audio/SoundBufferRecorder.cs b/dotnet/src/Audio/SoundBufferRecorder.cs index 14d0f2f4c..1228d40f1 100644 --- a/dotnet/src/Audio/SoundBufferRecorder.cs +++ b/dotnet/src/Audio/SoundBufferRecorder.cs @@ -37,8 +37,8 @@ namespace SFML public override string ToString() { return "[SoundBufferRecorder]" + - " SampleRate = " + SampleRate + - " SoundBuffer = " + SoundBuffer; + " SampleRate(" + SampleRate + ")" + + " SoundBuffer(" + SoundBuffer + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Audio/SoundRecorder.cs b/dotnet/src/Audio/SoundRecorder.cs index 3dc7f3e56..c84dd8709 100644 --- a/dotnet/src/Audio/SoundRecorder.cs +++ b/dotnet/src/Audio/SoundRecorder.cs @@ -92,7 +92,7 @@ namespace SFML public override string ToString() { return "[SoundRecorder]" + - " SampleRate = " + SampleRate; + " SampleRate(" + SampleRate + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Audio/SoundStream.cs b/dotnet/src/Audio/SoundStream.cs index 5c3e8d635..dc670ccfa 100644 --- a/dotnet/src/Audio/SoundStream.cs +++ b/dotnet/src/Audio/SoundStream.cs @@ -189,17 +189,17 @@ namespace SFML 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; + " SampleRate(" + SampleRate + ")" + + " ChannelsCount(" + ChannelsCount + ")" + + " Status(" + Status + ")" + + " Loop(" + Loop + ")" + + " Pitch(" + Pitch + ")" + + " Volume(" + Volume + ")" + + " Position(" + Position + ")" + + " RelativeToListener(" + RelativeToListener + ")" + + " MinDistance(" + MinDistance + ")" + + " Attenuation(" + Attenuation + ")" + + " PlayingOffset(" + PlayingOffset + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Audio/Vector3.cs b/dotnet/src/Audio/Vector3.cs index 25efea738..5cf10be5c 100644 --- a/dotnet/src/Audio/Vector3.cs +++ b/dotnet/src/Audio/Vector3.cs @@ -115,9 +115,9 @@ namespace SFML public override string ToString() { return "[Vector3]" + - " X = " + X + - " Y = " + Y + - " Z = " + Z; + " X(" + X + ")" + + " Y(" + Y + ")" + + " Z(" + Z + ")"; } /// X (horizontal) component of the vector diff --git a/dotnet/src/Graphics/Color.cs b/dotnet/src/Graphics/Color.cs index beccc16ef..9f783ee1c 100644 --- a/dotnet/src/Graphics/Color.cs +++ b/dotnet/src/Graphics/Color.cs @@ -63,10 +63,10 @@ namespace SFML public override string ToString() { return "[Color]" + - " R = " + R + - " G = " + G + - " B = " + B + - " A = " + A; + " R(" + R + ")" + + " G(" + G + ")" + + " B(" + B + ")" + + " A(" + A + ")"; } /// Red component of the color diff --git a/dotnet/src/Graphics/Image.cs b/dotnet/src/Graphics/Image.cs index 2d4106604..2849f9f65 100644 --- a/dotnet/src/Graphics/Image.cs +++ b/dotnet/src/Graphics/Image.cs @@ -317,9 +317,9 @@ namespace SFML public override string ToString() { return "[Image]" + - " Width = " + Width + - " Height = " + Height + - " Smooth = " + Smooth; + " Width(" + Width + ")" + + " Height(" + Height + ")" + + " Smooth(" + Smooth + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Graphics/Rect.cs b/dotnet/src/Graphics/Rect.cs index 6be1bcd53..34ea15c2a 100644 --- a/dotnet/src/Graphics/Rect.cs +++ b/dotnet/src/Graphics/Rect.cs @@ -134,10 +134,10 @@ namespace SFML public override string ToString() { return "[IntRect]" + - " Left = " + Left + - " Top = " + Top + - " Right = " + Right + - " Bottom = " + Bottom; + " Left(" + Left + ")" + + " Top(" + Top + ")" + + " Right(" + Right + ")" + + " Bottom(" + Bottom + ")"; } /// Left coordinate of the rectangle @@ -282,10 +282,10 @@ namespace SFML public override string ToString() { return "[FloatRect]" + - " Left = " + Left + - " Top = " + Top + - " Right = " + Right + - " Bottom = " + Bottom; + " Left(" + Left + ")" + + " Top(" + Top + ")" + + " Right(" + Right + ")" + + " Bottom(" + Bottom + ")"; } /// Left coordinate of the rectangle diff --git a/dotnet/src/Graphics/RenderImage.cs b/dotnet/src/Graphics/RenderImage.cs index f5172fd44..73cdb2461 100644 --- a/dotnet/src/Graphics/RenderImage.cs +++ b/dotnet/src/Graphics/RenderImage.cs @@ -251,11 +251,11 @@ namespace SFML public override string ToString() { return "[RenderImage]" + - " Width = " + Width + - " Height = " + Height + - " Image = " + Image + - " DefaultView = " + DefaultView + - " CurrentView = " + CurrentView; + " Width(" + Width + ")" + + " Height(" + Height + ")" + + " Image(" + Image + ")" + + " DefaultView(" + DefaultView + ")" + + " CurrentView(" + CurrentView + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Graphics/RenderWindow.cs b/dotnet/src/Graphics/RenderWindow.cs index f4fe86406..632e5f2ab 100644 --- a/dotnet/src/Graphics/RenderWindow.cs +++ b/dotnet/src/Graphics/RenderWindow.cs @@ -434,11 +434,11 @@ namespace SFML public override string ToString() { return "[RenderWindow]" + - " Width = " + Width + - " Height = " + Height + - " Settings = " + Settings + - " DefaultView = " + DefaultView + - " CurrentView = " + CurrentView; + " Width(" + Width + ")" + + " Height(" + Height + ")" + + " Settings(" + Settings + ")" + + " DefaultView(" + DefaultView + ")" + + " CurrentView(" + CurrentView + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Graphics/Shape.cs b/dotnet/src/Graphics/Shape.cs index 8119db006..3c213052b 100644 --- a/dotnet/src/Graphics/Shape.cs +++ b/dotnet/src/Graphics/Shape.cs @@ -381,14 +381,14 @@ namespace SFML public override string ToString() { return "[Shape]" + - " Position = " + Position + - " Rotation = " + Rotation + - " Scale = " + Scale + - " Origin = " + Origin + - " Color = " + Color + - " BlendMode = " + BlendMode + - " OutlineWidth = " + OutlineWidth + - " NbPoints = " + NbPoints; + " Position(" + Position + ")" + + " Rotation(" + Rotation + ")" + + " Scale(" + Scale + ")" + + " Origin(" + Origin + ")" + + " Color(" + Color + ")" + + " BlendMode(" + BlendMode + ")" + + " OutlineWidth(" + OutlineWidth + ")" + + " NbPoints(" + NbPoints + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Graphics/Sprite.cs b/dotnet/src/Graphics/Sprite.cs index 02069c024..11e48d5b7 100644 --- a/dotnet/src/Graphics/Sprite.cs +++ b/dotnet/src/Graphics/Sprite.cs @@ -236,16 +236,16 @@ namespace SFML 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; + " Position(" + Position + ")" + + " Rotation(" + Rotation + ")" + + " Scale(" + Scale + ")" + + " Origin(" + Origin + ")" + + " Color(" + Color + ")" + + " BlendMode(" + BlendMode + ")" + + " Width(" + Width + ")" + + " Height(" + Height + ")" + + " SubRect(" + SubRect + ")" + + " Image(" + Image + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Graphics/Text.cs b/dotnet/src/Graphics/Text.cs index 46ebdf974..037e0a451 100644 --- a/dotnet/src/Graphics/Text.cs +++ b/dotnet/src/Graphics/Text.cs @@ -277,17 +277,17 @@ namespace SFML 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(); + " Position(" + Position + ")" + + " Rotation(" + Rotation + ")" + + " Scale(" + Scale + ")" + + " Origin(" + Origin + ")" + + " Color(" + Color + ")" + + " BlendMode(" + BlendMode + ")" + + " String(" + DisplayedString + ")" + + " Font(" + Font + ")" + + " Size(" + Size + ")" + + " Style(" + Style + ")" + + " Rectangle(" + GetRect() + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Graphics/Vector2.cs b/dotnet/src/Graphics/Vector2.cs index bf96983b5..669cc3328 100644 --- a/dotnet/src/Graphics/Vector2.cs +++ b/dotnet/src/Graphics/Vector2.cs @@ -113,8 +113,8 @@ namespace SFML public override string ToString() { return "[Vector2]" + - " X = " + X + - " Y = " + Y; + " X(" + X + ")" + + " Y(" + Y + ")"; } /// X (horizontal) component of the vector diff --git a/dotnet/src/Graphics/View.cs b/dotnet/src/Graphics/View.cs index 659f5d241..755ddfe8d 100644 --- a/dotnet/src/Graphics/View.cs +++ b/dotnet/src/Graphics/View.cs @@ -158,10 +158,10 @@ namespace SFML public override string ToString() { return "[View]" + - " Center = " + Center + - " Size = " + Size + - " Rotation = " + Rotation + - " Viewport = " + Viewport; + " Center(" + Center + ")" + + " Size(" + Size + ")" + + " Rotation(" + Rotation + ")" + + " Viewport(" + Viewport + ")"; } //////////////////////////////////////////////////////////// diff --git a/dotnet/src/Window/ContextSettings.cs b/dotnet/src/Window/ContextSettings.cs index 3d4d324da..5512229f9 100644 --- a/dotnet/src/Window/ContextSettings.cs +++ b/dotnet/src/Window/ContextSettings.cs @@ -66,11 +66,11 @@ namespace SFML public override string ToString() { return "[ContextSettings]" + - " DepthBits = " + DepthBits + - " StencilBits = " + StencilBits + - " AntialiasingLevel = " + AntialiasingLevel + - " MajorVersion = " + MajorVersion + - " MinorVersion = " + MinorVersion; + " DepthBits(" + DepthBits + ")" + + " StencilBits(" + StencilBits + ")" + + " AntialiasingLevel(" + AntialiasingLevel + ")" + + " MajorVersion(" + MajorVersion + ")" + + " MinorVersion(" + MinorVersion + ")"; } /// Depth buffer bits (0 is disabled) diff --git a/dotnet/src/Window/EventArgs.cs b/dotnet/src/Window/EventArgs.cs index 6c0c7bb11..25b41baf9 100644 --- a/dotnet/src/Window/EventArgs.cs +++ b/dotnet/src/Window/EventArgs.cs @@ -34,10 +34,10 @@ namespace SFML public override string ToString() { return "[KeyEventArgs]" + - " Code = " + Code + - " Alt = " + Alt + - " Control = " + Control + - " Shift = " + Shift; + " Code(" + Code + ")" + + " Alt(" + Alt + ")" + + " Control(" + Control + ")" + + " Shift(" + Shift + ")"; } /// Code of the key (see KeyCode enum) @@ -80,7 +80,7 @@ namespace SFML public override string ToString() { return "[TextEventArgs]" + - " Unicode = " + Unicode; + " Unicode(" + Unicode + ")"; } /// UTF-16 value of the character @@ -115,8 +115,8 @@ namespace SFML public override string ToString() { return "[MouseMoveEventArgs]" + - " X = " + X + - " Y = " + Y; + " X(" + X + ")" + + " Y(" + Y + ")"; } /// X coordinate of the mouse cursor @@ -155,9 +155,9 @@ namespace SFML public override string ToString() { return "[MouseButtonEventArgs]" + - " Button = " + Button + - " X = " + X + - " Y = " + Y; + " Button(" + Button + ")" + + " X(" + X + ")" + + " Y(" + Y + ")"; } /// Code of the button (see MouseButton enum) @@ -199,9 +199,9 @@ namespace SFML public override string ToString() { return "[MouseWheelEventArgs]" + - " Delta = " + Delta + - " X = " + X + - " Y = " + Y; + " Delta(" + Delta + ")" + + " X(" + X + ")" + + " Y(" + Y + ")"; } /// Scroll amount @@ -243,9 +243,9 @@ namespace SFML public override string ToString() { return "[JoyMoveEventArgs]" + - " JoystickId = " + JoystickId + - " Axis = " + Axis + - " Position = " + Position; + " JoystickId(" + JoystickId + ")" + + " Axis(" + Axis + ")" + + " Position(" + Position + ")"; } /// Index of the joystick which triggered the event @@ -286,8 +286,8 @@ namespace SFML public override string ToString() { return "[JoyButtonEventArgs]" + - " JoystickId = " + JoystickId + - " Button = " + Button; + " JoystickId(" + JoystickId + ")" + + " Button(" + Button + ")"; } /// Index of the joystick which triggered the event @@ -325,8 +325,8 @@ namespace SFML public override string ToString() { return "[SizeEventArgs]" + - " Width = " + Width + - " Height = " + Height; + " Width(" + Width + ")" + + " Height(" + Height + ")"; } /// New width of the window diff --git a/dotnet/src/Window/VideoMode.cs b/dotnet/src/Window/VideoMode.cs index 90c2d939a..0caf40dbf 100644 --- a/dotnet/src/Window/VideoMode.cs +++ b/dotnet/src/Window/VideoMode.cs @@ -97,9 +97,9 @@ namespace SFML public override string ToString() { return "[VideoMode]" + - " Width = " + Width + - " Height = " + Height + - " BitsPerPixel = " + BitsPerPixel; + " Width(" + Width + ")" + + " Height(" + Height + ")" + + " BitsPerPixel(" + BitsPerPixel + ")"; } /// Video mode width, in pixels diff --git a/dotnet/src/Window/Window.cs b/dotnet/src/Window/Window.cs index 6fbb5c09d..f3b44919c 100644 --- a/dotnet/src/Window/Window.cs +++ b/dotnet/src/Window/Window.cs @@ -375,9 +375,9 @@ namespace SFML public override string ToString() { return "[Window]" + - " Width = " + Width + - " Height = " + Height + - " Settings = " + Settings; + " Width(" + Width + ")" + + " Height(" + Height + ")" + + " Settings(" + Settings + ")"; } ////////////////////////////////////////////////////////////