MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / msgBox

Function msgBox

Source/Falcor/Core/Platform/Windows/Windows.cpp:59–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57{
58
59MsgBoxButton 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
94uint32_t msgBox(
95 const std::string& title,

Callers

nothing calls this directly

Calls 8

splitStringFunction · 0.85
frontMethod · 0.80
backMethod · 0.80
maxFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected