This commit was manufactured by cvs2svn to create tag 'WX_2_2_9'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_2_9@13364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,7 +44,9 @@ bool MyApp::OnInit(void)
|
||||
wxMessageBox("No joystick detected!");
|
||||
return FALSE;
|
||||
}
|
||||
#if wxUSE_WAVE
|
||||
m_fire.Create("gun.wav");
|
||||
#endif // wxUSE_WAVE
|
||||
|
||||
m_maxX = stick.GetXMax();
|
||||
m_maxY = stick.GetYMax();
|
||||
@@ -128,15 +130,17 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event)
|
||||
|
||||
char buf[100];
|
||||
if (event.ButtonDown())
|
||||
sprintf(buf, "Joystick (%ld, %ld) Fire!", pt.x, pt.y);
|
||||
sprintf(buf, "Joystick (%d, %d) Fire!", pt.x, pt.y);
|
||||
else
|
||||
sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y);
|
||||
sprintf(buf, "Joystick (%d, %d)", pt.x, pt.y);
|
||||
frame->SetStatusText(buf);
|
||||
|
||||
#if wxUSE_WAVE
|
||||
if (event.ButtonDown() && wxGetApp().m_fire.IsOk())
|
||||
{
|
||||
wxGetApp().m_fire.Play();
|
||||
}
|
||||
#endif // wxUSE_WAVE
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
|
Reference in New Issue
Block a user