FS#145 - Implement copy constructors and ToString functions in SFML.Net
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1330 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
bd9a60fef2
commit
dd255a916d
28 changed files with 627 additions and 0 deletions
|
@ -25,6 +25,21 @@ namespace SFML
|
|||
Shift = e.Shift != 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[KeyEventArgs]" +
|
||||
" Code = " + Code +
|
||||
" Alt = " + Alt +
|
||||
" Control = " + Control +
|
||||
" Shift = " + Shift;
|
||||
}
|
||||
|
||||
/// <summary>Code of the key (see KeyCode enum)</summary>
|
||||
public KeyCode Code;
|
||||
|
||||
|
@ -56,6 +71,18 @@ namespace SFML
|
|||
Unicode = Char.ConvertFromUtf32((int)e.Unicode);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[TextEventArgs]" +
|
||||
" Unicode = " + Unicode;
|
||||
}
|
||||
|
||||
/// <summary>UTF-16 value of the character</summary>
|
||||
public string Unicode;
|
||||
}
|
||||
|
@ -79,6 +106,19 @@ namespace SFML
|
|||
Y = e.Y;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[MouseMoveEventArgs]" +
|
||||
" X = " + X +
|
||||
" Y = " + Y;
|
||||
}
|
||||
|
||||
/// <summary>X coordinate of the mouse cursor</summary>
|
||||
public int X;
|
||||
|
||||
|
@ -106,6 +146,20 @@ namespace SFML
|
|||
Y = e.Y;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[MouseButtonEventArgs]" +
|
||||
" Button = " + Button +
|
||||
" X = " + X +
|
||||
" Y = " + Y;
|
||||
}
|
||||
|
||||
/// <summary>Code of the button (see MouseButton enum)</summary>
|
||||
public MouseButton Button;
|
||||
|
||||
|
@ -136,6 +190,20 @@ namespace SFML
|
|||
Y = e.Y;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[MouseWheelEventArgs]" +
|
||||
" Delta = " + Delta +
|
||||
" X = " + X +
|
||||
" Y = " + Y;
|
||||
}
|
||||
|
||||
/// <summary>Scroll amount</summary>
|
||||
public int Delta;
|
||||
|
||||
|
@ -166,6 +234,20 @@ namespace SFML
|
|||
Position = e.Position;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[JoyMoveEventArgs]" +
|
||||
" JoystickId = " + JoystickId +
|
||||
" Axis = " + Axis +
|
||||
" Position = " + Position;
|
||||
}
|
||||
|
||||
/// <summary>Index of the joystick which triggered the event</summary>
|
||||
public uint JoystickId;
|
||||
|
||||
|
@ -195,6 +277,19 @@ namespace SFML
|
|||
Button = e.Button;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[JoyButtonEventArgs]" +
|
||||
" JoystickId = " + JoystickId +
|
||||
" Button = " + Button;
|
||||
}
|
||||
|
||||
/// <summary>Index of the joystick which triggered the event</summary>
|
||||
public uint JoystickId;
|
||||
|
||||
|
@ -221,6 +316,19 @@ namespace SFML
|
|||
Height = e.Height;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[SizeEventArgs]" +
|
||||
" Width = " + Width +
|
||||
" Height = " + Height;
|
||||
}
|
||||
|
||||
/// <summary>New width of the window</summary>
|
||||
public uint Width;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue