2 #ifndef ENIGMA_DIALOG_UTILS_H
3 #define ENIGMA_DIALOG_UTILS_H
18 static Enigma::MessageBox::Action
Error(
const std::string& title,
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Ok) {
19 const auto msgbox = std::make_unique<Enigma::MessageBox>(
22 Enigma::MessageBox::Icon::Error,
24 return msgbox->Show();
27 static Enigma::MessageBox::Action
Error(
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Ok) {
28 const auto msgbox = std::make_unique<Enigma::MessageBox>(
31 Enigma::MessageBox::Icon::Error,
33 return msgbox->Show();
36 static Enigma::MessageBox::Action
Warn(
const std::string& title,
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Ok) {
37 const auto msgbox = std::make_unique<Enigma::MessageBox>(
40 Enigma::MessageBox::Icon::Warning,
42 return msgbox->Show();
45 static Enigma::MessageBox::Action
Warn(
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Ok) {
46 const auto msgbox = std::make_unique<Enigma::MessageBox>(
49 Enigma::MessageBox::Icon::Warning,
51 return msgbox->Show();
54 static Enigma::MessageBox::Action
Question(
const std::string& title,
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Yes_No) {
55 const auto msgbox = std::make_unique<Enigma::MessageBox>(
58 Enigma::MessageBox::Icon::Question,
60 return msgbox->Show();
63 static Enigma::MessageBox::Action
Question(
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Yes_No) {
64 const auto msgbox = std::make_unique<Enigma::MessageBox>(
67 Enigma::MessageBox::Icon::Question,
69 return msgbox->Show();
72 static Enigma::MessageBox::Action
Info(
const std::string& title,
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Ok) {
73 const auto msgbox = std::make_unique<Enigma::MessageBox>(
76 Enigma::MessageBox::Icon::Info,
78 return msgbox->Show();
81 static Enigma::MessageBox::Action
Info(
const std::string& message,
const Enigma::MessageBox::Choice choice = Enigma::MessageBox::Choice::Ok) {
82 const auto msgbox = std::make_unique<Enigma::MessageBox>(
85 Enigma::MessageBox::Icon::Info,
87 return msgbox->Show();
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
static Enigma::MessageBox::Action Info(const std::string &title, const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Ok)
static Enigma::MessageBox::Action Info(const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Ok)
static Enigma::MessageBox::Action Warn(const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Ok)
static Enigma::MessageBox::Action Question(const std::string &title, const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Yes_No)
static Enigma::MessageBox::Action Error(const std::string &title, const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Ok)
static Enigma::MessageBox::Action Question(const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Yes_No)
static Enigma::MessageBox::Action Warn(const std::string &title, const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Ok)
static Enigma::MessageBox::Action Error(const std::string &message, const Enigma::MessageBox::Choice choice=Enigma::MessageBox::Choice::Ok)