diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-29 17:22:44 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-29 17:22:44 +0100 |
commit | fc8a1377bece7f8524f1207c05a81d8362d0ee57 (patch) | |
tree | 7470e2ed6609c9f634aeca378c9fcbcbc3026e02 | |
parent | bb74d265b5b0858f2fb5bcc0c7c16ff658e698ca (diff) |
Add reshape event.
-rw-r--r-- | application.cpp | 8 | ||||
-rw-r--r-- | application.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/application.cpp b/application.cpp index 3bf646b..b92b9a3 100644 --- a/application.cpp +++ b/application.cpp @@ -61,6 +61,9 @@ void Application::event(const sf::Event& e) { case sf::Event::KeyPressed: event_keypress(e.Key.Code); break; + case sf::Event::Resized: + event_reshape(e.Size.Width, e.Size.Height); + break; default: break; } @@ -74,9 +77,14 @@ void Application::event_keypress(sf::Key::Code key) { case sf::Key::F: fullscreen = !fullscreen; create_window(1024, 768, fullscreen); + event_reshape(window->GetWidth(), window->GetHeight()); init(); break; default: break; } } + +void Application::event_reshape(int width, int height) { + +} diff --git a/application.h b/application.h index 74a2633..f7ea563 100644 --- a/application.h +++ b/application.h @@ -16,6 +16,7 @@ class Application { virtual void event(const sf::Event& e); virtual void event_keypress(Key::Code key); + virtual void event_reshape(int width, int height); virtual void init() = 0; virtual void update() = 0; |