| 57 | { |
| 58 | |
| 59 | MsgBoxButton msgBox(const std::string& title, const std::string& msg, MsgBoxType type, MsgBoxIcon icon) |
| 60 | { |
| 61 | const MsgBoxCustomButton buttonOk{uint32_t(MsgBoxButton::Ok), "Ok"}; |
| 62 | const MsgBoxCustomButton buttonRetry{uint32_t(MsgBoxButton::Retry), "Retry"}; |
| 63 | const MsgBoxCustomButton buttonCancel{uint32_t(MsgBoxButton::Cancel), "Cancel"}; |
| 64 | const MsgBoxCustomButton buttonAbort{uint32_t(MsgBoxButton::Abort), "Abort"}; |
| 65 | const MsgBoxCustomButton buttonIgnore{uint32_t(MsgBoxButton::Ignore), "Ignore"}; |
| 66 | const MsgBoxCustomButton buttonYes{uint32_t(MsgBoxButton::Yes), "Yes"}; |
| 67 | const MsgBoxCustomButton buttonNo{uint32_t(MsgBoxButton::No), "No"}; |
| 68 | |
| 69 | std::vector<MsgBoxCustomButton> buttons; |
| 70 | switch (type) |
| 71 | { |
| 72 | case MsgBoxType::Ok: |
| 73 | buttons = {buttonOk}; |
| 74 | break; |
| 75 | case MsgBoxType::OkCancel: |
| 76 | buttons = {buttonOk, buttonCancel}; |
| 77 | break; |
| 78 | case MsgBoxType::RetryCancel: |
| 79 | buttons = {buttonRetry, buttonCancel}; |
| 80 | break; |
| 81 | case MsgBoxType::AbortRetryIgnore: |
| 82 | buttons = {buttonAbort, buttonRetry, buttonIgnore}; |
| 83 | break; |
| 84 | case MsgBoxType::YesNo: |
| 85 | buttons = {buttonYes, buttonNo}; |
| 86 | break; |
| 87 | default: |
| 88 | FALCOR_UNREACHABLE(); |
| 89 | } |
| 90 | |
| 91 | return (MsgBoxButton)msgBox(title, msg, buttons, icon); |
| 92 | } |
| 93 | |
| 94 | uint32_t msgBox( |
| 95 | const std::string& title, |