Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6a2274a
Start of Input.ComCommon documentation
devvoid Jul 12, 2019
c29a540
Start of Input.Common documentation
devvoid Jul 12, 2019
8b3f7eb
Merge remote-tracking branch 'origin/input.common-docs' into input.co…
devvoid Jul 12, 2019
cfad5e7
Document most structs
devvoid Jul 12, 2019
f56e516
Remove mention of d-pad
devvoid Jul 12, 2019
cb74225
Change some key names for parity with input
devvoid Jul 12, 2019
bebc935
Make Position2D powers of two
devvoid Jul 12, 2019
c5fbda5
Document enums
devvoid Jul 12, 2019
9e203b0
Document interfaces and Deadzone
devvoid Jul 12, 2019
4f7bf3a
Correct template mistake
devvoid Jul 12, 2019
d1174b2
Document Thumbstick
devvoid Jul 12, 2019
5893929
Update src/Input/Silk.NET.Input.Common/Enums/DeadzoneMethod.cs
devvoid Jul 13, 2019
7cfb9aa
Update src/Input/Silk.NET.Input.Common/Enums/DeadzoneMethod.cs
devvoid Jul 13, 2019
038e5ff
Update src/Input/Silk.NET.Input.Common/Enums/DeadzoneMethod.cs
devvoid Jul 13, 2019
f132b5c
Update src/Input/Silk.NET.Input.Common/Enums/Key.cs
devvoid Jul 13, 2019
50a42bc
Update src/Input/Silk.NET.Input.Common/Interfaces/IGamepad.cs
devvoid Jul 13, 2019
46a6eb3
Update src/Input/Silk.NET.Input.Common/Interfaces/IJoystick.cs
devvoid Jul 13, 2019
4ad63a8
Update src/Input/Silk.NET.Input.Common/Interfaces/IGamepad.cs
devvoid Jul 13, 2019
273786e
Update src/Input/Silk.NET.Input.Common/Interfaces/IJoystick.cs
devvoid Jul 13, 2019
f523602
Update src/Input/Silk.NET.Input.Common/Interfaces/IJoystick.cs
devvoid Jul 13, 2019
2aa3232
Update src/Input/Silk.NET.Input.Common/Interfaces/IInputPlatform.cs
devvoid Jul 13, 2019
e9b89a6
Update src/Input/Silk.NET.Input.Common/Interfaces/IJoystick.cs
devvoid Jul 13, 2019
0bd92d9
Update src/Input/Silk.NET.Input.Common/Interfaces/IJoystick.cs
devvoid Jul 13, 2019
55556b7
Update IMouse.cs
devvoid Jul 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Input/Silk.NET.Input.Common/Axis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@

namespace Silk.NET.Input.Common
{
/// <summary>
/// Represents an axis on a joystick.
/// </summary>
public struct Axis
{
/// <summary>
/// The index of this axis, used to determine which axis it is.
/// </summary>
public int Index { get; }

/// <summary>
/// The position of this axis.
/// </summary>
public float Position { get; }

/// <summary>
/// Creates a new instance of the Axis struct.
/// </summary>
/// <param name="index">The index of the new axis.</param>
/// <param name="position">The position of the new axis.</param>
public Axis(int index, float position)
{
Index = index;
Expand Down
14 changes: 14 additions & 0 deletions src/Input/Silk.NET.Input.Common/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,24 @@

namespace Silk.NET.Input.Common
{
/// <summary>
/// Represents a joystick button.
/// </summary>
public struct Button
{
/// <summary>
/// The name of this button. Only guaranteed to be valid if this comes from an <see cref="IGamepad"/>.
/// </summary>
public ButtonName Name { get; }

/// <summary>
/// The index of this button. Use this if this button comes from an <see cref="IJoystick"/>.
/// </summary>
public int Index { get; }

/// <summary>
/// Whether or not this button is currently pressed.
/// </summary>
public bool Pressed { get; }

public Button(ButtonName name, int index, bool pressed)
Expand Down
15 changes: 15 additions & 0 deletions src/Input/Silk.NET.Input.Common/Hat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@

namespace Silk.NET.Input.Common
{
/// <summary>
/// Represents a joystick hat, a D-Pad.
/// </summary>
public struct Hat
{
/// <summary>
/// The index of this hat.
/// </summary>
public int Index { get; }

/// <summary>
/// The position of this hat.
/// </summary>
public Position2D Position { get; }

/// <summary>
/// Creates a new instance of the Hat struct.
/// </summary>
/// <param name="index">The index of the hat.</param>
/// <param name="position">The position of the hat.</param>
public Hat(int index, Position2D position)
{
Index = index;
Expand Down
15 changes: 15 additions & 0 deletions src/Input/Silk.NET.Input.Common/ScrollWheel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@

namespace Silk.NET.Input.Common
{
/// <summary>
/// Represents a scroll wheel.
/// </summary>
public struct ScrollWheel
{
/// <summary>
/// The X position of the scroll wheel.
/// </summary>
public float X { get; }

/// <summary>
/// The Y position of the scroll wheel.
/// </summary>
public float Y { get; }

/// <summary>
/// Creates a new instance of the scroll wheel struct.
/// </summary>
/// <param name="x">The X position of the scroll wheel.</param>
/// <param name="y">The Y position of the scroll wheel.</param>
public ScrollWheel(float x, float y)
{
X = x;
Expand Down
15 changes: 15 additions & 0 deletions src/Input/Silk.NET.Input.Common/Trigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@

namespace Silk.NET.Input.Common
{
/// <summary>
/// Represents a trigger.
/// </summary>
public struct Trigger
{
/// <summary>
/// The index of this trigger.
/// </summary>
public int Index { get; }

/// <summary>
/// The position of this trigger; how far down it's currently pressed.
/// </summary>
public float Position { get; }

/// <summary>
/// Creates a new instance of the Trigger struct.
/// </summary>
/// <param name="index">The index of this trigger.</param>
/// <param name="position">The position of this trigger.</param>
public Trigger(int index, float position)
{
Index = index;
Expand Down