]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for cube sample from Paul Thiessen
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Oct 2001 16:37:33 +0000 (16:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Oct 2001 16:37:33 +0000 (16:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/opengl/cube/cube.cpp
samples/opengl/cube/cube.h

index a92f940d292dc0edac4f60f7f76d6a2d1b24042c..886bbe12faa7c4f08fe784effaadaf46a6c59825 100644 (file)
@@ -365,10 +365,7 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event )
 
     unsigned long currTime = event.m_timeStamp - m_xsynct;
 
-    // we have to test for m_Key != 0 because otherwise the test would be
-    // always true because it is set to 0 in OnKeyUp() below - I don't know
-    // why is it like this, just fixing blindly (VZ)
-    if (evkey != m_Key && m_Key != 0)
+    if (evkey != m_Key)
     {
         m_Key = evkey;
         m_LastRedraw = m_StartTime = m_LastTime = currTime;
@@ -430,7 +427,7 @@ void MyFrame::OnExit(wxCommandEvent& event)
     Destroy();
 }
 
-void MyFrame::OnNewWindow()
+void MyFrame::OnNewWindow(wxCommandEvent& event)
 {
   MyFrame *frame = new MyFrame(NULL, "Cube OpenGL Demo Clone",
                                wxPoint(50, 50), wxSize(400, 300));
@@ -461,7 +458,7 @@ void MyFrame::OnNewWindow()
   frame->Show(TRUE);
 }
 
-void MyFrame::OnDefRotateLeftKey()
+void MyFrame::OnDefRotateLeftKey(wxCommandEvent& event)
 {
   ScanCodeDialog dial( this, -1, m_canvas->m_rleft,
                        wxString("Left"), "Define key" );
@@ -469,7 +466,7 @@ void MyFrame::OnDefRotateLeftKey()
   if( result == wxID_OK )
     m_canvas->m_rleft = dial.GetValue();
 }
-void MyFrame::OnDefRotateRightKey()
+void MyFrame::OnDefRotateRightKey(wxCommandEvent& event)
 {
   ScanCodeDialog dial( this, -1, m_canvas->m_rright,
                        wxString("Right"), "Define key" );
index 66732f2453e5eb7339fe9156d35cc78a4cd78d86..b7af99ee0e013048b2b112e0de703d6bad6c5fe1 100644 (file)
@@ -30,9 +30,9 @@ public:
             const wxSize& size, long style = wxDEFAULT_FRAME_STYLE);
 
     void OnExit(wxCommandEvent& event);
-    void OnNewWindow();
-    void OnDefRotateLeftKey();
-    void OnDefRotateRightKey();
+    void OnNewWindow(wxCommandEvent& event);
+    void OnDefRotateLeftKey(wxCommandEvent& event);
+    void OnDefRotateRightKey(wxCommandEvent& event);
     
 public:
     TestGLCanvas*    m_canvas;