00001 #include "KeyboardEvent.h" 00002 #include "KeyboardInterface.h" 00003 00004 namespace RenderTools { 00005 00006 KeyboardEvent::KeyboardEvent( Type type, int key ): 00007 m_type( type ), 00008 m_key( key ), 00009 m_state( type == KEY_DOWN ){ 00010 00011 KeyboardInterface::s_keys[ m_key ] = m_state; 00012 } 00013 00014 KeyboardEvent::Type KeyboardEvent::getType( void ) const { 00015 return( m_type ); 00016 } 00017 00018 int KeyboardEvent::getKey( void ) const { 00019 return( m_key ); 00020 } 00021 00022 bool KeyboardEvent::getState( void ) const { 00023 return( m_state ); 00024 } 00025 00026 }; 00027
1.5.8