mirror of https://github.com/PCSX2/pcsx2.git
gui: Make Msgbox more consistent
Just use ShowModal. That will invoke pxMessageDialog on the main thread anyway.
This commit is contained in:
parent
2a4bd85f53
commit
9a171a5928
|
@ -181,30 +181,12 @@ namespace Msgbox
|
||||||
// true if OK, false if cancel.
|
// true if OK, false if cancel.
|
||||||
bool OkCancel( const wxString& text, const wxString& caption, int icon )
|
bool OkCancel( const wxString& text, const wxString& caption, int icon )
|
||||||
{
|
{
|
||||||
MsgButtons buttons( MsgButtons().OKCancel() );
|
return ShowModal(caption, text, MsgButtons().OKCancel()) == wxID_OK;
|
||||||
|
|
||||||
if( wxThread::IsMain() )
|
|
||||||
{
|
|
||||||
return wxID_OK == pxMessageDialog( caption, text, buttons );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return wxID_OK == ShowModal( caption, text, buttons );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool YesNo( const wxString& text, const wxString& caption, int icon )
|
bool YesNo( const wxString& text, const wxString& caption, int icon )
|
||||||
{
|
{
|
||||||
MsgButtons buttons( MsgButtons().YesNo() );
|
return ShowModal(caption, text, MsgButtons().YesNo()) == wxID_YES;
|
||||||
|
|
||||||
if( wxThread::IsMain() )
|
|
||||||
{
|
|
||||||
return wxID_YES == pxMessageDialog( caption, text, buttons );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return wxID_YES == ShowModal( caption, text, buttons );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Assertion( const wxString& text, const wxString& stacktrace )
|
int Assertion( const wxString& text, const wxString& stacktrace )
|
||||||
|
|
Loading…
Reference in New Issue