UAV::Pilot::SDL::WindowEventHandler
Role for objects that will be passed into UAV::Pilot::SDL::Window as children.
UAV::Pilot::SDL::Window
The method draw will be called on the object to draw itself. It will be passed the UAV::Pilot::SDL::Window object. This is the only method that is required for the class doing the role to implement.
draw
The update_window_rect method is passed an UAV::Pilot::SDL::Window, and is called after draw. The default implementation will call <UAV::Pilot::SDL::Window-update_rect>>, but you may wish to override this if you have other means of updating your drawing area.
update_window_rect
<UAV::Pilot::SDL::Window-
The add_to_window method should be called on the object after construction and passed an UAV::Pilot::SDL::Window object. A second optional parameter is the float value (default bottom). The handler will add itself as a child to this window. The default code for the method in the role will do this for you, adding the child at the bottom.
add_to_window
Also has width and height attributes. They are read-only attributes, but can be set with the _set_width and _set_height methods. These methods should be considered private to the class.
width
height
_set_width
_set_height
To install UAV::Pilot::SDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UAV::Pilot::SDL
CPAN shell
perl -MCPAN -e shell install UAV::Pilot::SDL
For more information on module installation, please visit the detailed CPAN module installation guide.