diff --git a/ReadMe.md b/ReadMe.md index 22814a4..643e4f0 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -70,28 +70,11 @@ you can tap into anywhere in Blueprints by searching for it: ![Game Instance Subsystem](./Resources/gameinstance.png) -Once you have access to this you can do things like tie events into the input mode -changing: +Once you have access to this you can do things like get the latest input device used: -![Game Instance Subsystem](./Resources/bpexample.png) - -To access this in C++, just do this: - -```c++ -#include "StevesUEHelpers.h" - -... -auto GS = GetStevesGameSubsystem(GetWorld()); -if (GS) -{ - // get current mode (first player assumed) - EInputMode CurrentInputMode = GS->GetLastInputModeUsed(); - // Subscribe to input mode changes (remember this must be a UFUNCTION) - GS->OnInputModeChanged.AddUniqueDynamic(this, &AMyActor::OnInputModeChanged); -} - -``` +![Game Instance Subsystem](./Resources/lastinput.png) +For more details, see the [Input section](doc/Input.md). # License diff --git a/Resources/bpexample.png b/Resources/bpexample.png deleted file mode 100644 index 44199bb..0000000 Binary files a/Resources/bpexample.png and /dev/null differ diff --git a/Resources/gameinstance.png b/Resources/gameinstance.png index 508b110..e721c21 100644 Binary files a/Resources/gameinstance.png and b/Resources/gameinstance.png differ diff --git a/Resources/inputchangeevent.png b/Resources/inputchangeevent.png new file mode 100644 index 0000000..b05c5dc Binary files /dev/null and b/Resources/inputchangeevent.png differ diff --git a/Resources/lastinput.png b/Resources/lastinput.png index 1760ab8..188441f 100644 Binary files a/Resources/lastinput.png and b/Resources/lastinput.png differ diff --git a/doc/Input.md b/doc/Input.md index 53b9565..59f00d0 100644 --- a/doc/Input.md +++ b/doc/Input.md @@ -34,7 +34,7 @@ EInputMode Mode = GS->GetLastInputModeUsed(PlayerIndex); Blueprint: -![Game Instance Subsystem](../Resources/bpexample.png) +![Game Instance Subsystem](../Resources/inputchangeevent.png) C++: