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:
Chris Gagnon
2014-10-30 12:29:36 -04:00
committed by UnrealBot
parent bcfc2607d1
commit 0e6d657c3d
268 changed files with 2981 additions and 1823 deletions
@@ -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;