1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#pragma once
#include "Runtime/Lua/LuaHelper.h"
#include "Runtime/Math/Math.h"
enum EInputEventType
{
InputEvent_MouseDown = 0,
InputEvent_MouseUp = 1,
InputEvent_MouseMove = 2,
InputEvent_MouseDrag = 3,
InputEvent_KeyDown = 4,
InputEvent_KeyUp = 5,
InputEvent_ScrollWheel = 6,
InputEvent_Repaint = 7,
InputEvent_Layout = 8,
InputEvent_DragUpdated = 9,
InputEvent_DragPerform = 10,
InputEvent_DragExited = 15,
InputEvent_Ignore = 11,
InputEvent_Used = 12,
InputEvent_ValidateCommand = 13,
InputEvent_ExecuteCommand = 14,
InputEvent_ContextClick = 16,
InputEvent_MouseEnterWindow = 20,
InputEvent_MouseLeaveWindow = 21,
InputEvent_MagnifyGesture = 1000,
InputEvent_SwipeGesture = 1001,
InputEvent_RotateGesture = 1002
};
// ÊäÈëʼþ
struct InputEvent : public LuaBind::INativeTable
{
EInputEventType type;
Vector2f mousePosition;
Vector2f mouseDelta;
int button; ///< mouse button number. (bitfield of MouseButton enum)
int modifiers; ///< keyboard modifier flags. (bitfield of Modifiers enum)
float pressure; ///< Stylus pressure.
int clickCount;
uint16_t character; ///< unicode keyboard character (with modifiers).
uint16_t keycode; ///< The keyboard scancode of the event.
int displayIndex; ///< Display index to which this event belongs.
char* commandString;
bool keyRepeat; ///< Is the event the result of key repeat?
bool use;
void CastToTable(LuaBind::State& state) override;
};
|