diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-27 19:55:30 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-27 19:55:30 +0100 |
| commit | 175ce5e10859e2831b0e49a4bf768a9217305d8f (patch) | |
| tree | 3c40c98231bc17be17366b67f8407427c9c5e01c /src/game_tab/editor/EditorPanel.cpp | |
| parent | 3cdb25e54654adcf007c2132fb20114f56c4ae4d (diff) | |
Debug live engine dialog
Diffstat (limited to 'src/game_tab/editor/EditorPanel.cpp')
| -rw-r--r-- | src/game_tab/editor/EditorPanel.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game_tab/editor/EditorPanel.cpp b/src/game_tab/editor/EditorPanel.cpp index dfbb35f..b29477a 100644 --- a/src/game_tab/editor/EditorPanel.cpp +++ b/src/game_tab/editor/EditorPanel.cpp @@ -39,9 +39,21 @@ EditorPanel::EditorPanel(wxFrame *parent, Game *game) wxID_ANY); this->Bind(wxEVT_BUTTON, &EditorPanel::OnApply, this, UPDATE_BTN); this->Bind(wxEVT_BUTTON, &EditorPanel::OnDelete, this, DELETE_BTN); + this->Bind(wxEVT_BUTTON, &EditorPanel::OnLiveAnalysis, this, + LIVE_ANALYSIS_GAME_BUTTON); + ApplyPreferences(); } +void EditorPanel::OnLiveAnalysis(wxCommandEvent &event) { + int selection = engine_list->GetSelection(); + if (selection != wxNOT_FOUND) { + LiveEngineDialog *diag = new LiveEngineDialog(this, engine_list->GetString(selection).ToStdString()); + diag->SetFEN("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"); + diag->Show(); + } +} + void EditorPanel::OnTagSelected(wxListEvent &event) { wxListItem item = event.GetItem(); std::string key = item.GetText().ToStdString(); |
