mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 12:06:37 +00:00
28 lines
1.0 KiB
C#
28 lines
1.0 KiB
C#
using MonoGame.Extended.Input.InputListeners;
|
|
|
|
namespace MonoGame.Extended.NuclexGui
|
|
{
|
|
public interface IGuiInputService
|
|
{
|
|
KeyboardListener KeyboardListener { get; }
|
|
MouseListener MouseListener { get; }
|
|
GamePadListener GamePadListener { get; }
|
|
TouchListener TouchListener { get; }
|
|
}
|
|
|
|
public class GuiInputService : IGuiInputService
|
|
{
|
|
public GuiInputService(InputListenerComponent inputListener)
|
|
{
|
|
inputListener.Listeners.Add(KeyboardListener = new KeyboardListener());
|
|
inputListener.Listeners.Add(MouseListener = new MouseListener());
|
|
inputListener.Listeners.Add(GamePadListener = new GamePadListener());
|
|
inputListener.Listeners.Add(TouchListener = new TouchListener());
|
|
}
|
|
|
|
public KeyboardListener KeyboardListener { get; }
|
|
public MouseListener MouseListener { get; }
|
|
public GamePadListener GamePadListener { get; }
|
|
public TouchListener TouchListener { get; }
|
|
}
|
|
} |