mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-11 22:37:40 +00:00
Implement pieces move animations
This commit is contained in:
parent
7187e6d6ee
commit
3efabf1c33
10 changed files with 160 additions and 53 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue