mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-30 15:17:27 +00:00
39 lines
913 B
C++
39 lines
913 B
C++
#include "stdafx.h"
|
|
#include "restore_new.h"
|
|
#pragma warning(push)
|
|
#pragma message("TODO: remove wx dependency: <wx/msgdlg.h>")
|
|
#pragma warning(disable : 4996)
|
|
#include <wx/msgdlg.h>
|
|
#pragma warning(pop)
|
|
#include "define_new_memleakdetect.h"
|
|
#include "rMsgBox.h"
|
|
|
|
#ifndef QT_UI
|
|
rMessageDialog::rMessageDialog(void *parent, const std::string& msg, const std::string& title , long style )
|
|
{
|
|
handle = reinterpret_cast<void*>(new wxMessageDialog(
|
|
reinterpret_cast<wxWindow*>(parent)
|
|
, fmt::FromUTF8(msg)
|
|
, fmt::FromUTF8(title)
|
|
, style
|
|
));
|
|
}
|
|
|
|
rMessageDialog::~rMessageDialog()
|
|
{
|
|
delete reinterpret_cast<wxMessageDialog*>(handle);
|
|
}
|
|
|
|
long rMessageDialog::ShowModal()
|
|
{
|
|
return reinterpret_cast<wxMessageDialog*>(handle)->ShowModal();
|
|
}
|
|
|
|
long rMessageBox(const std::string& message, const std::string& title, long style)
|
|
{
|
|
return wxMessageBox(fmt::FromUTF8(message), fmt::FromUTF8(title),style);
|
|
}
|
|
|
|
#endif
|
|
|