2017-11-20 04:08:23 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "Types.h"
|
|
|
|
|
|
|
|
class IKeyManager;
|
2018-07-14 02:19:26 +00:00
|
|
|
class EmulationSettings;
|
2017-11-20 04:08:23 +00:00
|
|
|
enum class MouseButton;
|
|
|
|
|
|
|
|
class KeyManager
|
|
|
|
{
|
|
|
|
private:
|
2018-01-05 04:09:07 +00:00
|
|
|
static IKeyManager* _keyManager;
|
2017-11-20 04:08:23 +00:00
|
|
|
static MousePosition _mousePosition;
|
|
|
|
static atomic<int16_t> _xMouseMovement;
|
|
|
|
static atomic<int16_t> _yMouseMovement;
|
2018-07-14 02:19:26 +00:00
|
|
|
static EmulationSettings* _settings;
|
2017-11-20 04:08:23 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
static void RegisterKeyManager(IKeyManager* keyManager);
|
2018-07-14 02:19:26 +00:00
|
|
|
static void SetSettings(EmulationSettings* settings);
|
|
|
|
|
2017-11-20 04:08:23 +00:00
|
|
|
static void RefreshKeyState();
|
|
|
|
static bool IsKeyPressed(uint32_t keyCode);
|
|
|
|
static bool IsMouseButtonPressed(MouseButton button);
|
|
|
|
static string GetKeyName(uint32_t keyCode);
|
|
|
|
static uint32_t GetKeyCode(string keyName);
|
|
|
|
|
|
|
|
static void SetMouseMovement(int16_t x, int16_t y);
|
2017-12-22 02:31:42 +00:00
|
|
|
static MouseMovement GetMouseMovement(double mouseSensitivity);
|
2017-11-20 04:08:23 +00:00
|
|
|
|
|
|
|
static void SetMousePosition(double x, double y);
|
|
|
|
static MousePosition GetMousePosition();
|
2022-04-03 17:43:41 +00:00
|
|
|
};
|