Events which can have multiple types should get and set type
Kartik Thakore [Sun, 8 Nov 2009 16:07:31 +0000 (11:07 -0500)]
src/Core/objects/KeyboardEvent.xs
src/Core/objects/MouseButtonEvent.xs

index 2889808..6d3e11d 100644 (file)
@@ -36,6 +36,12 @@ Uint8
 kbevent_type ( event, ... )
        SDL_KeyboardEvent *event
        CODE: 
+               if( items > 1 )
+               {
+                       event->type = SvIV( ST(1) );
+
+               }
+
                RETVAL = event->type;
        OUTPUT:
                RETVAL
index 724c144..a8b38d0 100644 (file)
@@ -38,6 +38,12 @@ Uint8
 mbevent_type ( event, ... )
        SDL_MouseButtonEvent *event
        CODE: 
+               if( items > 1 )
+                {
+                        event->type = SvIV( ST(1) );
+
+                }
+       
                RETVAL = event->type;
        OUTPUT:
                RETVAL