Character inputs and filesystem stuff
This commit is contained in:
parent
c083aed903
commit
3767a324a7
1 changed files with 25 additions and 4 deletions
|
|
@ -79,6 +79,7 @@ void App::SetWindow(Windows::UI::Core::CoreWindow^ window)
|
|||
// Hook keyboard events.
|
||||
window->KeyDown += ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &App::OnKeyDown);
|
||||
window->KeyUp += ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &App::OnKeyUp);
|
||||
window->CharacterReceived += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow^, Windows::UI::Core::CharacterReceivedEventArgs^>(this, &raylibUWP::App::OnCharacterReceived);
|
||||
|
||||
// The CoreWindow has been created, we can pass this to raylib for EGL context creation when it's time
|
||||
UWPSetCoreWindowPtr((void*)window);
|
||||
|
|
@ -448,8 +449,13 @@ void App::OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyE
|
|||
args->Handled = true;
|
||||
}
|
||||
|
||||
void App::OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args)
|
||||
{
|
||||
UWPKeyCharEvent(args->KeyCode);
|
||||
}
|
||||
|
||||
// AppSource implementation
|
||||
Windows::ApplicationModel::Core::IFrameworkView ^AppSource::CreateView()
|
||||
{
|
||||
return ref new App();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue