2014-06-01 17:55:23 +00:00
|
|
|
/*
|
2018-09-02 00:57:29 +00:00
|
|
|
* This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>.
|
2014-06-01 17:55:23 +00:00
|
|
|
* It is copyright by its individual contributors, as recorded in the
|
|
|
|
* project's Git history. See COPYING.txt at the top level for license
|
|
|
|
* terms and a link to the Git history.
|
|
|
|
*/
|
2010-11-28 12:02:38 +00:00
|
|
|
/*
|
|
|
|
* messagebox.h
|
|
|
|
* d1x-rebirth
|
|
|
|
*
|
|
|
|
* Display an error or warning messagebox using the OS's window server.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-12-05 22:57:24 +00:00
|
|
|
#pragma once
|
2010-11-28 12:02:38 +00:00
|
|
|
|
2022-09-24 17:47:53 +00:00
|
|
|
#include <span>
|
|
|
|
|
2015-12-13 18:00:49 +00:00
|
|
|
namespace dcx {
|
2012-11-11 22:12:51 +00:00
|
|
|
|
2018-12-30 00:43:58 +00:00
|
|
|
#if defined(WIN32) || defined(__APPLE__) || defined(__MACH__)
|
2010-11-28 12:02:38 +00:00
|
|
|
// Display a warning in a messagebox
|
2022-09-24 17:47:53 +00:00
|
|
|
void msgbox_warning(std::span<const char> message);
|
2010-11-28 12:02:38 +00:00
|
|
|
|
|
|
|
// Display an error in a messagebox
|
2013-06-23 21:18:48 +00:00
|
|
|
extern void msgbox_error(const char *message);
|
2017-08-11 23:43:52 +00:00
|
|
|
#else
|
|
|
|
#define msgbox_error(M) (static_cast<void>(M))
|
|
|
|
#endif
|
2010-11-28 12:02:38 +00:00
|
|
|
|
2015-12-05 22:57:24 +00:00
|
|
|
}
|