aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/editor
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-27 16:29:14 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-27 16:29:14 +0100
commit0e18d4ac8718414fd6192cc2983b7cd44f5fd28a (patch)
tree45c47dae3573e75fa98505378da9641a6936882b /src/game_tab/editor
parent5f209bd1d566adc21b061633781cbe54eb72648a (diff)
Improve live engine dialog
Diffstat (limited to 'src/game_tab/editor')
-rw-r--r--src/game_tab/editor/EditorPanel.cpp3
-rw-r--r--src/game_tab/editor/LiveEngineDialog.cpp7
-rw-r--r--src/game_tab/editor/LiveEngineDialog.hpp7
-rw-r--r--src/game_tab/editor/LiveEngineDialogFB.cpp4
-rw-r--r--src/game_tab/editor/LiveEngineDialogFB.h4
5 files changed, 21 insertions, 4 deletions
diff --git a/src/game_tab/editor/EditorPanel.cpp b/src/game_tab/editor/EditorPanel.cpp
index 892673f..31fd33c 100644
--- a/src/game_tab/editor/EditorPanel.cpp
+++ b/src/game_tab/editor/EditorPanel.cpp
@@ -1,4 +1,5 @@
#include "EditorPanel.hpp"
+#include "LiveEngineDialog.hpp"
wxDEFINE_EVENT(GOTO_MOVE_EVENT, wxCommandEvent);
wxDEFINE_EVENT(DELETE_MOVE_EVENT, wxCommandEvent);
@@ -16,6 +17,8 @@ EditorPanel::EditorPanel(wxFrame *parent, Game *game)
tagTextCtrl->SetHint("Tag");
valueTextCtrl->SetHint("Value");
+ LiveEngineDialog *diag=new LiveEngineDialog(this);
+ diag->Show();
RefreshTagsList();
// Bind events
diff --git a/src/game_tab/editor/LiveEngineDialog.cpp b/src/game_tab/editor/LiveEngineDialog.cpp
new file mode 100644
index 0000000..9c5c43c
--- /dev/null
+++ b/src/game_tab/editor/LiveEngineDialog.cpp
@@ -0,0 +1,7 @@
+#include "LiveEngineDialog.hpp"
+
+LiveEngineDialog::LiveEngineDialog(wxWindow *parent)
+ : LiveEngineDialogFB(parent) {
+ lines_list->InsertColumn(0, "#");
+ lines_list->InsertColumn(1, "Moves",wxLIST_FORMAT_LEFT, 500);
+} \ No newline at end of file
diff --git a/src/game_tab/editor/LiveEngineDialog.hpp b/src/game_tab/editor/LiveEngineDialog.hpp
new file mode 100644
index 0000000..90b1b9f
--- /dev/null
+++ b/src/game_tab/editor/LiveEngineDialog.hpp
@@ -0,0 +1,7 @@
+#include "ochess.hpp"
+#include "LiveEngineDialogFB.h"
+
+class LiveEngineDialog : public LiveEngineDialogFB {
+public:
+ LiveEngineDialog(wxWindow *parent);
+}; \ No newline at end of file
diff --git a/src/game_tab/editor/LiveEngineDialogFB.cpp b/src/game_tab/editor/LiveEngineDialogFB.cpp
index 03f9435..4d96ed4 100644
--- a/src/game_tab/editor/LiveEngineDialogFB.cpp
+++ b/src/game_tab/editor/LiveEngineDialogFB.cpp
@@ -30,8 +30,8 @@ LiveEngineDialogFB::LiveEngineDialogFB( wxWindow* parent, wxWindowID id, const w
main_sizer->Add( current_engine_sizer, 0, wxEXPAND, 5 );
- lines_list = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- main_sizer->Add( lines_list, 1, wxALL|wxEXPAND, 5 );
+ lines_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
+ main_sizer->Add( lines_list, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( main_sizer );
diff --git a/src/game_tab/editor/LiveEngineDialogFB.h b/src/game_tab/editor/LiveEngineDialogFB.h
index 10448c6..307eae1 100644
--- a/src/game_tab/editor/LiveEngineDialogFB.h
+++ b/src/game_tab/editor/LiveEngineDialogFB.h
@@ -16,7 +16,7 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
-#include <wx/listbox.h>
+#include <wx/listctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
@@ -32,7 +32,7 @@ class LiveEngineDialogFB : public wxDialog
protected:
wxStaticText* current_engine_label;
wxStaticText* current_engine;
- wxListBox* lines_list;
+ wxListCtrl* lines_list;
public: