Toggle full screen when double clicking the render window.

This commit is contained in:
Rachel Bryk 2013-01-31 03:51:29 -05:00
parent 0ffdd2607f
commit de27f0bea9
2 changed files with 3 additions and 0 deletions

View File

@ -1004,6 +1004,8 @@ void CFrame::OnMouse(wxMouseEvent& event)
event.GetPosition().x, event.GetPosition().y, event.ButtonDown());
}
#endif
if (event.LeftDClick())
DoFullscreen(!RendererIsFullscreen());
event.Skip();
}

View File

@ -913,6 +913,7 @@ void CFrame::StartGame(const std::string& filename)
wxTheApp->Bind(wxEVT_RIGHT_UP, &CFrame::OnMouse, this);
wxTheApp->Bind(wxEVT_MIDDLE_DOWN, &CFrame::OnMouse, this);
wxTheApp->Bind(wxEVT_MIDDLE_UP, &CFrame::OnMouse, this);
m_RenderParent->Bind(wxEVT_LEFT_DCLICK, &CFrame::OnMouse, this);
wxTheApp->Bind(wxEVT_MOTION, &CFrame::OnMouse, this);
m_RenderParent->Bind(wxEVT_SIZE, &CFrame::OnRenderParentResize, this);
}