Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Create()

static VirtualKeyboard Terraria.GameContent.RGB.VirtualKeyboard.Create ( )
inlinestatic

Definition at line 26 of file VirtualKeyboard.cs.

27 {
28 Point[] array = new Point[133]
29 {
30 new Point(2, 6),
31 new Point(7, 0),
32 new Point(1, 4),
33 new Point(2, 4),
34 new Point(0, 5),
35 new Point(1, 5),
36 new Point(2, 5),
37 new Point(0, 6),
38 new Point(1, 6),
39 new Point(1, 3),
40 new Point(2, 3),
41 new Point(0, 4),
42 new Point(4, 0),
43 new Point(5, 0),
44 new Point(6, 0),
45 new Point(19, 3),
46 new Point(20, 3),
47 new Point(21, 3),
48 new Point(17, 5),
49 new Point(17, 6),
50 new Point(20, 5),
51 new Point(19, 6),
52 new Point(20, 6),
53 new Point(16, 3),
54 new Point(17, 3),
55 new Point(17, 4),
56 new Point(16, 2),
57 new Point(17, 2),
58 new Point(19, 0),
59 new Point(18, 1),
60 new Point(19, 1),
61 new Point(20, 1),
62 new Point(21, 1),
63 new Point(19, 2),
64 new Point(20, 2),
65 new Point(21, 2),
66 new Point(10, 6),
67 new Point(14, 6),
68 new Point(15, 6),
69 new Point(16, 6),
70 new Point(24, 6),
71 new Point(0, 1),
72 new Point(1, 1),
73 new Point(2, 1),
74 new Point(0, 2),
75 new Point(1, 2),
76 new Point(2, 2),
77 new Point(0, 3),
78 new Point(22, 4),
79 new Point(23, 4),
80 new Point(24, 4),
81 new Point(22, 5),
82 new Point(23, 5),
83 new Point(24, 5),
84 new Point(23, 6),
85 new Point(23, 2),
86 new Point(24, 2),
87 new Point(25, 2),
88 new Point(25, 3),
89 new Point(25, 5),
90 new Point(22, 3),
91 new Point(23, 3),
92 new Point(24, 3),
93 new Point(21, 6),
94 new Point(20, 0),
95 new Point(23, 0),
96 new Point(22, 1),
97 new Point(23, 1),
98 new Point(24, 1),
99 new Point(25, 1),
100 new Point(22, 2),
101 new Point(15, 2),
102 new Point(4, 3),
103 new Point(5, 3),
104 new Point(6, 3),
105 new Point(7, 3),
106 new Point(8, 3),
107 new Point(9, 3),
108 new Point(10, 3),
109 new Point(7, 2),
110 new Point(8, 2),
111 new Point(9, 2),
112 new Point(10, 2),
113 new Point(11, 2),
114 new Point(12, 2),
115 new Point(13, 2),
116 new Point(14, 2),
117 new Point(12, 1),
118 new Point(13, 1),
119 new Point(15, 1),
120 new Point(16, 1),
121 new Point(17, 1),
122 new Point(4, 2),
123 new Point(5, 2),
124 new Point(6, 2),
125 new Point(4, 1),
126 new Point(5, 1),
127 new Point(6, 1),
128 new Point(7, 1),
129 new Point(8, 1),
130 new Point(10, 1),
131 new Point(11, 1),
132 new Point(11, 5),
133 new Point(12, 5),
134 new Point(13, 5),
135 new Point(14, 5),
136 new Point(15, 5),
137 new Point(4, 6),
138 new Point(5, 6),
139 new Point(6, 6),
140 new Point(15, 4),
141 new Point(4, 5),
142 new Point(6, 5),
143 new Point(7, 5),
144 new Point(8, 5),
145 new Point(9, 5),
146 new Point(10, 5),
147 new Point(7, 4),
148 new Point(8, 4),
149 new Point(9, 4),
150 new Point(10, 4),
151 new Point(11, 4),
152 new Point(12, 4),
153 new Point(13, 4),
154 new Point(14, 4),
155 new Point(11, 3),
156 new Point(12, 3),
157 new Point(13, 3),
158 new Point(14, 3),
159 new Point(15, 3),
160 new Point(4, 4),
161 new Point(5, 4),
162 new Point(6, 4)
163 };
164 Vector2[] array2 = new Vector2[133]
165 {
166 new Vector2(0.4365079f, 1f),
167 new Vector2(1.123016f, 1f / 126f),
168 new Vector2(0.2857143f, 2f / 3f),
169 new Vector2(0.4365079f, 2f / 3f),
170 new Vector2(0.1349206f, 0.8571429f),
171 new Vector2(0.2857143f, 0.8571429f),
172 new Vector2(0.4365079f, 0.8571429f),
173 new Vector2(0.1349206f, 1f),
174 new Vector2(0.2857143f, 1f),
175 new Vector2(0.2857143f, 65f / 126f),
176 new Vector2(0.4365079f, 65f / 126f),
177 new Vector2(0.1349206f, 2f / 3f),
178 new Vector2(0.6428571f, 1f / 126f),
179 new Vector2(101f / 126f, 1f / 126f),
180 new Vector2(0.9603174f, 1f / 126f),
181 new Vector2(3.06746f, 65f / 126f),
182 new Vector2(3.226191f, 65f / 126f),
183 new Vector2(3.384921f, 65f / 126f),
184 new Vector2(2.730159f, 0.8412699f),
185 new Vector2(2.829365f, 0.9920635f),
186 new Vector2(3.226191f, 0.8412699f),
187 new Vector2(3.071429f, 0.9920635f),
188 new Vector2(3.226191f, 0.9920635f),
189 new Vector2(2.630952f, 65f / 126f),
190 new Vector2(2.829365f, 65f / 126f),
191 new Vector2(2.769841f, 43f / 63f),
192 new Vector2(2.551587f, 0.3650794f),
193 new Vector2(2.789683f, 0.3650794f),
194 new Vector2(3.075397f, 0f),
195 new Vector2(2.869048f, 4f / 21f),
196 new Vector2(3.06746f, 4f / 21f),
197 new Vector2(3.226191f, 4f / 21f),
198 new Vector2(3.384921f, 4f / 21f),
199 new Vector2(3.06746f, 0.3650794f),
200 new Vector2(3.226191f, 0.3650794f),
201 new Vector2(3.384921f, 0.3650794f),
202 new Vector2(1.674603f, 0.9920635f),
203 new Vector2(2.289683f, 0.9920635f),
204 new Vector2(2.472222f, 0.9920635f),
205 new Vector2(2.630952f, 0.9920635f),
206 new Vector2(3.904762f, 0.9920635f),
207 new Vector2(0.1349206f, 0.1825397f),
208 new Vector2(0.2857143f, 0.1825397f),
209 new Vector2(0.4365079f, 0.1825397f),
210 new Vector2(0.1349206f, 0.3333333f),
211 new Vector2(0.2857143f, 0.3333333f),
212 new Vector2(0.4365079f, 0.3333333f),
213 new Vector2(0.1349206f, 65f / 126f),
214 new Vector2(3.59127f, 43f / 63f),
215 new Vector2(3.75f, 43f / 63f),
216 new Vector2(3.90873f, 43f / 63f),
217 new Vector2(3.59127f, 0.8412699f),
218 new Vector2(3.75f, 0.8412699f),
219 new Vector2(3.90873f, 0.8412699f),
220 new Vector2(3.670635f, 0.9920635f),
221 new Vector2(3.75f, 0.3650794f),
222 new Vector2(3.90873f, 0.3650794f),
223 new Vector2(4.063492f, 0.3650794f),
224 new Vector2(4.063492f, 65f / 126f),
225 new Vector2(4.063492f, 0.8412699f),
226 new Vector2(3.59127f, 65f / 126f),
227 new Vector2(3.75f, 65f / 126f),
228 new Vector2(3.90873f, 65f / 126f),
229 new Vector2(3.384921f, 0.9920635f),
230 new Vector2(3.234127f, 0f),
231 new Vector2(3.75f, 0f),
232 new Vector2(3.595238f, 4f / 21f),
233 new Vector2(3.75f, 4f / 21f),
234 new Vector2(3.900794f, 4f / 21f),
235 new Vector2(4.059524f, 4f / 21f),
236 new Vector2(3.59127f, 0.3650794f),
237 new Vector2(2.392857f, 0.3650794f),
238 new Vector2(19f / 28f, 65f / 126f),
239 new Vector2(0.8849207f, 65f / 126f),
240 new Vector2(1.043651f, 65f / 126f),
241 new Vector2(1.194444f, 65f / 126f),
242 new Vector2(1.361111f, 65f / 126f),
243 new Vector2(1.519841f, 65f / 126f),
244 new Vector2(1.678571f, 65f / 126f),
245 new Vector2(1.123016f, 0.3650794f),
246 new Vector2(1.281746f, 0.3650794f),
247 new Vector2(1.440476f, 0.3650794f),
248 new Vector2(1.599206f, 0.3650794f),
249 new Vector2(1.757936f, 0.3650794f),
250 new Vector2(1.916667f, 0.3650794f),
251 new Vector2(2.075397f, 0.3650794f),
252 new Vector2(2.234127f, 0.3650794f),
253 new Vector2(1.964286f, 4f / 21f),
254 new Vector2(2.130952f, 4f / 21f),
255 new Vector2(2.392857f, 4f / 21f),
256 new Vector2(2.551587f, 4f / 21f),
257 new Vector2(2.710317f, 4f / 21f),
258 new Vector2(23f / 36f, 0.3650794f),
259 new Vector2(29f / 36f, 0.3650794f),
260 new Vector2(0.9642857f, 0.3650794f),
261 new Vector2(23f / 36f, 4f / 21f),
262 new Vector2(0.9087301f, 4f / 21f),
263 new Vector2(1.06746f, 4f / 21f),
264 new Vector2(1.22619f, 4f / 21f),
265 new Vector2(1.384921f, 4f / 21f),
266 new Vector2(1.654762f, 4f / 21f),
267 new Vector2(1.805556f, 4f / 21f),
268 new Vector2(1.797619f, 0.8412699f),
269 new Vector2(1.956349f, 0.8412699f),
270 new Vector2(2.115079f, 0.8412699f),
271 new Vector2(2.273809f, 0.8412699f),
272 new Vector2(2.43254f, 0.8412699f),
273 new Vector2(19f / 28f, 0.9920635f),
274 new Vector2(0.8849207f, 0.9920635f),
275 new Vector2(1.063492f, 0.9920635f),
276 new Vector2(2.511905f, 43f / 63f),
277 new Vector2(31f / 42f, 0.8412699f),
278 new Vector2(1.003968f, 0.8412699f),
279 new Vector2(1.162698f, 0.8412699f),
280 new Vector2(1.321429f, 0.8412699f),
281 new Vector2(1.480159f, 0.8412699f),
282 new Vector2(1.638889f, 0.8412699f),
283 new Vector2(1.242064f, 43f / 63f),
284 new Vector2(1.400794f, 43f / 63f),
285 new Vector2(1.559524f, 43f / 63f),
286 new Vector2(1.718254f, 43f / 63f),
287 new Vector2(1.876984f, 43f / 63f),
288 new Vector2(2.035714f, 43f / 63f),
289 new Vector2(2.194444f, 43f / 63f),
290 new Vector2(2.353175f, 43f / 63f),
291 new Vector2(1.837302f, 65f / 126f),
292 new Vector2(1.996032f, 65f / 126f),
293 new Vector2(2.154762f, 65f / 126f),
294 new Vector2(2.313492f, 65f / 126f),
295 new Vector2(2.472222f, 65f / 126f),
296 new Vector2(44f / 63f, 43f / 63f),
297 new Vector2(11f / 12f, 43f / 63f),
298 new Vector2(1.083333f, 43f / 63f)
299 };
300 Keys[] keyMap = new Keys[133]
301 {
302 Keys.None,
303 Keys.None,
304 Keys.None,
305 Keys.None,
306 Keys.None,
307 Keys.None,
308 Keys.None,
309 Keys.None,
310 Keys.None,
311 Keys.None,
312 Keys.None,
313 Keys.None,
314 Keys.None,
315 Keys.None,
316 Keys.None,
317 Keys.Delete,
318 Keys.End,
319 Keys.PageDown,
320 Keys.RightShift,
321 Keys.RightControl,
322 Keys.Up,
323 Keys.Left,
324 Keys.Down,
325 Keys.OemCloseBrackets,
326 Keys.OemBackslash,
327 Keys.Enter,
328 Keys.OemPlus,
329 Keys.Back,
330 Keys.None,
331 Keys.F12,
332 Keys.PrintScreen,
333 Keys.Scroll,
334 Keys.Pause,
335 Keys.Insert,
336 Keys.Home,
337 Keys.PageUp,
338 Keys.Space,
339 Keys.RightAlt,
340 Keys.None,
341 Keys.None,
342 Keys.Decimal,
343 Keys.None,
344 Keys.None,
345 Keys.None,
346 Keys.None,
347 Keys.None,
348 Keys.None,
349 Keys.None,
350 Keys.NumPad4,
351 Keys.NumPad5,
352 Keys.NumPad6,
353 Keys.NumPad1,
354 Keys.NumPad2,
355 Keys.NumPad3,
356 Keys.NumPad0,
357 Keys.Divide,
358 Keys.Multiply,
359 Keys.Subtract,
360 Keys.Add,
361 Keys.None,
362 Keys.NumPad7,
363 Keys.NumPad8,
364 Keys.NumPad9,
365 Keys.Right,
366 Keys.None,
367 Keys.VolumeMute,
368 Keys.MediaStop,
369 Keys.MediaPreviousTrack,
370 Keys.MediaPlayPause,
371 Keys.MediaNextTrack,
372 Keys.NumLock,
373 Keys.OemMinus,
374 Keys.Tab,
375 Keys.Q,
376 Keys.W,
377 Keys.E,
378 Keys.R,
379 Keys.T,
380 Keys.Y,
381 Keys.D3,
382 Keys.D4,
383 Keys.D5,
384 Keys.D6,
385 Keys.D7,
386 Keys.D8,
387 Keys.D9,
388 Keys.D0,
389 Keys.F7,
390 Keys.F8,
391 Keys.F9,
392 Keys.F10,
393 Keys.F11,
394 Keys.OemTilde,
395 Keys.D1,
396 Keys.D2,
397 Keys.Escape,
398 Keys.F1,
399 Keys.F2,
400 Keys.F3,
401 Keys.F4,
402 Keys.F5,
403 Keys.F6,
404 Keys.N,
405 Keys.M,
406 Keys.OemComma,
407 Keys.OemPeriod,
408 Keys.OemQuestion,
409 Keys.LeftControl,
410 Keys.None,
411 Keys.LeftAlt,
412 Keys.OemQuotes,
413 Keys.LeftShift,
414 Keys.Z,
415 Keys.X,
416 Keys.C,
417 Keys.V,
418 Keys.B,
419 Keys.D,
420 Keys.F,
421 Keys.G,
422 Keys.H,
423 Keys.J,
424 Keys.K,
425 Keys.L,
426 Keys.OemSemicolon,
427 Keys.U,
428 Keys.I,
429 Keys.O,
430 Keys.P,
431 Keys.OemOpenBrackets,
432 Keys.CapsLock,
433 Keys.A,
434 Keys.S
435 };
436 return new VirtualKeyboard(Fragment.FromCustom(array, array2), keyMap);
437 }
static Fragment FromCustom(Point[] gridPositions)
Definition Fragment.cs:60
void Add(TKey key, TValue value)
VirtualKeyboard(Fragment fragment, Keys[] keyMap)

References Terraria.GameContent.RGB.VirtualKeyboard.VirtualKeyboard(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), and ReLogic.Peripherals.RGB.Fragment.FromCustom().