Bugfix Pause Menu not Focusing upon Construction
This commit is contained in:
parent
543c20ea51
commit
50d017caa5
@ -9,13 +9,11 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/Tabs/WBP_BountiesTab.uasset" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/Dialogue/BP_DialogueUI.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/Dialogue/BP_DialogueUI.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/WBP_PauseMenu.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Props/MaterialSphere.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Props/MaterialSphere.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/BountiesTab.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/BountiesTab.h" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -135,7 +133,7 @@
|
||||
<workItem from="1707046474738" duration="8878000" />
|
||||
<workItem from="1707103463352" duration="6662000" />
|
||||
<workItem from="1707304148719" duration="10277000" />
|
||||
<workItem from="1707409116575" duration="3559000" />
|
||||
<workItem from="1707409116575" duration="8922000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
BIN
EndlessVendetta/Content/Dialogue/BP_DialogueUI.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Dialogue/BP_DialogueUI.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/PauseMenu/WBP_PauseMenu.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Props/MaterialSphere.uasset
(Stored with Git LFS)
Binary file not shown.
@ -127,21 +127,24 @@ void ABountyHunterCharacter::CreatePauseMenuTabs()
|
||||
void ABountyHunterCharacter::TogglePauseMenu()
|
||||
{
|
||||
const bool bOpenNewPauseMenu = !IsValid(PauseMenu);
|
||||
FInputModeUIOnly UIOnly;
|
||||
FInputModeGameAndUI UIAndGameOnly;
|
||||
FInputModeGameOnly GameOnly;
|
||||
APlayerController* PC = Cast<APlayerController>(GetController());
|
||||
|
||||
|
||||
InPauseMenu = bOpenNewPauseMenu;
|
||||
|
||||
bOpenNewPauseMenu ? PC->SetInputMode(UIAndGameOnly) : PC->SetInputMode(GameOnly);
|
||||
PC->SetIgnoreMoveInput(bOpenNewPauseMenu);
|
||||
PC->SetIgnoreLookInput(bOpenNewPauseMenu);
|
||||
PC->SetShowMouseCursor(bOpenNewPauseMenu);
|
||||
|
||||
if (!bOpenNewPauseMenu)
|
||||
{
|
||||
PauseMenu->RemoveFromParent();
|
||||
PauseMenu = nullptr;
|
||||
return;
|
||||
}
|
||||
PauseMenu = CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass);
|
||||
PauseMenu = CreateWidget<UPauseMenuClass>(GetWorld(), PauseMenuWidgetClass, FName("PauseMenu"));
|
||||
PauseMenu->AddToViewport(50);
|
||||
PauseMenu->OpenNewTab(BountiesTab);
|
||||
PauseMenu->OpenedBountiesTab.AddDynamic(this, &ABountyHunterCharacter::OpenBountiesTab);
|
||||
@ -149,6 +152,8 @@ void ABountyHunterCharacter::TogglePauseMenu()
|
||||
PauseMenu->OpenedNavigationTab.AddDynamic(this, &ABountyHunterCharacter::OpenNavigationTab);
|
||||
PauseMenu->OpenedSettingsTab.AddDynamic(this, &ABountyHunterCharacter::OpenSettingsTab);
|
||||
PauseMenu->OpenedQuitTab.AddDynamic(this, &ABountyHunterCharacter::OpenQuitTab);
|
||||
PauseMenu->SetVisibility(ESlateVisibility::Visible);
|
||||
PauseMenu->SetFocus();
|
||||
}
|
||||
|
||||
void ABountyHunterCharacter::ReturnToOpenWorldEarly()
|
||||
|
Loading…
Reference in New Issue
Block a user