You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Refactor to unify keyboard and controller input and focus.
Native controller navigation support. [CL 2345039 by Chris Gagnon in Main branch]
This commit is contained in:
+4
-4
@@ -167,7 +167,7 @@ void SCrashReportClient::Construct(const FArguments& InArgs, TSharedRef<FCrashRe
|
||||
];
|
||||
}
|
||||
|
||||
FSlateApplication::Get().SetUnhandledKeyDownEventHandler(FOnKeyboardEvent::CreateSP(this, &SCrashReportClient::OnUnhandledKeyDown));
|
||||
FSlateApplication::Get().SetUnhandledKeyDownEventHandler(FOnKeyEvent::CreateSP(this, &SCrashReportClient::OnUnhandledKeyDown));
|
||||
}
|
||||
|
||||
void SCrashReportClient::SetDefaultFocus()
|
||||
@@ -175,9 +175,9 @@ void SCrashReportClient::SetDefaultFocus()
|
||||
FSlateApplication::Get().SetKeyboardFocus(UserCommentBox.ToSharedRef());
|
||||
}
|
||||
|
||||
FReply SCrashReportClient::OnUnhandledKeyDown(const FKeyboardEvent& InKeyboardEvent)
|
||||
FReply SCrashReportClient::OnUnhandledKeyDown(const FKeyEvent& InKeyEvent)
|
||||
{
|
||||
const FKey Key = InKeyboardEvent.GetKey();
|
||||
const FKey Key = InKeyEvent.GetKey();
|
||||
if (Key == EKeys::Escape)
|
||||
{
|
||||
CrashReportClient->Cancel();
|
||||
@@ -185,7 +185,7 @@ FReply SCrashReportClient::OnUnhandledKeyDown(const FKeyboardEvent& InKeyboardEv
|
||||
}
|
||||
else if (Key == EKeys::Enter)
|
||||
{
|
||||
if (InKeyboardEvent.IsShiftDown())
|
||||
if (InKeyEvent.IsShiftDown())
|
||||
{
|
||||
CrashReportClient->Submit();
|
||||
return FReply::Handled();
|
||||
|
||||
@@ -36,10 +36,10 @@ public:
|
||||
private:
|
||||
/**
|
||||
* Keyboard short-cut handler
|
||||
* @param InKeyboardEvent Which key was released, and which auxiliary keys were pressed
|
||||
* @param InKeyEvent Which key was released, and which auxiliary keys were pressed
|
||||
* @return Whether the event was handled
|
||||
*/
|
||||
FReply OnUnhandledKeyDown(const FKeyboardEvent& InKeyboardEvent);
|
||||
FReply OnUnhandledKeyDown(const FKeyEvent& InKeyEvent);
|
||||
|
||||
/** Crash report client implementation object */
|
||||
TSharedPtr<FCrashReportClient> CrashReportClient;
|
||||
|
||||
Reference in New Issue
Block a user