From fc8a1377bece7f8524f1207c05a81d8362d0ee57 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 29 Jan 2011 17:22:44 +0100 Subject: Add reshape event. --- application.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'application.cpp') 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) { + +} -- cgit v1.2.3