KF2-YetAnotherScoreboard/YAS/Classes/KF2GUIInput.uc

62 lines
1.3 KiB
Ucode
Raw Normal View History

2020-01-10 13:14:11 +00:00
// Input while in a menu.
class KF2GUIInput extends KFPlayerInput;
var KF2GUIController ControllerOwner;
var PlayerInput BaseInput;
2021-06-13 03:00:19 +00:00
function DrawHUD(HUD H)
2020-01-10 13:14:11 +00:00
{
//ControllerOwner.RenderMenu(H.Canvas);
2020-01-10 13:14:11 +00:00
}
2021-06-13 03:00:19 +00:00
function PostRender(Canvas Canvas)
2020-01-10 13:14:11 +00:00
{
2021-06-13 02:53:33 +00:00
if (ControllerOwner.bIsInMenuState)
ControllerOwner.HandleDrawMenu();
//ControllerOwner.RenderMenu(Canvas);
2020-01-10 13:14:11 +00:00
}
// Postprocess the player's input.
2021-06-13 03:00:19 +00:00
function PlayerInput(float DeltaTime)
2020-01-10 13:14:11 +00:00
{
// Do not move.
ControllerOwner.MenuInput(DeltaTime);
2021-06-13 02:53:33 +00:00
if (!ControllerOwner.bAbsorbInput)
{
aMouseX = 0;
aMouseY = 0;
aBaseX = BaseInput.aBaseX;
aBaseY = BaseInput.aBaseY;
aBaseZ = BaseInput.aBaseZ;
aForward = BaseInput.aForward;
aTurn = BaseInput.aTurn;
aStrafe = BaseInput.aStrafe;
aUp = BaseInput.aUp;
aLookUp = BaseInput.aLookUp;
Super.PlayerInput(DeltaTime);
}
else
{
aMouseX = 0;
aMouseY = 0;
aBaseX = 0;
aBaseY = 0;
aBaseZ = 0;
aForward = 0;
aTurn = 0;
aStrafe = 0;
aUp = 0;
aLookUp = 0;
}
2020-01-10 13:14:11 +00:00
}
2021-06-13 03:00:19 +00:00
function PreClientTravel(string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel)
2020-01-10 13:14:11 +00:00
{
`Log("PreClientTravel"@PendingURL@TravelType@bIsSeamlessTravel);
2021-06-13 02:54:35 +00:00
ControllerOwner.BackupInput.PreClientTravel(PendingURL, TravelType, bIsSeamlessTravel); // Let original mod do stuff too!
ControllerOwner.NotifyLevelChange(); // Close menu NOW!
2020-01-10 13:14:11 +00:00
}
defaultproperties
{
}