aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/board
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-01 12:15:08 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-01 12:15:08 +0100
commit5607057ac33ce3b6933697134b20d7ef0b1a43be (patch)
tree7a295be61805c2c7b8fe7c1c69aba08f20db919c /src/game_tab/left_panel/board
parent1eb91c592627041749d5f66ff9edbb95253bc5f4 (diff)
Debug and clean the game tab code
Diffstat (limited to 'src/game_tab/left_panel/board')
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.cpp3
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.hpp4
2 files changed, 2 insertions, 5 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.cpp b/src/game_tab/left_panel/board/BoardCanvas.cpp
index 386d593..7f2c38d 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.cpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.cpp
@@ -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();
}
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp
index 0ed18a7..30f0d06 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.hpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.hpp
@@ -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(); \