Changed default LogFrame position.

This commit is contained in:
Oil 2014-06-05 22:17:53 +04:00
parent 49295f8eff
commit 268e2eee4c
3 changed files with 6 additions and 7 deletions

View file

@ -173,8 +173,9 @@ BEGIN_EVENT_TABLE(LogFrame, FrameBase)
EVT_CLOSE(LogFrame::OnQuit) EVT_CLOSE(LogFrame::OnQuit)
END_EVENT_TABLE() END_EVENT_TABLE()
LogFrame::LogFrame() LogFrame::LogFrame(wxWindow *parent)
: FrameBase(nullptr, wxID_ANY, "Log Frame", "LogFrame", wxSize(600, 500)) : FrameBase(nullptr, wxID_ANY, "Log Frame", "LogFrame", wxSize(600, 500),
wxPoint(parent->GetPosition().x + parent->GetSize().x, parent->GetPosition().y))
, ThreadBase("LogThread") , ThreadBase("LogThread")
, m_log(*new wxListView(this)) , m_log(*new wxListView(this))
{ {
@ -183,6 +184,7 @@ LogFrame::LogFrame()
wxMenu* menu_log_settings = new wxMenu(); wxMenu* menu_log_settings = new wxMenu();
menubar->Append(menu_log_settings, "Settings"); menubar->Append(menu_log_settings, "Settings");
menu_log_settings->Append(id_log_level, "Log Level"); menu_log_settings->Append(id_log_level, "Log Level");
SetMenuBar(menubar); SetMenuBar(menubar);
//events //events
@ -274,8 +276,6 @@ void LogFrame::Settings(wxCommandEvent& WXUNUSED(event))
} }
wxDialog diag(this, wxID_ANY, "Settings", wxDefaultPosition); wxDialog diag(this, wxID_ANY, "Settings", wxDefaultPosition);
static const u32 height = 400;
static const u32 width = 385;
wxStaticBoxSizer* s_round_log_level = new wxStaticBoxSizer(wxVERTICAL, &diag, _("Log Level")); wxStaticBoxSizer* s_round_log_level = new wxStaticBoxSizer(wxVERTICAL, &diag, _("Log Level"));
wxBoxSizer* s_panel = new wxBoxSizer(wxVERTICAL); wxBoxSizer* s_panel = new wxBoxSizer(wxVERTICAL);

View file

@ -23,7 +23,6 @@ public:
return; return;
std::string frmt = fmt::Format(fmt, std::forward<Arg>(args)...); std::string frmt = fmt::Format(fmt, std::forward<Arg>(args)...);
WriteToLog("!", frmt, 2); WriteToLog("!", frmt, 2);
} }
@ -67,7 +66,7 @@ class LogFrame
wxListView& m_log; wxListView& m_log;
public: public:
LogFrame(); LogFrame(wxWindow *parent);
~LogFrame(); ~LogFrame();
bool Close(bool force = false); bool Close(bool force = false);

View file

@ -103,7 +103,7 @@ MainFrame::MainFrame()
// Panels // Panels
m_game_viewer = new GameViewer(this); m_game_viewer = new GameViewer(this);
m_debugger_frame = new DebuggerPanel(this); m_debugger_frame = new DebuggerPanel(this);
ConLogFrame = new LogFrame; ConLogFrame = new LogFrame(this);
AddPane(m_game_viewer, "Game List", wxAUI_DOCK_BOTTOM); AddPane(m_game_viewer, "Game List", wxAUI_DOCK_BOTTOM);
AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT); AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);