Skip to content

Commit

Permalink
Add "Engine: ..." row to playbacktab/Replays's battle info. This also…
Browse files Browse the repository at this point in the history
… makes the player list larger and thus fixes #600.
  • Loading branch information
specing committed Sep 5, 2018
1 parent feeae18 commit b19bf62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/playback/playbacktab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ PlaybackTab::PlaybackTab(wxWindow* parent, bool replay)
m_map_text = new wxStaticText(this, wxID_ANY, wxEmptyString);
m_game_lbl = new wxStaticText(this, wxID_ANY, _("Game:"));
m_game_text = new wxStaticText(this, wxID_ANY, wxEmptyString);
m_engine_lbl = new wxStaticText(this, wxID_ANY, _("Engine:"));
m_engine_text = new wxStaticText(this, wxID_ANY, wxEmptyString);

wxFlexGridSizer* m_data_sizer = new wxFlexGridSizer(4, 2, 0, 0);
m_data_sizer->Add(m_map_lbl, 1, wxALL | wxEXPAND, 5);
Expand All @@ -66,6 +68,8 @@ PlaybackTab::PlaybackTab(wxWindow* parent, bool replay)
m_data_sizer->Add(m_game_text, 1, wxALL | wxEXPAND, 5);
m_data_sizer->Add(m_players_lbl, 1, wxALL | wxEXPAND, 5);
m_data_sizer->Add(m_players_text, 1, wxALL | wxEXPAND, 5);
m_data_sizer->Add(m_engine_lbl, 1, wxALL | wxEXPAND, 5);
m_data_sizer->Add(m_engine_text, 1, wxALL | wxEXPAND, 5);

m_players = new BattleroomDataViewCtrl("playback_battleroom_view", this, nullptr /*battle*/, true /*readonly*/, false /*show ingname status*/);

Expand Down Expand Up @@ -259,6 +263,7 @@ void PlaybackTab::OnSelect(wxDataViewEvent& event)
m_players_text->SetLabel(wxEmptyString);
m_map_text->SetLabel(TowxString(rep.battle.GetHostMapName()));
m_game_text->SetLabel(TowxString(rep.battle.GetHostGameName()));
m_engine_text->SetLabel(rep.battle.GetEngineName() + ' ' + rep.battle.GetEngineVersion());
m_minimap->SetBattle(&(rep.battle));
m_minimap->UpdateMinimap();

Expand Down Expand Up @@ -291,6 +296,7 @@ void PlaybackTab::Deselected()
m_players_text->SetLabel(wxEmptyString);
m_map_text->SetLabel(wxEmptyString);
m_game_text->SetLabel(wxEmptyString);
m_engine_text->SetLabel(wxEmptyString);
m_minimap->SetBattle(NULL);
m_minimap->UpdateMinimap();
m_minimap->Refresh();
Expand Down
2 changes: 2 additions & 0 deletions src/gui/playback/playbacktab.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class PlaybackTab : public wxPanel
PlaybackDataView* m_replay_dataview;
PlaybackLoader* m_replay_loader;
MapCtrl* m_minimap;
wxStaticText* m_engine_lbl;
wxStaticText* m_engine_text;
wxStaticText* m_map_lbl;
wxStaticText* m_map_text;
wxStaticText* m_game_lbl;
Expand Down

0 comments on commit b19bf62

Please sign in to comment.