13 static private void RegisterKeyToUIElement(
int key_code,
string name,
bool is_image_set )
15 if ( m_KeysToUIElements == NULL )
20 if ( m_KeysToUIElements.Contains(key_code) )
22 Debug.Log(
"Template ID: "+
string.
ToString(key_code)+
" is alredy exist!",
"KeysToUIElements -> OnInit()",
"System",
"KeysToUIElements Registration",
"None");
27 m_KeysToUIElements.Set(key_code, params);
33 if ( m_KeysToUIElements && m_KeysToUIElements.Contains(key_code) )
35 return m_KeysToUIElements.Get(key_code);
38 Debug.Log(
"Template ID: "+
string.
ToString(key_code)+
" does not exist!",
"KeysToUIElements -> GetKeysToUIElement()",
"System",
"Get KeysToUIElements",
"None");
47 RegisterKeyToUIElement(
KeyCode.KC_ESCAPE ,
"ESC" ,
false );
48 RegisterKeyToUIElement(
KeyCode.KC_1 ,
"1" ,
false );
49 RegisterKeyToUIElement(
KeyCode.KC_2 ,
"2" ,
false );
50 RegisterKeyToUIElement(
KeyCode.KC_3 ,
"3" ,
false );
51 RegisterKeyToUIElement(
KeyCode.KC_4 ,
"4" ,
false );
52 RegisterKeyToUIElement(
KeyCode.KC_5 ,
"5" ,
false );
53 RegisterKeyToUIElement(
KeyCode.KC_6 ,
"6" ,
false );
54 RegisterKeyToUIElement(
KeyCode.KC_7 ,
"7" ,
false );
55 RegisterKeyToUIElement(
KeyCode.KC_8 ,
"8" ,
false );
56 RegisterKeyToUIElement(
KeyCode.KC_9 ,
"9" ,
false );
57 RegisterKeyToUIElement(
KeyCode.KC_0 ,
"0" ,
false );
58 RegisterKeyToUIElement(
KeyCode.KC_MINUS ,
"-" ,
false );
59 RegisterKeyToUIElement(
KeyCode.KC_EQUALS ,
"=" ,
false );
60 RegisterKeyToUIElement(
KeyCode.KC_BACK ,
"BKSPC" ,
false );
61 RegisterKeyToUIElement(
KeyCode.KC_TAB ,
"TAB" ,
false );
62 RegisterKeyToUIElement(
KeyCode.KC_Q ,
"Q" ,
false );
63 RegisterKeyToUIElement(
KeyCode.KC_W ,
"W" ,
false );
64 RegisterKeyToUIElement(
KeyCode.KC_E ,
"E" ,
false );
65 RegisterKeyToUIElement(
KeyCode.KC_R ,
"R" ,
false );
66 RegisterKeyToUIElement(
KeyCode.KC_T ,
"T" ,
false );
67 RegisterKeyToUIElement(
KeyCode.KC_Y ,
"Y" ,
false );
68 RegisterKeyToUIElement(
KeyCode.KC_U ,
"U" ,
false );
69 RegisterKeyToUIElement(
KeyCode.KC_I ,
"I" ,
false );
70 RegisterKeyToUIElement(
KeyCode.KC_O ,
"O" ,
false );
71 RegisterKeyToUIElement(
KeyCode.KC_P ,
"P" ,
false );
72 RegisterKeyToUIElement(
KeyCode.KC_LBRACKET ,
"(" ,
false );
73 RegisterKeyToUIElement(
KeyCode.KC_RBRACKET ,
")" ,
false );
74 RegisterKeyToUIElement(
KeyCode.KC_RETURN ,
"ENTER" ,
false );
75 RegisterKeyToUIElement(
KeyCode.KC_LCONTROL ,
"LCTRL" ,
false );
76 RegisterKeyToUIElement(
KeyCode.KC_A ,
"A" ,
false );
77 RegisterKeyToUIElement(
KeyCode.KC_S ,
"S" ,
false );
78 RegisterKeyToUIElement(
KeyCode.KC_D ,
"D" ,
false );
79 RegisterKeyToUIElement(
KeyCode.KC_F ,
"F" ,
false );
80 RegisterKeyToUIElement(
KeyCode.KC_G ,
"G" ,
false );
81 RegisterKeyToUIElement(
KeyCode.KC_H ,
"H" ,
false );
82 RegisterKeyToUIElement(
KeyCode.KC_J ,
"J" ,
false );
83 RegisterKeyToUIElement(
KeyCode.KC_K ,
"K" ,
false );
84 RegisterKeyToUIElement(
KeyCode.KC_L ,
"L" ,
false );
85 RegisterKeyToUIElement(
KeyCode.KC_SEMICOLON ,
";" ,
false );
86 RegisterKeyToUIElement(
KeyCode.KC_APOSTROPHE ,
"'" ,
false );
87 RegisterKeyToUIElement(
KeyCode.KC_GRAVE ,
"`" ,
false );
88 RegisterKeyToUIElement(
KeyCode.KC_LSHIFT ,
"LSHIFT" ,
false );
89 RegisterKeyToUIElement(
KeyCode.KC_BACKSLASH ,
"\\" ,
false );
90 RegisterKeyToUIElement(
KeyCode.KC_Z ,
"Z" ,
false );
91 RegisterKeyToUIElement(
KeyCode.KC_X ,
"X" ,
false );
92 RegisterKeyToUIElement(
KeyCode.KC_C ,
"C" ,
false );
93 RegisterKeyToUIElement(
KeyCode.KC_V ,
"V" ,
false );
94 RegisterKeyToUIElement(
KeyCode.KC_B ,
"B" ,
false );
95 RegisterKeyToUIElement(
KeyCode.KC_N ,
"N" ,
false );
96 RegisterKeyToUIElement(
KeyCode.KC_M ,
"M" ,
false );
97 RegisterKeyToUIElement(
KeyCode.KC_COMMA ,
"," ,
false );
98 RegisterKeyToUIElement(
KeyCode.KC_PERIOD ,
"." ,
false );
99 RegisterKeyToUIElement(
KeyCode.KC_SLASH ,
"/" ,
false );
100 RegisterKeyToUIElement(
KeyCode.KC_RSHIFT ,
"RSHIFT" ,
false );
101 RegisterKeyToUIElement(
KeyCode.KC_MULTIPLY ,
"*" ,
false );
102 RegisterKeyToUIElement(
KeyCode.KC_LMENU ,
"LALT" ,
false );
103 RegisterKeyToUIElement(
KeyCode.KC_SPACE ,
"SPACE" ,
false );
104 RegisterKeyToUIElement(
KeyCode.KC_CAPITAL ,
"CPSLOCK" ,
false );
105 RegisterKeyToUIElement(
KeyCode.KC_F1 ,
"F1" ,
false );
106 RegisterKeyToUIElement(
KeyCode.KC_F2 ,
"F2" ,
false );
107 RegisterKeyToUIElement(
KeyCode.KC_F3 ,
"F3" ,
false );
108 RegisterKeyToUIElement(
KeyCode.KC_F4 ,
"F4" ,
false );
109 RegisterKeyToUIElement(
KeyCode.KC_F5 ,
"F5" ,
false );
110 RegisterKeyToUIElement(
KeyCode.KC_F6 ,
"F6" ,
false );
111 RegisterKeyToUIElement(
KeyCode.KC_F7 ,
"F7" ,
false );
112 RegisterKeyToUIElement(
KeyCode.KC_F8 ,
"F8" ,
false );
113 RegisterKeyToUIElement(
KeyCode.KC_F9 ,
"F9" ,
false );
114 RegisterKeyToUIElement(
KeyCode.KC_F10 ,
"F10" ,
false );
115 RegisterKeyToUIElement(
KeyCode.KC_NUMLOCK ,
"NMLOCK" ,
false );
116 RegisterKeyToUIElement(
KeyCode.KC_SCROLL ,
"SCRLOCK" ,
false );
117 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD7 ,
"Num7" ,
false );
118 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD8 ,
"Num8" ,
false );
119 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD9 ,
"Num9" ,
false );
120 RegisterKeyToUIElement(
KeyCode.KC_SUBTRACT ,
"Num-" ,
false );
121 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD4 ,
"Num4" ,
false );
122 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD5 ,
"Num5" ,
false );
123 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD6 ,
"Num6" ,
false );
124 RegisterKeyToUIElement(
KeyCode.KC_ADD ,
"Num+" ,
false );
125 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD1 ,
"Num1" ,
false );
126 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD2 ,
"Num2" ,
false );
127 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD3 ,
"Num3" ,
false );
128 RegisterKeyToUIElement(
KeyCode.KC_NUMPAD0 ,
"Num0" ,
false );
129 RegisterKeyToUIElement(
KeyCode.KC_DECIMAL ,
"Num." ,
false );
131 RegisterKeyToUIElement(
KeyCode.KC_F11 ,
"F11" ,
false );
132 RegisterKeyToUIElement(
KeyCode.KC_F12 ,
"F12" ,
false );
133 RegisterKeyToUIElement(
KeyCode.KC_NUMPADEQUALS ,
"Num=" ,
false );
134 RegisterKeyToUIElement(
KeyCode.KC_PREVTRACK ,
"PrevTrack" ,
false );
136 RegisterKeyToUIElement(
KeyCode.KC_COLON ,
":" ,
false );
137 RegisterKeyToUIElement(
KeyCode.KC_UNDERLINE ,
"_" ,
false );
141 RegisterKeyToUIElement(
KeyCode.KC_NEXTTRACK ,
"NextTrack" ,
false );
142 RegisterKeyToUIElement(
KeyCode.KC_NUMPADENTER ,
"NumEnter" ,
false );
143 RegisterKeyToUIElement(
KeyCode.KC_RCONTROL ,
"RCTRL" ,
false );
144 RegisterKeyToUIElement(
KeyCode.KC_MUTE ,
"Mute" ,
false );
145 RegisterKeyToUIElement(
KeyCode.KC_CALCULATOR ,
"Calc" ,
false );
146 RegisterKeyToUIElement(
KeyCode.KC_PLAYPAUSE ,
"Play" ,
false );
147 RegisterKeyToUIElement(
KeyCode.KC_MEDIASTOP ,
"Stop" ,
false );
148 RegisterKeyToUIElement(
KeyCode.KC_VOLUMEDOWN ,
"Vol-" ,
false );
149 RegisterKeyToUIElement(
KeyCode.KC_VOLUMEUP ,
"Vol+" ,
false );
150 RegisterKeyToUIElement(
KeyCode.KC_WEBHOME ,
"Web Home" ,
false );
151 RegisterKeyToUIElement(
KeyCode.KC_NUMPADCOMMA ,
"Num," ,
false );
152 RegisterKeyToUIElement(
KeyCode.KC_DIVIDE ,
"Num/" ,
false );
153 RegisterKeyToUIElement(
KeyCode.KC_SYSRQ ,
"SysRq" ,
false );
154 RegisterKeyToUIElement(
KeyCode.KC_RMENU ,
"RALT" ,
false );
155 RegisterKeyToUIElement(
KeyCode.KC_PAUSE ,
"Pause" ,
false );
156 RegisterKeyToUIElement(
KeyCode.KC_HOME ,
"Home" ,
false );
157 RegisterKeyToUIElement(
KeyCode.KC_UP ,
"ArrowUp" ,
false );
158 RegisterKeyToUIElement(
KeyCode.KC_PRIOR ,
"PageUp" ,
false );
159 RegisterKeyToUIElement(
KeyCode.KC_LEFT ,
"ArrowLeft" ,
false );
160 RegisterKeyToUIElement(
KeyCode.KC_RIGHT ,
"ArrowRight" ,
false );
161 RegisterKeyToUIElement(
KeyCode.KC_END ,
"End" ,
false );
162 RegisterKeyToUIElement(
KeyCode.KC_DOWN ,
"ArrowDown" ,
false );
163 RegisterKeyToUIElement(
KeyCode.KC_NEXT ,
"PgDn" ,
false );
164 RegisterKeyToUIElement(
KeyCode.KC_INSERT ,
"Insert" ,
false );
165 RegisterKeyToUIElement(
KeyCode.KC_DELETE ,
"Delete" ,
false );
166 RegisterKeyToUIElement(
KeyCode.KC_LWIN ,
"LWIN" ,
false );
167 RegisterKeyToUIElement(
KeyCode.KC_RWIN ,
"RWIN" ,
false );
174 RegisterKeyToUIElement( 1048576 ,
"set:dayz_gui image:left_mouse" ,
true );
175 RegisterKeyToUIElement( 1048577 ,
"set:dayz_gui image:right_mouse" ,
true );
176 RegisterKeyToUIElement( 1048578 ,
"set:dayz_gui image:middle_mouse" ,
true );