diff options
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(); |
