Skip to content

Instantly share code, notes, and snippets.

View grujicbr's full-sized avatar
💭
Using UE4 to build things

Branislav Grujic grujicbr

💭
Using UE4 to build things
  • Toronto, Ontario
View GitHub Profile
@sinbad
sinbad / InputModeDetector.cpp
Last active March 18, 2024 19:02
UE4 detecting which input method was last used by each player
#include "InputModeDetector.h"
#include "Input/Events.h"
FInputModeDetector::FInputModeDetector()
{
// 4 local players should be plenty usually (will expand if necessary)
LastInputModeByPlayer.Init(EInputMode::Mouse, 4);
}
bool FInputModeDetector::HandleKeyDownEvent(FSlateApplication& SlateApp, const FKeyEvent& InKeyEvent)