diff options
Diffstat (limited to 'src/game_tab/left_panel/GameTabLeftPanel.cpp')
| -rw-r--r-- | src/game_tab/left_panel/GameTabLeftPanel.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp index bc33d33..d4c415d 100644 --- a/src/game_tab/left_panel/GameTabLeftPanel.cpp +++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp @@ -13,13 +13,15 @@ GameTabLeftPanel::GameTabLeftPanel(wxFrame *parent, Game *game) zoomin_button->SetBitmapLabel(LoadPNG("zoomin")); zoomout_button->SetBitmapLabel(LoadPNG("zoomout")); + // Configure FEN field + fen_text_field->SetFont(wxFont(*wxSMALL_FONT).Bold()); + Bind(PLAY_MOVE_EVENT, &GameTabLeftPanel::OnPlay, this, wxID_ANY); Bind(PREVIOUS_MOVE_EVENT, &GameTabLeftPanel::OnPreviousMove, this, wxID_ANY); Bind(NEXT_MOVE_EVENT, &GameTabLeftPanel::OnNextMove, this, wxID_ANY); Bind(wxEVT_BUTTON, &GameTabLeftPanel::OnSwap, this, SWAP_BTN); Bind(wxEVT_BUTTON, &GameTabLeftPanel::OnZoomIn, this, ZOOM_IN_BTN); Bind(wxEVT_BUTTON, &GameTabLeftPanel::OnZoomOut, this, ZOOM_OUT_BTN); - Bind(wxEVT_BUTTON, &GameTabLeftPanel::OnCopyFEN, this, COPY_FEN_BTN); } void GameTabLeftPanel::OnPreviousMove(wxCommandEvent &event) { @@ -58,14 +60,6 @@ void GameTabLeftPanel::OnPlay(wxCommandEvent &event) { Notify(); } -void GameTabLeftPanel::OnCopyFEN(wxCommandEvent &event) { - wxLogDebug("Clicked on copy fen"); - if (wxTheClipboard->Open()) { - wxTheClipboard->SetData(new wxTextDataObject(game->GetFen())); - wxTheClipboard->Close(); - } -} - void GameTabLeftPanel::Notify() { std::string fen = game->GetFen(); std::map<char, std::uint8_t> captures; @@ -75,6 +69,7 @@ void GameTabLeftPanel::Notify() { } board_canvas->SetupBoard(chessarbiter::FENParser::Parse(fen).board, game->IsBlackToPlay(), captures); + fen_text_field->SetValue(game->GetFen()); } void GameTabLeftPanel::NotifyEditor() { |
