How to create a Confirm Dialog Message

Greetings all,

Just want to know if there is a way to code a UI in Unreal from Blueprint or somethng else in Unreal ?

Let’s say we are in game and the player press Quit button for quite the game. So i want the program ask the player: “Are you sure you want to quit?” with the option “Yes” and “No” buttons/options.

Thank you for your attention.

Greetings.

Phil

Hi Mate

Made this recently. I do this in a BP, so I reference the Widget first.

Like this.

Narg

Don’t know if you’ve solved this yet, but I solved this using widgets. You can have a Vertical box (or Horizontal box) that gets toggled when the “Quit Game” button is pressed by changing its visibility.

Here’s the utility function I’ve to show message boxes in Unreal:

EAppReturnType::Type UAirBlueprintLib::ShowMessage(EAppMsgType::Type message_type, const std::string& message, const std::string& title)
{
    FText title_text = FText::FromString(title.c_str());

    return FMessageDialog::Open(message_type,
        FText::FromString(message.c_str()),
        &title_text);
}