diff --git a/inc/hgl/event/EventProc.h b/inc/hgl/event/EventProc.h index b7fc8d2..2b3b04a 100644 --- a/inc/hgl/event/EventProc.h +++ b/inc/hgl/event/EventProc.h @@ -1,4 +1,4 @@ -#ifndef HGL_EVENT_PROC_INCLUDE +#ifndef HGL_EVENT_PROC_INCLUDE #define HGL_EVENT_PROC_INCLUDE #include @@ -6,7 +6,7 @@ namespace hgl { /** - * ¼ + * 事件基类 */ class EventProc { @@ -21,7 +21,7 @@ namespace hgl using EventProcQueue=Queue; /** - * ִһ¼ + * 执行一个事件 */ inline bool UpdateEvent(EventProcQueue *epq) { @@ -42,9 +42,9 @@ namespace hgl } /** - * ˢִ¼ - * @param epq ¼ - * @param max_count ˢ¸(-1ʾ) + * 刷新执行事件队列 + * @param epq 事件队列 + * @param max_count 最大刷新个数(-1表示无限制) */ inline int UpdateEventQueue(EventProcQueue *epq,int max_count=-1) { diff --git a/inc/hgl/io/event/InputEvent.h b/inc/hgl/io/event/InputEvent.h index 60dba15..0c4f0cd 100644 --- a/inc/hgl/io/event/InputEvent.h +++ b/inc/hgl/io/event/InputEvent.h @@ -1,4 +1,4 @@ -#ifndef HGL_IO_INPUT_EVENT_INCLUDE +#ifndef HGL_IO_INPUT_EVENT_INCLUDE #define HGL_IO_INPUT_EVENT_INCLUDE #include @@ -9,15 +9,15 @@ namespace hgl { struct EventHeader { - uint8 type; ///<Դ - uint8 index; ///<Դ(ͬһ豸ж) - uint16 id; ///<¼id + uint8 type; ///<输入源类型 + uint8 index; ///<输入源索引(比如同一设备有多个) + uint16 id; ///<事件id }; constexpr size_t EventHeaderBytes=sizeof(EventHeader); /** - * ¼ + * 事件处理结果 */ enum class EventProcResult { @@ -101,4 +101,4 @@ namespace hgl };//class InputEvent }//namespace io }//namespace hgl -#endif//HGL_IO_INPUT_EVENT_INCLUDE \ No newline at end of file +#endif//HGL_IO_INPUT_EVENT_INCLUDE diff --git a/inc/hgl/io/event/JoystickEvent.h b/inc/hgl/io/event/JoystickEvent.h index 2181a6b..c81135f 100644 --- a/inc/hgl/io/event/JoystickEvent.h +++ b/inc/hgl/io/event/JoystickEvent.h @@ -1,4 +1,4 @@ -#ifndef HGL_IO_DEVICE_MOUSE_EVENT_INCLUDE +#ifndef HGL_IO_DEVICE_MOUSE_EVENT_INCLUDE #define HGL_IO_DEVICE_MOUSE_EVENT_INCLUDE #include @@ -7,7 +7,7 @@ namespace hgl namespace io { /** - * ֱö + * 手柄按键枚举 */ enum class JoystickButton { @@ -33,10 +33,10 @@ namespace hgl Left =JoystickButton::Left, Right =JoystickButton::Right, - Fork =JoystickButton::_0, // - Circle =JoystickButton::_1, // Բ - Square =JoystickButton::_2, // - Triangle =JoystickButton::_3, // + Fork =JoystickButton::_0, // 叉 + Circle =JoystickButton::_1, // 圆 + Square =JoystickButton::_2, // 方 + Triangle =JoystickButton::_3, // 三角 L1 =JoystickButton::_6, L2 =JoystickButton::_4, R1 =JoystickButton::_7, R2 =JoystickButton::_5, @@ -54,7 +54,7 @@ namespace hgl // R=JoystickButton::_5, // //XBOX/XBOX360 - // //XBOX, //ϼ + // //XBOX, //西瓜键 //}; }//namespace io }//namespace hgl diff --git a/inc/hgl/io/event/KeyboardEvent.h b/inc/hgl/io/event/KeyboardEvent.h index bcd3a46..6b0f15a 100644 --- a/inc/hgl/io/event/KeyboardEvent.h +++ b/inc/hgl/io/event/KeyboardEvent.h @@ -1,4 +1,4 @@ -#ifndef HGL_IO_KEYBOARD_EVENT_INCLUDE +#ifndef HGL_IO_KEYBOARD_EVENT_INCLUDE #define HGL_IO_KEYBOARD_EVENT_INCLUDE #include @@ -7,15 +7,15 @@ namespace hgl namespace io { /** - * öٶ + * 按键枚举定义 */ enum class KeyboardButton { NONE=0, - // + //主键盘区 Esc, ///