diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-04-14 01:09:02 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-04-14 01:09:02 +0400 |
commit | dbf4328f3fba5e1fbd39422d6a322f752e2e122e (patch) | |
tree | dc45fce6c38bdc9bf9ddb9a699a8c40a05a5e2f0 /source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp | |
parent | 81cfbaacb001ade11f52c3150b4aa6aaff965c64 (diff) |
BGE: Adding a render.setFullScreen() and a render.getFullScreen() to allow fulscreening games via Python.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp b/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp index 9b01cb5786f..c438dcdd4a6 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp @@ -128,6 +128,19 @@ void GPG_Canvas::ResizeWindow(int width, int height) Resize(width, height); } +void GPG_Canvas::SetFullScreen(bool enable) +{ + if (enable) + m_window->setState(GHOST_kWindowStateFullScreen); + else + m_window->setState(GHOST_kWindowStateNormal); +} + +bool GPG_Canvas::GetFullScreen() +{ + return m_window->getState() == GHOST_kWindowStateFullScreen; +} + float GPG_Canvas::GetMouseNormalizedX(int x) { return float(x)/this->GetWidth(); |