mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-03 02:37:39 +00:00
Debug and clean the game tab code
This commit is contained in:
parent
1eb91c5926
commit
5607057ac3
9 changed files with 89 additions and 121 deletions
|
@ -19,7 +19,7 @@ BoardCanvas::BoardCanvas(wxFrame *parent)
|
|||
adata.duration=200;
|
||||
adata.duration_fast=80;
|
||||
adata.fps=30;
|
||||
|
||||
// Let GameTableLeftPanel process keyboard events:
|
||||
Bind(wxEVT_KEY_DOWN, [p=this](wxKeyEvent &e){e.ResumePropagation(1);e.Skip();});
|
||||
Bind(wxEVT_KEY_UP, [p=this](wxKeyEvent &e){e.ResumePropagation(1);e.Skip();});
|
||||
}
|
||||
|
@ -385,6 +385,7 @@ void BoardCanvas::MouseEvent(wxMouseEvent &event) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Let GameTableLeftPanel process mouse wheel events:
|
||||
if (event.GetWheelRotation() != 0) {
|
||||
event.ResumePropagation(1);event.Skip();
|
||||
}
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
// Local events
|
||||
wxDECLARE_EVENT(PLAY_MOVE_EVENT, wxCommandEvent);
|
||||
|
||||
// Foreign events
|
||||
wxDECLARE_EVENT(PREVIOUS_MOVE_EVENT, wxCommandEvent);
|
||||
wxDECLARE_EVENT(NEXT_MOVE_EVENT, wxCommandEvent);
|
||||
|
||||
#define REFRESH_MOUSE_LOCATION() \
|
||||
{ \
|
||||
const wxPoint pt = wxGetMousePosition(); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue