Utility class for simple message boxes to be delivered to the user through the host environment.
More...
#include <donut/events/MessageBox.hpp>
|
| MessageBox ()=delete |
| Message box objects are not intended to be constructed directly. More...
|
|
|
static void | show (Type type, const char *title, const char *message) |
| Display a simple message box that blocks execution on the current thread until the user presses OK. More...
|
|
Utility class for simple message boxes to be delivered to the user through the host environment.
◆ Type
Type of message contained in a message box.
Enumerator |
---|
ERROR_MESSAGE | Indicates that an error occured.
|
WARNING_MESSAGE | Warns the user about a potential error.
|
INFO_MESSAGE | Provides general information.
|
◆ MessageBox()
donut::events::MessageBox::MessageBox |
( |
| ) |
|
|
delete |
Message box objects are not intended to be constructed directly.
◆ show()
static void donut::events::MessageBox::show |
( |
Type |
type, |
|
|
const char * |
title, |
|
|
const char * |
message |
|
) |
| |
|
static |
Display a simple message box that blocks execution on the current thread until the user presses OK.
- Parameters
-
type | type of message shown in the box. This may be reflected in the styling of the box. |
title | non-owning read-only pointer to a UTF-8 string containing the window title of the message box. Must not be nullptr. |
message | non-owning read-only pointer to a UTF-8 string containing the main message to show in the box. Must not be nullptr. |
- Exceptions
-
events::Error | on failure to show the message box. |
std::bad_alloc | on allocation failure. |
- Examples
- example_game.cpp.
The documentation for this class was generated from the following file: