From bc120edb60bcf7897723bd43e2f1e7349ca6619f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 10 Jul 2013 23:53:20 +0200 Subject: it"s now possible to resize the window via mouse --- lib/Loadbars/Main.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Loadbars') diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm index a603434..2f8e200 100644 --- a/lib/Loadbars/Main.pm +++ b/lib/Loadbars/Main.pm @@ -466,6 +466,14 @@ sub loop ($@) { # While there are events to poll, poll them all! while ( SDL::Events::poll_event($event) ) { + # Videoresize + if ($event->type() == 16) { + $newsize{width} = $event->resize_w; + $newsize{height} = $event->resize_h; + $resize_window = 1; + } + + # Not a key next if $event->type() != 2; my $key_sym = $event->key_sym(); -- cgit v1.2.3