Skip to content
Permalink
Browse files

Renamed FingerSDL to PointerSDL

Also renamed fields using it and adjusted doc comments
  • Loading branch information
dominikjancik authored and xen2 committed Sep 2, 2019
1 parent 238676d commit 581f8d9da4ab6687daecf1e163258d3e1da2a5ac
@@ -11,7 +11,7 @@
namespace Xenko.Input
{
/// <summary>
/// Provides support for mouse/keyboard/gamepads using SDL
/// Provides support for mouse/touch/keyboard/gamepads using SDL
/// </summary>
internal class InputSourceSDL : InputSourceBase
{
@@ -21,7 +21,7 @@ internal class InputSourceSDL : InputSourceBase
private Window uiControl;
private MouseSDL mouse;
private KeyboardSDL keyboard;
private FingerSDL finger;
private PointerSDL pointer; // Touch
private InputManager inputManager;

public override void Initialize(InputManager inputManager)
@@ -34,11 +34,11 @@ public override void Initialize(InputManager inputManager)

mouse = new MouseSDL(this, inputManager.Game, uiControl);
keyboard = new KeyboardSDL(this, uiControl);
finger = new FingerSDL(this, uiControl);
pointer = new PointerSDL(this, uiControl);

RegisterDevice(mouse);
RegisterDevice(keyboard);
RegisterDevice(finger);
RegisterDevice(pointer);

// Scan for gamepads
Scan();
@@ -147,4 +147,4 @@ private int GetJoystickInstanceId(int deviceIndex)
}
}

#endif
#endif
@@ -12,14 +12,16 @@

namespace Xenko.Input
{
// TODO FingerSDL or Touch(screen)SDL?
internal class FingerSDL : PointerDeviceBase, IDisposable
/// <summary>
/// Class handling finger touch inputs using the SDL backend
/// </summary>
internal class PointerSDL : PointerDeviceBase, IDisposable
{
private readonly Window uiControl;
private readonly Dictionary<long, int> touchFingerIndexMap = new Dictionary<long, int>();
private int touchCounter;

public FingerSDL(InputSourceSDL source, Window uiControl)
public PointerSDL(InputSourceSDL source, Window uiControl)
{
Source = source;
this.uiControl = uiControl;
@@ -32,7 +34,7 @@ public FingerSDL(InputSourceSDL source, Window uiControl)
OnSizeChanged(new SDL.SDL_WindowEvent());
}

public override string Name => "SDL Finger";
public override string Name => "SDL Pointer";

public override Guid Id => new Guid("f64482a9-dac9-4806-959f-eea7cbb4c609");

0 comments on commit 581f8d9

Please sign in to comment.
You can’t perform that action at this time.