updated njoy so it now shows it's beautiful aboutbox too.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@790 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2008-10-07 19:29:30 +00:00
parent d11f42c329
commit 26552968b7
3 changed files with 26 additions and 22 deletions

View File

@ -47,6 +47,7 @@ static const char* ControllerType[] =
BEGIN_EVENT_TABLE(ConfigBox,wxDialog)
EVT_CLOSE(ConfigBox::OnClose)
EVT_BUTTON(ID_ABOUT, ConfigBox::AboutClick)
EVT_BUTTON(ID_OK, ConfigBox::OKClick)
EVT_BUTTON(ID_CANCEL, ConfigBox::CancelClick)
EVT_COMBOBOX(IDC_JOYNAME, ConfigBox::ChangeJoystick)
@ -105,6 +106,7 @@ void ConfigBox::CreateGUIControls()
#endif
// Buttons
m_About = new wxButton(this, ID_ABOUT, wxT("About"), wxPoint(0, 497), wxSize(75, 25), 0, wxDefaultValidator, wxT("About"));
m_OK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(475, 497), wxSize(75, 25), 0, wxDefaultValidator, wxT("OK"));
m_Cancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(556, 497), wxSize(75, 25), 0, wxDefaultValidator, wxT("Cancel"));
@ -278,6 +280,26 @@ void ConfigBox::OnClose(wxCloseEvent& /*event*/)
EndModal(0);
}
void ConfigBox::AboutClick(wxCommandEvent& event)
{
// Call about dialog
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
#ifdef _WIN32
wxWindow win;
win.SetHWND((WXHWND)this->GetHWND());
win.Enable(false);
AboutBox frame(&win);
frame.ShowModal();
win.Enable(true);
win.SetHWND(0);
#else
AboutBox frame(NULL);
frame.ShowModal();
#endif
}
void ConfigBox::OKClick(wxCommandEvent& event)
{
if (event.GetId() == ID_OK)

View File

@ -59,6 +59,7 @@ class ConfigBox : public wxDialog
virtual ~ConfigBox();
private:
wxButton *m_About;
wxButton *m_OK;
wxButton *m_Cancel;
@ -136,7 +137,8 @@ class ConfigBox : public wxDialog
private:
enum
{
ID_OK = 1000,
ID_ABOUT = 1000,
ID_OK,
ID_CANCEL,
ID_NOTEBOOK,
ID_CONTROLLERPAGE1,
@ -212,6 +214,7 @@ class ConfigBox : public wxDialog
};
private:
void AboutClick(wxCommandEvent& event);
void OKClick(wxCommandEvent& event);
void CancelClick(wxCommandEvent& event);

View File

@ -149,27 +149,6 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
#endif
}
// Call about dialog
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void DllAbout(HWND _hParent)
{
#ifdef _WIN32
wxWindow win;
win.SetHWND((WXHWND)_hParent);
win.Enable(false);
AboutBox frame(&win);
frame.ShowModal();
win.Enable(true);
win.SetHWND(0);
#else
AboutBox frame(NULL);
frame.ShowModal();
#endif
}
// Call config dialog
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void DllConfig(HWND _hParent)