From 085fd8ea4668e8a4b34a861805f628da826cf02c Mon Sep 17 00:00:00 2001 From: baz Date: Tue, 14 Nov 2023 22:53:32 +0000 Subject: [PATCH] Show options menu when pressing options button in main menu --- Content/UI/MainMenu/MainMenuUIWidget.uasset | 4 ++-- Source/Nakatomi/MainMenuUIWidget.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content/UI/MainMenu/MainMenuUIWidget.uasset b/Content/UI/MainMenu/MainMenuUIWidget.uasset index 910610f..80d2361 100644 --- a/Content/UI/MainMenu/MainMenuUIWidget.uasset +++ b/Content/UI/MainMenu/MainMenuUIWidget.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:801f53c5a1189e7baa8aa7d89854c7a060d1e980a761cc67085f0d07fe7a3b23 -size 35341 +oid sha256:411aaadcd0daeaa58eee1562d0d5b1b51e904106bd94cdbce13a7405d53c597c +size 35460 diff --git a/Source/Nakatomi/MainMenuUIWidget.cpp b/Source/Nakatomi/MainMenuUIWidget.cpp index 0263dca..5f5a9cc 100644 --- a/Source/Nakatomi/MainMenuUIWidget.cpp +++ b/Source/Nakatomi/MainMenuUIWidget.cpp @@ -40,7 +40,13 @@ void UMainMenuUIWidget::LoadGameButtonOnClicked() void UMainMenuUIWidget::OptionsButtonOnClicked() { - // TODO: Implement Functionality + if (OptionsMenuWidget) + { + currentOptionsMenuWidget = CreateWidget(GetWorld(), OptionsMenuWidget); + currentOptionsMenuWidget->AddToViewport(); + currentOptionsMenuWidget->SetReturnScreen(this); + this->RemoveFromParent(); + } } void UMainMenuUIWidget::QuitButtonOnClicked()