mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 17:49:48 -06:00
GUI: Resize console and its buffer
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4090 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -525,6 +525,10 @@ CFrame::CFrame(bool showLogWindow,
|
||||
wxKeyEventHandler(CFrame::OnKeyUp),
|
||||
(wxObject*)0, this);
|
||||
|
||||
m_Mgr->Connect(wxID_ANY, wxEVT_AUI_RENDER, // Resize
|
||||
wxAuiManagerEventHandler(CFrame::OnManagerResize),
|
||||
(wxObject*)0, this);
|
||||
|
||||
#ifdef _WIN32 // The functions are only tested in Windows so far
|
||||
wxTheApp->Connect(wxID_ANY, wxEVT_LEFT_DOWN,
|
||||
wxMouseEventHandler(CFrame::OnDoubleClick),
|
||||
|
@ -123,6 +123,7 @@ class CFrame : public wxFrame
|
||||
void SetPaneSize(wxArrayInt,wxArrayInt);
|
||||
void ToggleNotebookStyle(long);
|
||||
void Save();
|
||||
void ResizeConsole();
|
||||
|
||||
private:
|
||||
|
||||
@ -224,6 +225,7 @@ class CFrame : public wxFrame
|
||||
void OnToggleDualCore(wxCommandEvent& event);
|
||||
void OnToggleSkipIdle(wxCommandEvent& event);
|
||||
void OnToggleThrottle(wxCommandEvent& event);
|
||||
void OnManagerResize(wxAuiManagerEvent& event);
|
||||
void OnResize(wxSizeEvent& event);
|
||||
void OnToggleToolbar(wxCommandEvent& event);
|
||||
void DoToggleToolbar(bool);
|
||||
|
@ -746,11 +746,30 @@ void CFrame::ToggleNotebookStyle(long Style)
|
||||
}
|
||||
}
|
||||
}
|
||||
void CFrame::ResizeConsole()
|
||||
{
|
||||
for (int i = 0; i < m_NB.size(); i++)
|
||||
{
|
||||
if (!m_NB[i]) continue;
|
||||
for(u32 j = 0; j <= m_NB[i]->GetPageCount(); j++)
|
||||
{
|
||||
if (m_NB[i]->GetPageText(j).IsSameAs(wxT("Console")))
|
||||
{
|
||||
// Get the client size
|
||||
int X = m_NB[i]->GetClientSize().GetX() - 35;
|
||||
int Y = m_NB[i]->GetClientSize().GetY() - 70;
|
||||
// Resize buffer
|
||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
||||
Console->PixelSpace(0,0, X,Y, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Miscellaneous menu
|
||||
// Miscellaneous menus
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// NetPlay stuff
|
||||
void CFrame::OnNetPlay(wxCommandEvent& WXUNUSED (event))
|
||||
@ -1161,13 +1180,17 @@ void CFrame::ToggleConsole(bool Show, int i)
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// GUI
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void CFrame::OnManagerResize(wxAuiManagerEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
ResizeConsole();
|
||||
}
|
||||
void CFrame::OnResize(wxSizeEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
// fit frame content, not needed right now
|
||||
//FitInside();
|
||||
|
||||
DoMoveIcons(); // In FrameWiimote.cpp
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
// Update the enabled/disabled status
|
||||
|
Reference in New Issue
Block a user