updated inputmanager
This commit is contained in:
@@ -11,11 +11,9 @@ wiInputManager::InputCollection wiInputManager::inputs;
|
||||
#ifndef WINSTORE_SUPPORT
|
||||
#define KEY_DOWN(vk_code) (GetAsyncKeyState(vk_code) < 0)
|
||||
#define KEY_TOGGLE(vk_code) ((GetAsyncKeyState(vk_code) & 1) != 0)
|
||||
#define MOUSEBUTTONDOWN(vk_code) (GetAsyncKeyState(vk_code) & 0x8000)
|
||||
#else
|
||||
#define KEY_DOWN(vk_code) (false)
|
||||
#define KEY_TOGGLE(vk_code) (false)
|
||||
#define MOUSEBUTTONDOWN(vk_code) (false)
|
||||
#endif //WINSTORE_SUPPORT
|
||||
#define KEY_UP(vk_code) (!KEY_DOWN(vk_code))
|
||||
|
||||
@@ -90,9 +88,6 @@ bool wiInputManager::down(DWORD button, InputType inputType, short playerindex)
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case MOUSE:
|
||||
return MOUSEBUTTONDOWN(static_cast<int>(button)) != 0;
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -19,13 +19,11 @@ public:
|
||||
static void Update();
|
||||
static void CleanUp();
|
||||
|
||||
// do not change order! (it is used in lua)
|
||||
enum InputType{
|
||||
DIRECTINPUT_JOYPAD,
|
||||
XINPUT_JOYPAD,
|
||||
KEYBOARD,
|
||||
RAWINPUT_JOYPAD,
|
||||
MOUSE,
|
||||
INPUTTYPE_COUNT
|
||||
};
|
||||
struct Input{
|
||||
|
||||
@@ -114,7 +114,6 @@ void wiInputManager_BindLua::Bind()
|
||||
wiLua::GetGlobal()->RunText("XINPUT_JOYPAD = 1");
|
||||
wiLua::GetGlobal()->RunText("KEYBOARD = 2");
|
||||
wiLua::GetGlobal()->RunText("RAWINPUT_JOYPAD = 3");
|
||||
wiLua::GetGlobal()->RunText("MOUSE = 4");
|
||||
|
||||
//Keyboard
|
||||
wiLua::GetGlobal()->RunText("VK_UP = 0x26");
|
||||
|
||||
Reference in New Issue
Block a user