diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-26 20:34:42 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-26 20:34:42 +0100 |
| commit | e601902dd5a9f023594fef6a0f4995e59b4d9a0e (patch) | |
| tree | 4ed1fdbaa9503a2dcfbc701377d9f5d2309858c3 /src/game_tab/editor | |
| parent | ca6c1b1e75e771e3bea596367e502b77dea2c3aa (diff) | |
Improve engine managemen
Diffstat (limited to 'src/game_tab/editor')
| -rw-r--r-- | src/game_tab/editor/EditorPanel.cpp | 11 | ||||
| -rw-r--r-- | src/game_tab/editor/EditorPanelBF.cpp | 2 | ||||
| -rw-r--r-- | src/game_tab/editor/EditorPanelBF.h | 3 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/game_tab/editor/EditorPanel.cpp b/src/game_tab/editor/EditorPanel.cpp index 641448e..3e6a7db 100644 --- a/src/game_tab/editor/EditorPanel.cpp +++ b/src/game_tab/editor/EditorPanel.cpp @@ -15,6 +15,17 @@ EditorPanel::EditorPanel(wxFrame *parent, Game *game) tags_list->InsertColumn(1, L"Value", wxLIST_FORMAT_LEFT, 500); tagTextCtrl->SetHint("Tag"); valueTextCtrl->SetHint("Value"); + CONFIG_OPEN(conf); + conf->SetPath("engines/"); + wxString engine_name; + long index; + if (conf->GetFirstGroup(engine_name, index)) { + do { + engine_list->Append(engine_name); + } while (conf->GetNextGroup(engine_name, index)); + } + + CONFIG_CLOSE(conf); RefreshTagsList(); // Bind events diff --git a/src/game_tab/editor/EditorPanelBF.cpp b/src/game_tab/editor/EditorPanelBF.cpp index f74ef64..8aac38e 100644 --- a/src/game_tab/editor/EditorPanelBF.cpp +++ b/src/game_tab/editor/EditorPanelBF.cpp @@ -82,7 +82,7 @@ EditorPanelBF::EditorPanelBF( wxWindow* parent, wxWindowID id, const wxPoint& po engine_list_label->Wrap( -1 ); engine_page_sizer->Add( engine_list_label, 0, wxALL, 5 ); - engine_list = new wxListCtrl( engine_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ICON ); + engine_list = new wxListBox( engine_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); engine_page_sizer->Add( engine_list, 1, wxALL|wxEXPAND, 5 ); analyze_game_button = new wxButton( engine_page, wxID_ANY, wxT("Analyze game"), wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/src/game_tab/editor/EditorPanelBF.h b/src/game_tab/editor/EditorPanelBF.h index 092d750..c5b38d5 100644 --- a/src/game_tab/editor/EditorPanelBF.h +++ b/src/game_tab/editor/EditorPanelBF.h @@ -24,6 +24,7 @@ #include <wx/icon.h> #include <wx/button.h> #include <wx/listctrl.h> +#include <wx/listbox.h> #include <wx/notebook.h> /////////////////////////////////////////////////////////////////////////// @@ -55,7 +56,7 @@ class EditorPanelBF : public wxPanel wxButton* delete_button; wxPanel* engine_page; wxStaticText* engine_list_label; - wxListCtrl* engine_list; + wxListBox* engine_list; wxButton* analyze_game_button; wxButton* live_analysis_button; |
