Add scancode and virtual key and fix some sdl stuff on Windows
This commit is contained in:
@@ -18,7 +18,7 @@ void MouseClickState::Enter(Ndk::StateMachine& fsm)
|
||||
Nz::EventHandler& eventHandler = m_context.window.GetEventHandler();
|
||||
m_keyPressedSlot.Connect(eventHandler.OnKeyPressed, [&] (const Nz::EventHandler*, const Nz::WindowEvent::KeyEvent& key)
|
||||
{
|
||||
if (key.code == Nz::Keyboard::Key::M && key.shift)
|
||||
if (key.virtualKey == Nz::Keyboard::VKey::M && key.shift)
|
||||
{
|
||||
fsm.ChangeState(StateFactory::Get(EventStatus::Menu));
|
||||
}
|
||||
@@ -78,4 +78,4 @@ void MouseClickState::ManageInput(MouseStatus mouseStatus, const Nz::WindowEvent
|
||||
}
|
||||
|
||||
m_text.SetContent(content + "\nM for Menu");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user