I’m trying to better understand the how inputs work in UE4, but I’m still a bit lost.
Peeking through the C++ code for the ShooterGame sample, I see the following in ShooterPlayerController.cpp:
void AShooterPlayerController::SetupInputComponent()
{
Super::SetupInputComponent();
// UI input
BIND_ACTION(InputComponent, "InGameMenu", IE_Pressed, &AShooterPlayerController::OnToggleInGameMenu);
BIND_ACTION(InputComponent, "Scoreboard", IE_Pressed, &AShooterPlayerController::OnShowScoreboard);
BIND_ACTION(InputComponent, "Scoreboard", IE_Released, &AShooterPlayerController::OnHideScoreboard);
// voice chat
BIND_ACTION(InputComponent, "PushToTalk", IE_Pressed, &APlayerController::StartTalking);
BIND_ACTION(InputComponent, "PushToTalk", IE_Released, &APlayerController::StopTalking);
}
BIND_ACTION I get, along with InputComponent, but the string that follows is what confuses me.
Where is this function created?
Also, what is IE_Pressed and IE_Released? For whatever reason, I can’t navigate to this code. (It’s obviously a .cpp, part of hidden source). I know that it means to check as though a key were pressed or released, but what is the “E”? Enumeration?
Finally, I see where &AShooterPlayerController::OnToggleInGameMenu is defined in ShooterControllerPlayer, so I get that it is being called each time the button tied to “InGameMenu” is pressed.
But where is "InGameMenu" being tied?
Are there any docs for inputs?