Implement pieces move animations

This commit is contained in:
Loic Guegan 2022-12-29 10:08:22 +01:00
parent 7187e6d6ee
commit 3efabf1c33
10 changed files with 160 additions and 53 deletions

View file

@ -29,9 +29,9 @@ GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game
wxID_ANY);
this->Bind(SET_AS_MAINLINE_EVENT, &GameTabRightPanel::OnMoveSetAsMainline,
this, wxID_ANY);
this->Bind(NEXT_MOVE_EVENT, &GameTabRightPanel::OnNextMove, this, wxID_ANY);
/*this->Bind(NEXT_MOVE_EVENT, &GameTabRightPanel::OnNextMove, this, wxID_ANY);
this->Bind(PREVIOUS_MOVE_EVENT, &GameTabRightPanel::OnPreviousMove, this,
wxID_ANY);
wxID_ANY);*/
this->Bind(wxEVT_LIST_ITEM_SELECTED, &GameTabRightPanel::OnTagSelected, this,
wxID_ANY);
this->Bind(wxEVT_LIST_ITEM_DESELECTED, &GameTabRightPanel::OnTagDeselected,

View file

@ -173,7 +173,7 @@ void EditorCanvas::SetMoves(HalfMove *moves, HalfMove *current) {
}
void EditorCanvas::OnKeyEvent(wxKeyEvent &event) {
if (event.GetKeyCode() == WXK_LEFT) {
/*if (event.GetKeyCode() == WXK_LEFT) {
wxCommandEvent previousEvent(PREVIOUS_MOVE_EVENT, GetId());
previousEvent.SetEventObject(this);
ProcessEvent(previousEvent);
@ -181,7 +181,7 @@ void EditorCanvas::OnKeyEvent(wxKeyEvent &event) {
wxCommandEvent nextEvent(NEXT_MOVE_EVENT, GetId());
nextEvent.SetEventObject(this);
ProcessEvent(nextEvent);
}
}*/
}
wxBEGIN_EVENT_TABLE(EditorCanvas, wxPanel) EVT_PAINT(EditorCanvas::OnPaint)