summaryrefslogtreecommitdiff
path: root/Library/Artifacts/00/00a18c8c44e9c2e88decd28a12714125
blob: 5a731632bb8d840794ac902f8b6cb0ac3b89c502 (plain)
ofshex dumpascii
0000 00 00 0f 81 00 00 7c cc 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ......|.............2019.3.6f1..
0020 ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 ...............f..!..5.9.4.Q...B
0040 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 ...............7................
0060 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 ................................
0080 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 ...............E................
00a0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 ...............#................
00c0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 ...............,................
00e0 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 ...........5...a................
0100 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 ...............#................
0120 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 ...............,................
0140 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 ...............r................
0160 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 ...............#................
0180 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 ...............,................
01a0 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 ...........H....................
01c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 ...........1...1............@...
01e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 ................................
0200 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 ...........Q...j................
0220 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 ...............J................
0240 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 ...........1...1................
0260 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 ................................
0280 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 ...............j................
02a0 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 ...........\....................
02c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 ...........H...r................
02e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 ...........1...1............@...
0300 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 ................................
0320 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 ...........Q...j................
0340 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 ...........H...w................
0360 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 ...........1...1............@...
0380 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 ................................
03a0 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 ...........Q...j................
03c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 ...........H....................
03e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 ...........1...1............@...
0400 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 ................................
0420 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 ...........Q...j................
0440 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 ...........y....................
0460 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 ...............#.......!........
0480 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 ...............,......."........
04a0 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 .......................#....@...
04c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 ...........1...1.......$........
04e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 .......................%........
0500 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 ...............j.......&........
0520 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 .......................'........
0540 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 ...........1...1.......(........
0560 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 .......................)........
0580 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 ...............j.......*........
05a0 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 ...........H...........+........
05c0 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 ...........1...1.......,....@...
05e0 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 .......................-........
0600 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 ...........Q...j................
0620 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 ...........y.........../........
0640 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 ...............#.......0........
0660 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 ...............,.......1........
0680 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 .......................2....@...
06a0 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 .......................3....@...
06c0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 ...............#.......4........
06e0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 ...............,.......5........
0700 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 ...........H...........6........
0720 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 ...........1...1.......7....@...
0740 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 .......................8........
0760 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 ...........Q...j.......9........
0780 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 ...........H...........:........
07a0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 ...........1...1.......;....@...
07c0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 .......................<........
07e0 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 ...........Q...j.......=........
0800 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 ...........H...........>........
0820 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 ...........1...1.......?....@...
0840 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 .......................@........
0860 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 ...........Q...j.......A........
0880 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 .......MonoImporter.PPtr<EditorE
08a0 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 xtension>.m_FileID.m_PathID.PPtr
08c0 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 <PrefabInstance>.m_ExternalObjec
08e0 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 ts.SourceAssetIdentifier.type.as
0900 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 sembly.name.m_UsedFileIDs.m_Defa
0920 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f ultReferences.executionOrder.ico
0940 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d n.m_UserData.m_AssetBundleName.m
0960 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 _AssetBundleVariant.....s.......
0980 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 G....Z56.:!@i.J*...............7
09a0 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 ................................
09c0 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 ...............................E
09e0 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a00 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a20 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 ...........................(...a
0a40 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a60 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a80 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 ...............................r
0aa0 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0ac0 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0ae0 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab ...........................H....
0b00 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0b20 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0b40 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0b60 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea ...........................H....
0b80 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0ba0 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0bc0 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0be0 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d ...............................=
0c00 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0c20 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ................................
0c40 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a ...............................j
0c60 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b ...........................H....
0c80 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 ...........................1...1
0ca0 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b ............@...................
0cc0 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a ...........................Q...j
0ce0 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a ...........................y....
0d00 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 ................................
0d20 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f ................................
0d40 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 ...........................y...Q
0d60 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0d80 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0da0 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 ...............................X
0dc0 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 .......!...................H...i
0de0 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ......."...................1...1
0e00 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......#....@...................
0e20 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......$...................Q...j
0e40 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 .......%...................H...u
0e60 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 .......&...................1...1
0e80 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......'....@...................
0ea0 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......(...................Q...j
0ec0 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 .......)...............PPtr<Edit
0ee0 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 orExtension>.m_FileID.m_PathID.P
0f00 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 Ptr<PrefabInstance>.m_DefaultRef
0f20 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 erences.m_Icon.m_ExecutionOrder.
0f40 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 m_ClassName.m_Namespace.........
0f60 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 ............\........y......`...
0f80 6c 6c 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ll..............................
0fa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 .....................y..........
1040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1080 00 00 00 00 00 00 00 00 1a 00 00 00 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 44 72 ............InputControlPickerDr
10a0 6f 70 64 6f 77 6e 00 00 c6 6b 00 00 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 75 73 opdown...k..#if.UNITY_EDITOR..us
10c0 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 ing.System;..using.System.Collec
10e0 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 4c 69 6e tions.Generic;..using.System.Lin
1100 71 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 54 65 78 74 3b 0d 0a 75 73 69 6e 67 20 55 6e q;..using.System.Text;..using.Un
1120 69 74 79 45 64 69 74 6f 72 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e ityEditor;..using.UnityEngine.In
1140 70 75 74 53 79 73 74 65 6d 2e 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 putSystem.Controls;..using.Unity
1160 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 61 79 6f 75 74 73 3b 0d 0a 75 73 69 Engine.InputSystem.Layouts;..usi
1180 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 ng.UnityEngine.InputSystem.Utili
11a0 74 69 65 73 3b 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 68 61 76 65 20 74 6f 6f 6c 74 69 70 73 ties;....////TODO:.have.tooltips
11c0 20 6f 6e 20 65 61 63 68 20 65 6e 74 72 79 20 69 6e 20 74 68 65 20 70 69 63 6b 65 72 0d 0a 0d 0a .on.each.entry.in.the.picker....
11e0 2f 2f 2f 2f 54 4f 44 4f 3a 20 66 69 6e 64 20 62 65 74 74 65 72 20 77 61 79 20 74 6f 20 70 72 65 ////TODO:.find.better.way.to.pre
1200 73 65 6e 74 20 63 6f 6e 74 72 6f 6c 73 20 77 68 65 6e 20 66 69 6c 74 65 72 69 6e 67 20 74 6f 20 sent.controls.when.filtering.to.
1220 73 70 65 63 69 66 69 63 20 64 65 76 69 63 65 73 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e specific.devices....namespace.Un
1240 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 45 64 69 74 6f 72 0d 0a 7b 0d ityEngine.InputSystem.Editor..{.
1260 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 63 6c 61 73 73 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c .....internal.class.InputControl
1280 50 69 63 6b 65 72 44 72 6f 70 64 6f 77 6e 20 3a 20 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 PickerDropdown.:.AdvancedDropdow
12a0 6e 2c 20 49 44 69 73 70 6f 73 61 62 6c 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 n,.IDisposable......{..........p
12c0 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 44 72 6f 70 64 6f 77 6e ublic.InputControlPickerDropdown
12e0 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 (..............InputControlPicke
1300 72 53 74 61 74 65 20 73 74 61 74 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 63 74 69 6f rState.state,..............Actio
1320 6e 3c 73 74 72 69 6e 67 3e 20 6f 6e 50 69 63 6b 43 61 6c 6c 62 61 63 6b 2c 0d 0a 20 20 20 20 20 n<string>.onPickCallback,.......
1340 20 20 20 20 20 20 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 2e 4d 6f 64 65 20 6d .......InputControlPicker.Mode.m
1360 6f 64 65 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 2e 4d 6f 64 65 2e 50 69 ode.=.InputControlPicker.Mode.Pi
1380 63 6b 43 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 73 ckControl)..............:.base(s
13a0 74 61 74 65 2e 61 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 53 74 61 74 65 29 0d 0a 20 20 20 tate.advancedDropdownState).....
13c0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 75 69 20 3d 20 6e 65 77 20 .....{..............m_Gui.=.new.
13e0 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 47 55 49 28 74 68 69 73 29 3b 0d 0a 0d 0a InputControlPickerGUI(this);....
1400 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e 69 6d 75 6d 53 69 7a 65 20 3d 20 6e 65 77 20 56 65 ............minimumSize.=.new.Ve
1420 63 74 6f 72 32 28 32 37 35 2c 20 33 30 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 ctor2(275,.300);..............ma
1440 78 69 6d 75 6d 53 69 7a 65 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 33 30 30 29 3b ximumSize.=.new.Vector2(0,.300);
1460 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 50 69 63 6b 43 61 6c 6c 62 61 63 6b ................m_OnPickCallback
1480 20 3d 20 6f 6e 50 69 63 6b 43 61 6c 6c 62 61 63 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .=.onPickCallback;..............
14a0 6d 5f 4d 6f 64 65 20 3d 20 6d 6f 64 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 m_Mode.=.mode;..........}.......
14c0 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 43 6f 6e 74 72 6f 6c 50 61 74 68 73 .....public.void.SetControlPaths
14e0 54 6f 4d 61 74 63 68 28 73 74 72 69 6e 67 5b 5d 20 63 6f 6e 74 72 6f 6c 50 61 74 68 73 54 6f 4d ToMatch(string[].controlPathsToM
1500 61 74 63 68 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f atch)..........{..............m_
1520 43 6f 6e 74 72 6f 6c 50 61 74 68 73 54 6f 4d 61 74 63 68 20 3d 20 63 6f 6e 74 72 6f 6c 50 61 74 ControlPathsToMatch.=.controlPat
1540 68 73 54 6f 4d 61 74 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 6c 6f 61 64 28 29 hsToMatch;..............Reload()
1560 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 ;..........}............public.v
1580 6f 69 64 20 53 65 74 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 28 73 74 72 oid.SetExpectedControlLayout(str
15a0 69 6e 67 20 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 ing.expectedControlLayout)......
15c0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e ....{..............m_ExpectedCon
15e0 74 72 6f 6c 4c 61 79 6f 75 74 20 3d 20 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f trolLayout.=.expectedControlLayo
1600 75 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 45 71 ut;................if.(string.Eq
1620 75 61 6c 73 28 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2c 20 22 49 6e 70 uals(expectedControlLayout,."Inp
1640 75 74 44 65 76 69 63 65 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 utDevice",.StringComparison.Inva
1660 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 riantCultureIgnoreCase))........
1680 20 20 20 20 20 20 20 20 20 20 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 20 ..........m_ExpectedControlType.
16a0 3d 20 74 79 70 65 6f 66 28 49 6e 70 75 74 44 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 =.typeof(InputDevice);..........
16c0 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 78 70 65 ....else..................m_Expe
16e0 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c ctedControlType.=.!string.IsNull
1700 4f 72 45 6d 70 74 79 28 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 0d 0a OrEmpty(expectedControlLayout)..
1720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3f 20 49 6e 70 75 74 53 79 73 74 65 ....................?.InputSyste
1740 6d 2e 73 5f 4d 61 6e 61 67 65 72 2e 6d 5f 4c 61 79 6f 75 74 73 2e 47 65 74 43 6f 6e 74 72 6f 6c m.s_Manager.m_Layouts.GetControl
1760 54 79 70 65 46 6f 72 4c 61 79 6f 75 74 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 TypeForLayout(new.InternedString
1780 28 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 (expectedControlLayout))........
17a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ..............:.null;...........
17c0 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 6c 61 79 6f 75 74 20 69 73 20 66 6f 72 20 61 20 64 .....//.If.the.layout.is.for.a.d
17e0 65 76 69 63 65 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 77 69 74 63 68 20 74 6f 20 64 evice,.automatically.switch.to.d
1800 65 76 69 63 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 70 69 63 6b 69 6e 67 20 6d 6f evice..............//.picking.mo
1820 64 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 45 78 70 65 63 74 65 64 43 de...............if.(m_ExpectedC
1840 6f 6e 74 72 6f 6c 54 79 70 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 74 79 70 65 6f 66 28 49 6e 70 ontrolType.!=.null.&&.typeof(Inp
1860 75 74 44 65 76 69 63 65 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 6d 5f 45 78 70 utDevice).IsAssignableFrom(m_Exp
1880 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ectedControlType))..............
18a0 20 20 20 20 6d 5f 4d 6f 64 65 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 2e ....m_Mode.=.InputControlPicker.
18c0 4d 6f 64 65 2e 50 69 63 6b 44 65 76 69 63 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Mode.PickDevice;................
18e0 52 65 6c 6f 61 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 Reload();..........}............
1900 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 44 65 73 74 72 6f protected.override.void.OnDestro
1920 79 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 52 65 y()..........{..............m_Re
1940 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3f 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 bindingOperation?.Dispose();....
1960 20 20 20 20 20 20 20 20 20 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 3d ..........m_RebindingOperation.=
1980 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 .null;..........}............pub
19a0 6c 69 63 20 76 6f 69 64 20 44 69 73 70 6f 73 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 lic.void.Dispose()..........{...
19c0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3f ...........m_RebindingOperation?
19e0 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 .Dispose();..........}..........
1a00 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 41 64 76 61 6e 63 65 64 44 72 6f ..protected.override.AdvancedDro
1a20 70 64 6f 77 6e 49 74 65 6d 20 42 75 69 6c 64 52 6f 6f 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b pdownItem.BuildRoot()..........{
1a40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 6f 6f 74 20 3d 20 6e 65 77 20 41 64 76 ..............var.root.=.new.Adv
1a60 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 73 74 72 69 6e 67 2e 45 6d 70 74 79 29 3b ancedDropdownItem(string.Empty);
1a80 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 73 61 67 65 73 2e 0d 0a 20 20 20 20 ................//.Usages.......
1aa0 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4d 6f 64 65 20 21 3d 20 49 6e 70 75 74 43 6f 6e 74 72 ........if.(m_Mode.!=.InputContr
1ac0 6f 6c 50 69 63 6b 65 72 2e 4d 6f 64 65 2e 50 69 63 6b 44 65 76 69 63 65 29 0d 0a 20 20 20 20 20 olPicker.Mode.PickDevice).......
1ae0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 75 73 .......{..................var.us
1b00 61 67 65 73 20 3d 20 42 75 69 6c 64 54 72 65 65 46 6f 72 55 73 61 67 65 73 28 29 3b 0d 0a 20 20 ages.=.BuildTreeForUsages();....
1b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 75 73 61 67 65 73 2e 63 68 69 6c 64 72 65 ..............if.(usages.childre
1b40 6e 2e 41 6e 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 n.Any())..................{.....
1b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 2e 41 64 64 43 68 69 6c 64 28 75 .................root.AddChild(u
1b80 73 61 67 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f sages);......................roo
1ba0 74 2e 41 64 64 53 65 70 61 72 61 74 6f 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 t.AddSeparator();...............
1bc0 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ...}..............}.............
1be0 20 20 20 2f 2f 20 44 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 49 ...//.Devices...............AddI
1c00 74 65 6d 73 46 6f 72 44 65 76 69 63 65 73 28 72 6f 6f 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 temsForDevices(root);...........
1c20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .....return.root;..........}....
1c40 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 41 64 76 61 6e ........protected.override.Advan
1c60 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 42 75 69 6c 64 43 75 73 74 6f 6d 53 65 61 72 63 cedDropdownItem.BuildCustomSearc
1c80 68 28 73 74 72 69 6e 67 20 73 65 61 72 63 68 53 74 72 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 h(string.searchString,..........
1ca0 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e ....IEnumerable<AdvancedDropdown
1cc0 49 74 65 6d 3e 20 65 6c 65 6d 65 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 Item>.elements)..........{......
1ce0 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 4c 69 73 74 65 6e 69 6e 67 29 0d 0a 20 20 20 20 20 ........if.(!isListening).......
1d00 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 ...........return.null;.........
1d20 20 20 20 20 20 20 20 76 61 72 20 72 6f 6f 74 20 3d 20 6e 65 77 20 41 64 76 61 6e 63 65 64 44 72 .......var.root.=.new.AdvancedDr
1d40 6f 70 64 6f 77 6e 49 74 65 6d 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 opdownItem(!string.IsNullOrEmpty
1d60 28 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 (m_ExpectedControlLayout).......
1d80 20 20 20 20 20 20 20 20 20 20 20 3f 20 24 22 4c 69 73 74 65 6e 69 6e 67 20 66 6f 72 20 7b 6d 5f ...........?.$"Listening.for.{m_
1da0 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 7d 2e 2e 2e 22 0d 0a 20 20 20 20 ExpectedControlLayout}..."......
1dc0 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 22 4c 69 73 74 65 6e 69 6e 67 20 66 6f 72 20 69 6e 70 ............:."Listening.for.inp
1de0 75 74 2e 2e 2e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 61 72 ut...");................if.(sear
1e00 63 68 53 74 72 69 6e 67 20 3d 3d 20 22 5c 75 30 30 31 37 22 29 0d 0a 20 20 20 20 20 20 20 20 20 chString.==."\u0017")...........
1e20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 .......return.root;.............
1e40 20 20 20 76 61 72 20 70 61 74 68 73 20 3d 20 73 65 61 72 63 68 53 74 72 69 6e 67 2e 53 75 62 73 ...var.paths.=.searchString.Subs
1e60 74 72 69 6e 67 28 31 29 2e 53 70 6c 69 74 28 27 5c 75 30 30 31 37 27 29 3b 0d 0a 20 20 20 20 20 tring(1).Split('\u0017');.......
1e80 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6c 65 6d 65 6e 74 20 69 6e 20 65 .......foreach.(var.element.in.e
1ea0 6c 65 6d 65 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 lements)..............{.........
1ec0 20 20 20 20 20 20 20 20 20 69 66 20 28 65 6c 65 6d 65 6e 74 20 69 73 20 43 6f 6e 74 72 6f 6c 44 .........if.(element.is.ControlD
1ee0 72 6f 70 64 6f 77 6e 49 74 65 6d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 20 26 26 20 70 61 74 68 73 ropdownItem.controlItem.&&.paths
1f00 2e 41 6e 79 28 78 20 3d 3e 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 63 6f 6e 74 72 6f 6c 50 61 74 .Any(x.=>.controlItem.controlPat
1f20 68 57 69 74 68 44 65 76 69 63 65 20 3d 3d 20 78 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 hWithDevice.==.x))..............
1f40 20 20 20 20 20 20 20 20 72 6f 6f 74 2e 41 64 64 43 68 69 6c 64 28 65 6c 65 6d 65 6e 74 29 3b 0d ........root.AddChild(element);.
1f60 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 .............}................re
1f80 74 75 72 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 turn.root;..........}...........
1fa0 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 49 74 65 6d 53 65 6c .protected.override.void.ItemSel
1fc0 65 63 74 65 64 28 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 69 74 65 6d 29 ected(AdvancedDropdownItem.item)
1fe0 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 74 ..........{..............var.pat
2000 68 20 3d 20 28 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 29 69 h.=.((InputControlDropdownItem)i
2020 74 65 6d 29 2e 63 6f 6e 74 72 6f 6c 50 61 74 68 57 69 74 68 44 65 76 69 63 65 3b 0d 0a 20 20 20 tem).controlPathWithDevice;.....
2040 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 50 69 63 6b 43 61 6c 6c 62 61 63 6b 28 70 61 74 68 29 3b .........m_OnPickCallback(path);
2060 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 41 ..........}............private.A
2080 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 42 75 69 6c 64 54 72 65 65 46 6f 72 dvancedDropdownItem.BuildTreeFor
20a0 55 73 61 67 65 73 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Usages()..........{.............
20c0 20 76 61 72 20 75 73 61 67 65 52 6f 6f 74 20 3d 20 6e 65 77 20 41 64 76 61 6e 63 65 64 44 72 6f .var.usageRoot.=.new.AdvancedDro
20e0 70 64 6f 77 6e 49 74 65 6d 28 22 55 73 61 67 65 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 pdownItem("Usages");............
2100 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 75 73 61 67 65 41 6e 64 4c 61 79 6f 75 74 73 20 69 ..foreach.(var.usageAndLayouts.i
2120 6e 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e n.EditorInputControlLayoutCache.
2140 61 6c 6c 55 73 61 67 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 allUsages)..............{.......
2160 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 75 73 61 67 65 41 6e 64 4c 61 79 6f 75 74 73 2e 49 ...........if.(usageAndLayouts.I
2180 74 65 6d 32 2e 41 6e 79 28 4c 61 79 6f 75 74 4d 61 74 63 68 65 73 45 78 70 65 63 74 65 64 43 6f tem2.Any(LayoutMatchesExpectedCo
21a0 6e 74 72 6f 6c 4c 61 79 6f 75 74 46 69 6c 74 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ntrolLayoutFilter)).............
21c0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 .....{......................var.
21e0 63 68 69 6c 64 20 3d 20 6e 65 77 20 55 73 61 67 65 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 75 73 child.=.new.UsageDropdownItem(us
2200 61 67 65 41 6e 64 4c 61 79 6f 75 74 73 2e 49 74 65 6d 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ageAndLayouts.Item1);...........
2220 20 20 20 20 20 20 20 20 20 20 20 75 73 61 67 65 52 6f 6f 74 2e 41 64 64 43 68 69 6c 64 28 63 68 ...........usageRoot.AddChild(ch
2240 69 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ild);..................}........
2260 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 75 73 61 67 ......}..............return.usag
2280 65 52 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 eRoot;..........}............pri
22a0 76 61 74 65 20 76 6f 69 64 20 41 64 64 49 74 65 6d 73 46 6f 72 44 65 76 69 63 65 73 28 41 64 76 vate.void.AddItemsForDevices(Adv
22c0 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 70 61 72 65 6e 74 29 0d 0a 20 20 20 20 20 ancedDropdownItem.parent).......
22e0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 64 65 76 69 63 65 73 ...{..............//.Add.devices
2300 20 74 68 61 74 20 61 72 65 20 6d 61 72 6b 65 64 20 61 73 20 67 65 6e 65 72 69 63 20 74 79 70 65 .that.are.marked.as.generic.type
2320 73 20 6f 66 20 64 65 76 69 63 65 73 20 64 69 72 65 63 74 6c 79 20 74 6f 20 74 68 65 20 70 61 72 s.of.devices.directly.to.the.par
2340 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 2e 67 2e 20 61 64 64 73 20 22 ent...............//.E.g..adds."
2360 47 61 6d 65 70 61 64 22 20 61 6e 64 20 74 68 65 6e 20 75 6e 64 65 72 6e 65 61 74 68 20 61 6c 6c Gamepad".and.then.underneath.all
2380 20 74 68 65 20 6d 6f 72 65 20 73 70 65 63 69 66 69 63 20 74 79 70 65 73 20 6f 66 20 67 61 6d 65 .the.more.specific.types.of.game
23a0 70 61 64 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 pads...............foreach.(var.
23c0 64 65 76 69 63 65 4c 61 79 6f 75 74 20 69 6e 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 deviceLayout.in.EditorInputContr
23e0 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 61 6c 6c 4c 61 79 6f 75 74 73 0d 0a 20 20 20 20 20 20 olLayoutCache.allLayouts........
2400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 68 65 72 65 28 78 20 3d 3e 20 78 2e 69 73 44 ................Where(x.=>.x.isD
2420 65 76 69 63 65 4c 61 79 6f 75 74 20 26 26 20 21 78 2e 69 73 4f 76 65 72 72 69 64 65 20 26 26 20 eviceLayout.&&.!x.isOverride.&&.
2440 78 2e 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 20 26 26 20 21 78 2e 68 69 x.isGenericTypeOfDevice.&&.!x.hi
2460 64 65 49 6e 55 49 29 2e 4f 72 64 65 72 42 79 28 61 20 3d 3e 20 61 2e 64 69 73 70 6c 61 79 4e 61 deInUI).OrderBy(a.=>.a.displayNa
2480 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 44 65 76 69 63 65 54 me))..................AddDeviceT
24a0 72 65 65 49 74 65 6d 52 65 63 75 72 73 69 76 65 28 64 65 76 69 63 65 4c 61 79 6f 75 74 2c 20 70 reeItemRecursive(deviceLayout,.p
24c0 61 72 65 6e 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 68 61 76 arent);................//.We.hav
24e0 65 20 64 65 76 69 63 65 73 20 74 68 61 74 20 61 72 65 20 62 61 73 65 64 20 64 69 72 65 63 74 6c e.devices.that.are.based.directl
2500 79 20 6f 6e 20 49 6e 70 75 74 44 65 76 69 63 65 20 62 75 74 20 61 72 65 20 6e 6f 74 20 6d 61 72 y.on.InputDevice.but.are.not.mar
2520 6b 65 64 20 61 73 20 67 65 6e 65 72 69 63 20 74 79 70 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 ked.as.generic.types............
2540 20 20 2f 2f 20 6f 66 20 64 65 76 69 63 65 73 20 28 65 2e 67 2e 20 56 69 76 65 20 4c 69 67 68 74 ..//.of.devices.(e.g..Vive.Light
2560 68 6f 75 73 65 73 29 2e 20 57 65 20 64 6f 20 6e 6f 74 20 77 61 6e 74 20 74 68 65 6d 20 74 6f 20 houses)..We.do.not.want.them.to.
2580 63 6c 75 74 74 65 72 20 74 68 65 20 6c 69 73 74 20 61 74 20 74 68 65 20 72 6f 6f 74 20 73 6f 20 clutter.the.list.at.the.root.so.
25a0 77 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 6c 6c 20 6f 66 20 74 68 65 6d 20 69 we..............//.all.of.them.i
25c0 6e 20 61 20 67 72 6f 75 70 20 63 61 6c 6c 65 64 20 22 4f 74 68 65 72 22 20 61 74 20 74 68 65 20 n.a.group.called."Other".at.the.
25e0 65 6e 64 20 6f 66 20 74 68 65 20 6c 69 73 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 end.of.the.list...............va
2600 72 20 6f 74 68 65 72 47 72 6f 75 70 20 3d 20 6e 65 77 20 41 64 76 61 6e 63 65 64 44 72 6f 70 64 r.otherGroup.=.new.AdvancedDropd
2620 6f 77 6e 49 74 65 6d 28 22 4f 74 68 65 72 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 ownItem("Other");..............f
2640 6f 72 65 61 63 68 20 28 76 61 72 20 64 65 76 69 63 65 4c 61 79 6f 75 74 20 69 6e 20 45 64 69 74 oreach.(var.deviceLayout.in.Edit
2660 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 61 6c 6c 4c 61 79 orInputControlLayoutCache.allLay
2680 6f 75 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 68 65 72 outs........................Wher
26a0 65 28 78 20 3d 3e 20 78 2e 69 73 44 65 76 69 63 65 4c 61 79 6f 75 74 20 26 26 20 21 78 2e 69 73 e(x.=>.x.isDeviceLayout.&&.!x.is
26c0 4f 76 65 72 72 69 64 65 20 26 26 20 21 78 2e 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 Override.&&.!x.isGenericTypeOfDe
26e0 76 69 63 65 20 26 26 20 78 2e 74 79 70 65 2e 42 61 73 65 54 79 70 65 20 3d 3d 20 74 79 70 65 6f vice.&&.x.type.BaseType.==.typeo
2700 66 28 49 6e 70 75 74 44 65 76 69 63 65 29 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 f(InputDevice).&&...............
2720 20 20 20 20 20 20 20 20 20 20 20 20 21 78 2e 68 69 64 65 49 6e 55 49 20 26 26 20 21 78 2e 62 61 ............!x.hideInUI.&&.!x.ba
2740 73 65 4c 61 79 6f 75 74 73 2e 41 6e 79 28 29 29 2e 4f 72 64 65 72 42 79 28 61 20 3d 3e 20 61 2e seLayouts.Any()).OrderBy(a.=>.a.
2760 64 69 73 70 6c 61 79 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 displayName))..................A
2780 64 64 44 65 76 69 63 65 54 72 65 65 49 74 65 6d 52 65 63 75 72 73 69 76 65 28 64 65 76 69 63 65 ddDeviceTreeItemRecursive(device
27a0 4c 61 79 6f 75 74 2c 20 6f 74 68 65 72 47 72 6f 75 70 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 Layout,.otherGroup);............
27c0 20 20 20 20 69 66 20 28 6f 74 68 65 72 47 72 6f 75 70 2e 63 68 69 6c 64 72 65 6e 2e 41 6e 79 28 ....if.(otherGroup.children.Any(
27e0 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 43 68 ))..................parent.AddCh
2800 69 6c 64 28 6f 74 68 65 72 47 72 6f 75 70 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ild(otherGroup);..........}.....
2820 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 41 64 64 44 65 76 69 63 65 54 72 65 .......private.void.AddDeviceTre
2840 65 49 74 65 6d 52 65 63 75 72 73 69 76 65 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 eItemRecursive(InputControlLayou
2860 74 20 6c 61 79 6f 75 74 2c 20 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 70 t.layout,.AdvancedDropdownItem.p
2880 61 72 65 6e 74 2c 20 62 6f 6f 6c 20 73 65 61 72 63 68 61 62 6c 65 20 3d 20 74 72 75 65 29 0d 0a arent,.bool.searchable.=.true)..
28a0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 61 ........{..............//.Find.a
28c0 6c 6c 20 6c 61 79 6f 75 74 73 20 64 69 72 65 63 74 6c 79 20 62 61 73 65 64 20 6f 6e 20 74 68 69 ll.layouts.directly.based.on.thi
28e0 73 20 6f 6e 65 20 28 69 67 6e 6f 72 69 6e 67 20 6f 76 65 72 72 69 64 65 73 29 2e 0d 0a 20 20 20 s.one.(ignoring.overrides)......
2900 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 69 6c 64 4c 61 79 6f 75 74 73 20 3d 20 45 64 69 74 .........var.childLayouts.=.Edit
2920 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 61 6c 6c 4c 61 79 orInputControlLayoutCache.allLay
2940 6f 75 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 68 65 72 65 28 78 20 3d outs...................Where(x.=
2960 3e 20 78 2e 69 73 44 65 76 69 63 65 4c 61 79 6f 75 74 20 26 26 20 21 78 2e 69 73 4f 76 65 72 72 >.x.isDeviceLayout.&&.!x.isOverr
2980 69 64 65 20 26 26 20 21 78 2e 68 69 64 65 49 6e 55 49 20 26 26 20 78 2e 62 61 73 65 4c 61 79 6f ide.&&.!x.hideInUI.&&.x.baseLayo
29a0 75 74 73 2e 43 6f 6e 74 61 69 6e 73 28 6c 61 79 6f 75 74 2e 6e 61 6d 65 29 29 2e 4f 72 64 65 72 uts.Contains(layout.name)).Order
29c0 42 79 28 78 20 3d 3e 20 78 2e 64 69 73 70 6c 61 79 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 By(x.=>.x.displayName);.........
29e0 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 74 68 65 20 65 6e 74 69 72 65 20 74 72 65 65 .......//.See.if.the.entire.tree
2a00 20 73 68 6f 75 6c 64 20 62 65 20 65 78 63 6c 75 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 .should.be.excluded.............
2a20 20 20 76 61 72 20 73 68 6f 75 6c 64 49 6e 63 6c 75 64 65 44 65 76 69 63 65 4c 61 79 6f 75 74 20 ..var.shouldIncludeDeviceLayout.
2a40 3d 20 53 68 6f 75 6c 64 49 6e 63 6c 75 64 65 44 65 76 69 63 65 4c 61 79 6f 75 74 28 6c 61 79 6f =.ShouldIncludeDeviceLayout(layo
2a60 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 68 6f 75 6c 64 49 6e 63 6c ut);..............var.shouldIncl
2a80 75 64 65 41 74 4c 65 61 73 74 4f 6e 65 43 68 69 6c 64 4c 61 79 6f 75 74 20 3d 20 63 68 69 6c 64 udeAtLeastOneChildLayout.=.child
2aa0 4c 61 79 6f 75 74 73 2e 41 6e 79 28 53 68 6f 75 6c 64 49 6e 63 6c 75 64 65 44 65 76 69 63 65 4c Layouts.Any(ShouldIncludeDeviceL
2ac0 61 79 6f 75 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 68 6f 75 ayout);................if.(!shou
2ae0 6c 64 49 6e 63 6c 75 64 65 44 65 76 69 63 65 4c 61 79 6f 75 74 20 26 26 20 21 73 68 6f 75 6c 64 ldIncludeDeviceLayout.&&.!should
2b00 49 6e 63 6c 75 64 65 41 74 4c 65 61 73 74 4f 6e 65 43 68 69 6c 64 4c 61 79 6f 75 74 29 0d 0a 20 IncludeAtLeastOneChildLayout)...
2b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 ...............return;..........
2b40 20 20 20 20 20 20 2f 2f 20 41 64 64 20 74 6f 70 6c 65 76 65 6c 20 69 74 65 6d 20 66 6f 72 20 64 ......//.Add.toplevel.item.for.d
2b60 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 49 74 evice...............var.deviceIt
2b80 65 6d 20 3d 20 6e 65 77 20 44 65 76 69 63 65 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 6c 61 79 6f em.=.new.DeviceDropdownItem(layo
2ba0 75 74 2c 20 73 65 61 72 63 68 61 62 6c 65 3a 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 20 20 ut,.searchable:.searchable);....
2bc0 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 43 68 69 6c 64 28 64 65 76 69 63 65 ..........parent.AddChild(device
2be0 49 74 65 6d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 6f 6d Item);................//.Add.com
2c00 6d 6f 6e 20 75 73 61 67 65 20 76 61 72 69 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 mon.usage.variants..............
2c20 20 69 66 20 28 6c 61 79 6f 75 74 2e 63 6f 6d 6d 6f 6e 55 73 61 67 65 73 2e 43 6f 75 6e 74 20 3e .if.(layout.commonUsages.Count.>
2c40 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .0)..............{..............
2c60 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 75 73 61 67 65 20 69 6e 20 6c 61 79 6f 75 74 ....foreach.(var.usage.in.layout
2c80 2e 63 6f 6d 6d 6f 6e 55 73 61 67 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .commonUsages)..................
2ca0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 75 73 61 67 65 {......................var.usage
2cc0 49 74 65 6d 20 3d 20 6e 65 77 20 44 65 76 69 63 65 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 6c 61 Item.=.new.DeviceDropdownItem(la
2ce0 79 6f 75 74 2c 20 75 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 yout,.usage);...................
2d00 20 20 20 69 66 20 28 6d 5f 4d 6f 64 65 20 3d 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 ...if.(m_Mode.==.InputControlPic
2d20 6b 65 72 2e 4d 6f 64 65 2e 50 69 63 6b 43 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 ker.Mode.PickControl)...........
2d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 54 72 65 65 49 74 65 ...............AddControlTreeIte
2d60 6d 73 52 65 63 75 72 73 69 76 65 28 6c 61 79 6f 75 74 2c 20 75 73 61 67 65 49 74 65 6d 2c 20 6c msRecursive(layout,.usageItem,.l
2d80 61 79 6f 75 74 2e 6e 61 6d 65 2c 20 75 73 61 67 65 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d ayout.name,.usage,.searchable);.
2da0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 49 74 65 6d 2e .....................deviceItem.
2dc0 41 64 64 43 68 69 6c 64 28 75 73 61 67 65 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 AddChild(usageItem);............
2de0 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 49 ......}..................deviceI
2e00 74 65 6d 2e 41 64 64 53 65 70 61 72 61 74 6f 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 tem.AddSeparator();.............
2e20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 6f 6e 74 72 6f 6c .}................//.Add.control
2e40 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4d 6f 64 65 20 21 3d 20 49 6e s...............if.(m_Mode.!=.In
2e60 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 2e 4d 6f 64 65 2e 50 69 63 6b 44 65 76 69 63 65 putControlPicker.Mode.PickDevice
2e80 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
2ea0 20 20 2f 2f 20 54 68 65 20 6b 65 79 62 6f 61 72 64 20 69 73 20 73 70 65 63 69 61 6c 20 69 6e 20 ..//.The.keyboard.is.special.in.
2ec0 74 68 61 74 20 77 65 20 77 61 6e 74 20 74 6f 20 61 6c 6c 6f 77 20 62 69 6e 64 69 6e 67 20 62 79 that.we.want.to.allow.binding.by
2ee0 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 20 28 69 2e 65 2e 20 63 68 61 72 61 63 74 65 72 0d 0a 20 .display.name.(i.e..character...
2f00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 61 ...............//.generated.by.a
2f20 20 6b 65 79 29 20 69 6e 73 74 65 61 64 20 6f 66 20 6f 6e 6c 79 20 62 79 20 70 68 79 73 69 63 61 .key).instead.of.only.by.physica
2f40 6c 20 6b 65 79 20 6c 6f 63 61 74 69 6f 6e 2e 20 41 6c 73 6f 2c 20 77 65 20 77 61 6e 74 20 74 6f l.key.location..Also,.we.want.to
2f60 20 67 69 76 65 20 61 6e 20 69 6e 64 69 63 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .give.an.indication.............
2f80 20 20 20 20 20 2f 2f 20 6f 66 20 77 68 69 63 68 20 73 70 65 63 69 66 69 63 20 6b 65 79 20 61 6e .....//.of.which.specific.key.an
2fa0 20 65 6e 74 72 79 20 72 65 66 65 72 73 20 74 6f 20 62 79 20 74 61 6b 69 6e 67 20 74 68 65 20 63 .entry.refers.to.by.taking.the.c
2fc0 75 72 72 65 6e 74 20 6b 65 79 62 6f 61 72 64 20 6c 61 79 6f 75 74 20 69 6e 74 6f 20 61 63 63 6f urrent.keyboard.layout.into.acco
2fe0 75 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 unt...................//........
3000 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6f 20 77 68 61 74 20 77 65 20 64 6f 20 69 73 20 61 64 ..........//.So.what.we.do.is.ad
3020 64 20 61 6e 20 65 78 74 72 61 20 6c 65 76 65 6c 20 74 6f 20 74 68 65 20 6b 65 79 62 6f 61 72 64 d.an.extra.level.to.the.keyboard
3040 20 77 68 65 72 65 20 6b 65 79 27 73 20 63 61 6e 20 62 65 20 62 6f 75 6e 64 20 62 79 20 63 68 61 .where.key's.can.be.bound.by.cha
3060 72 61 63 74 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 63 63 6f 72 racter..................//.accor
3080 64 69 6e 67 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 20 6c 61 79 6f 75 74 2e 20 41 6e 64 20 ding.to.the.current.layout..And.
30a0 69 6e 20 74 68 65 20 74 6f 70 20 6c 65 76 65 6c 20 6f 66 20 74 68 65 20 6b 65 79 62 6f 61 72 64 in.the.top.level.of.the.keyboard
30c0 20 77 65 20 64 69 73 70 6c 61 79 20 6b 65 79 73 20 77 69 74 68 0d 0a 20 20 20 20 20 20 20 20 20 .we.display.keys.with...........
30e0 20 20 20 20 20 20 20 2f 2f 20 62 6f 74 68 20 70 68 79 73 69 63 61 6c 20 61 6e 64 20 6c 6f 67 69 .......//.both.physical.and.logi
3100 63 61 6c 20 6e 61 6d 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 cal.names...................if.(
3120 6c 61 79 6f 75 74 2e 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 4b 65 79 62 6f 61 72 64 29 20 layout.type.==.typeof(Keyboard).
3140 26 26 20 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 &&.Keyboard.current.!=.null)....
3160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
3180 20 20 20 20 20 76 61 72 20 62 79 4c 6f 63 61 74 69 6f 6e 47 72 6f 75 70 20 3d 20 6e 65 77 20 41 .....var.byLocationGroup.=.new.A
31a0 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 22 42 79 20 4c 6f 63 61 74 69 6f 6e dvancedDropdownItem("By.Location
31c0 20 6f 66 20 4b 65 79 20 28 55 73 69 6e 67 20 55 53 20 4c 61 79 6f 75 74 29 22 29 3b 0d 0a 20 20 .of.Key.(Using.US.Layout)");....
31e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 79 43 68 61 72 61 63 74 65 ..................var.byCharacte
3200 72 47 72 6f 75 70 20 3d 20 6e 65 77 20 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 rGroup.=.new.AdvancedDropdownIte
3220 6d 28 22 42 79 20 43 68 61 72 61 63 74 65 72 20 4d 61 70 70 65 64 20 74 6f 20 4b 65 79 22 29 3b m("By.Character.Mapped.to.Key");
3240 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 49 74 ........................deviceIt
3260 65 6d 2e 41 64 64 43 68 69 6c 64 28 62 79 4c 6f 63 61 74 69 6f 6e 47 72 6f 75 70 29 3b 0d 0a 20 em.AddChild(byLocationGroup);...
3280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 49 74 65 6d 2e 41 64 ...................deviceItem.Ad
32a0 64 43 68 69 6c 64 28 62 79 43 68 61 72 61 63 74 65 72 47 72 6f 75 70 29 3b 0d 0a 0d 0a 20 20 20 dChild(byCharacterGroup);.......
32c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6b 65 79 62 6f 61 72 64 20 3d 20 .................var.keyboard.=.
32e0 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Keyboard.current;...............
3300 20 20 20 20 20 20 20 20 20 41 64 64 43 68 61 72 61 63 74 65 72 4b 65 79 42 69 6e 64 69 6e 67 73 .........AddCharacterKeyBindings
3320 54 6f 28 62 79 43 68 61 72 61 63 74 65 72 47 72 6f 75 70 2c 20 6b 65 79 62 6f 61 72 64 29 3b 0d To(byCharacterGroup,.keyboard);.
3340 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 50 68 79 73 69 63 61 6c .....................AddPhysical
3360 4b 65 79 42 69 6e 64 69 6e 67 73 54 6f 28 62 79 4c 6f 63 61 74 69 6f 6e 47 72 6f 75 70 2c 20 6b KeyBindingsTo(byLocationGroup,.k
3380 65 79 62 6f 61 72 64 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 eyboard,.searchable);...........
33a0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6e 79 4b 65 79 20 77 6f 6e 27 74 20 61 70 70 .............//.AnyKey.won't.app
33c0 65 61 72 20 69 6e 20 65 69 74 68 65 72 20 67 72 6f 75 70 2e 20 41 64 64 20 69 74 20 65 78 70 6c ear.in.either.group..Add.it.expl
33e0 69 63 69 74 6c 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 icitly.......................Add
3400 43 6f 6e 74 72 6f 6c 49 74 65 6d 28 64 65 76 69 63 65 49 74 65 6d 2c 20 6e 75 6c 6c 2c 0d 0a 20 ControlItem(deviceItem,.null,...
3420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 46 69 .......................layout.Fi
3440 6e 64 43 6f 6e 74 72 6f 6c 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 22 61 6e ndControl(new.InternedString("an
3460 79 4b 65 79 22 29 29 2e 56 61 6c 75 65 2c 20 6c 61 79 6f 75 74 2e 6e 61 6d 65 2c 20 6e 75 6c 6c yKey")).Value,.layout.name,.null
3480 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ,.searchable);..................
34a0 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 }..................else.........
34c0 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
34e0 41 64 64 43 6f 6e 74 72 6f 6c 54 72 65 65 49 74 65 6d 73 52 65 63 75 72 73 69 76 65 28 6c 61 79 AddControlTreeItemsRecursive(lay
3500 6f 75 74 2c 20 64 65 76 69 63 65 49 74 65 6d 2c 20 6c 61 79 6f 75 74 2e 6e 61 6d 65 2c 20 6e 75 out,.deviceItem,.layout.name,.nu
3520 6c 6c 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ll,.searchable);................
3540 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ..}..............}..............
3560 20 20 2f 2f 20 41 64 64 20 63 68 69 6c 64 20 69 74 65 6d 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 ..//.Add.child.items............
3580 20 20 20 76 61 72 20 69 73 46 69 72 73 74 43 68 69 6c 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 ...var.isFirstChild.=.true;.....
35a0 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 4c 61 79 6f 75 .........foreach.(var.childLayou
35c0 74 20 69 6e 20 63 68 69 6c 64 4c 61 79 6f 75 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 t.in.childLayouts)..............
35e0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 53 68 6f 75 6c 64 49 6e {..................if.(!ShouldIn
3600 63 6c 75 64 65 44 65 76 69 63 65 4c 61 79 6f 75 74 28 63 68 69 6c 64 4c 61 79 6f 75 74 29 29 0d cludeDeviceLayout(childLayout)).
3620 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a .....................continue;..
3640 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 46 69 72 73 74 43 68 69 ..................if.(isFirstChi
3660 6c 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 49 ld)......................deviceI
3680 74 65 6d 2e 41 64 64 53 65 70 61 72 61 74 6f 72 28 22 4d 6f 72 65 20 53 70 65 63 69 66 69 63 20 tem.AddSeparator("More.Specific.
36a0 22 20 2b 20 64 65 76 69 63 65 49 74 65 6d 2e 6e 61 6d 65 2e 47 65 74 50 6c 75 72 61 6c 28 29 29 ".+.deviceItem.name.GetPlural())
36c0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 46 69 72 73 74 43 68 69 6c 64 20 ;..................isFirstChild.
36e0 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 44 =.false;....................AddD
3700 65 76 69 63 65 54 72 65 65 49 74 65 6d 52 65 63 75 72 73 69 76 65 28 63 68 69 6c 64 4c 61 79 6f eviceTreeItemRecursive(childLayo
3720 75 74 2c 20 64 65 76 69 63 65 49 74 65 6d 2c 20 73 65 61 72 63 68 61 62 6c 65 20 26 26 20 21 63 ut,.deviceItem,.searchable.&&.!c
3740 68 69 6c 64 4c 61 79 6f 75 74 2e 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 hildLayout.isGenericTypeOfDevice
3760 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 );..............}...............
3780 20 2f 2f 20 57 68 65 6e 20 70 69 63 6b 69 6e 67 20 64 65 76 69 63 65 73 2c 20 69 74 20 6d 75 73 .//.When.picking.devices,.it.mus
37a0 74 20 62 65 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 73 65 6c 65 63 74 20 61 20 64 65 76 69 63 65 t.be.possible.to.select.a.device
37c0 20 74 68 61 74 20 69 74 73 65 6c 66 20 68 61 73 20 6d 6f 72 65 20 73 70 65 63 69 66 69 63 20 74 .that.itself.has.more.specific.t
37e0 79 70 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 66 20 64 65 76 69 63 65 73 20 ypes..............//.of.devices.
3800 75 6e 64 65 72 6e 65 61 74 68 20 69 74 2e 20 48 6f 77 65 76 65 72 20 69 6e 20 74 68 65 20 64 72 underneath.it..However.in.the.dr
3820 6f 70 64 6f 77 6e 2c 20 73 75 63 68 20 61 20 64 65 76 69 63 65 20 77 69 6c 6c 20 62 65 20 61 20 opdown,.such.a.device.will.be.a.
3840 66 6f 6c 64 6f 75 74 20 61 6e 64 20 6e 6f 74 20 69 74 73 65 6c 66 0d 0a 20 20 20 20 20 20 20 20 foldout.and.not.itself..........
3860 20 20 20 20 2f 2f 20 62 65 20 73 65 6c 65 63 74 61 62 6c 65 2e 20 57 65 20 73 6f 6c 76 65 20 74 ....//.be.selectable..We.solve.t
3880 68 69 73 20 70 72 6f 62 6c 65 6d 20 62 79 20 61 64 64 69 6e 67 20 61 6e 20 65 6e 74 72 79 20 66 his.problem.by.adding.an.entry.f
38a0 6f 72 20 74 68 65 20 64 65 76 69 63 65 20 75 6e 64 65 72 6e 65 61 74 68 20 74 68 65 20 64 65 76 or.the.device.underneath.the.dev
38c0 69 63 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 74 73 65 6c 66 20 28 65 2e 67 2e ice..............//.itself.(e.g.
38e0 20 22 47 61 6d 65 70 61 64 20 3e 3e 20 47 61 6d 65 70 61 64 22 29 2e 0d 0a 20 20 20 20 20 20 20 ."Gamepad.>>.Gamepad")..........
3900 20 20 20 20 20 69 66 20 28 6d 5f 4d 6f 64 65 20 3d 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 .....if.(m_Mode.==.InputControlP
3920 69 63 6b 65 72 2e 4d 6f 64 65 2e 50 69 63 6b 44 65 76 69 63 65 20 26 26 20 64 65 76 69 63 65 49 icker.Mode.PickDevice.&&.deviceI
3940 74 65 6d 2e 6d 5f 43 68 69 6c 64 72 65 6e 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 tem.m_Children.Count.>.0).......
3960 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 .......{..................var.it
3980 65 6d 20 3d 20 6e 65 77 20 44 65 76 69 63 65 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 6c 61 79 6f em.=.new.DeviceDropdownItem(layo
39a0 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 49 74 65 6d ut);..................deviceItem
39c0 2e 6d 5f 43 68 69 6c 64 72 65 6e 2e 49 6e 73 65 72 74 28 30 2c 20 69 74 65 6d 29 3b 0d 0a 20 20 .m_Children.Insert(0,.item);....
39e0 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ..........}..........}..........
3a00 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 41 64 64 43 6f 6e 74 72 6f 6c 54 72 65 65 49 74 65 ..private.void.AddControlTreeIte
3a20 6d 73 52 65 63 75 72 73 69 76 65 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 6c msRecursive(InputControlLayout.l
3a40 61 79 6f 75 74 2c 20 44 65 76 69 63 65 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 70 61 72 65 6e 74 ayout,.DeviceDropdownItem.parent
3a60 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 64 65 76 69 63 65 2c 20 73 74 ,..............string.device,.st
3a80 72 69 6e 67 20 75 73 61 67 65 2c 20 62 6f 6f 6c 20 73 65 61 72 63 68 61 62 6c 65 2c 20 43 6f 6e ring.usage,.bool.searchable,.Con
3aa0 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 70 61 72 65 6e 74 43 6f 6e 74 72 6f 6c 20 3d trolDropdownItem.parentControl.=
3ac0 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 .null)..........{..............f
3ae0 6f 72 65 61 63 68 20 28 76 61 72 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 6c 61 79 6f 75 74 2e 63 6f oreach.(var.control.in.layout.co
3b00 6e 74 72 6f 6c 73 2e 4f 72 64 65 72 42 79 28 61 20 3d 3e 20 61 2e 6e 61 6d 65 29 29 0d 0a 20 20 ntrols.OrderBy(a.=>.a.name))....
3b20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ..........{..................if.
3b40 28 63 6f 6e 74 72 6f 6c 2e 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 (control.isModifyingExistingCont
3b60 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e rol)......................contin
3b80 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6b 69 70 20 76 ue;....................//.Skip.v
3ba0 61 72 69 61 6e 74 73 20 65 78 63 65 70 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 72 69 61 ariants.except.the.default.varia
3bc0 6e 74 20 61 6e 64 20 76 61 72 69 61 6e 74 73 20 64 69 63 74 61 74 65 64 20 62 79 20 74 68 65 20 nt.and.variants.dictated.by.the.
3be0 6c 61 79 6f 75 74 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layout.itself...................
3c00 69 66 20 28 21 63 6f 6e 74 72 6f 6c 2e 76 61 72 69 61 6e 74 73 2e 49 73 45 6d 70 74 79 28 29 20 if.(!control.variants.IsEmpty().
3c20 26 26 20 63 6f 6e 74 72 6f 6c 2e 76 61 72 69 61 6e 74 73 20 21 3d 20 49 6e 70 75 74 43 6f 6e 74 &&.control.variants.!=.InputCont
3c40 72 6f 6c 4c 61 79 6f 75 74 2e 44 65 66 61 75 6c 74 56 61 72 69 61 6e 74 0d 0a 20 20 20 20 20 20 rolLayout.DefaultVariant........
3c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 26 20 28 6c 61 79 6f 75 74 2e 76 61 72 69 61 6e 74 ..............&&.(layout.variant
3c80 73 2e 49 73 45 6d 70 74 79 28 29 20 7c 7c 20 21 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f s.IsEmpty().||.!InputControlLayo
3ca0 75 74 2e 56 61 72 69 61 6e 74 73 4d 61 74 63 68 28 6c 61 79 6f 75 74 2e 76 61 72 69 61 6e 74 73 ut.VariantsMatch(layout.variants
3cc0 2c 20 63 6f 6e 74 72 6f 6c 2e 76 61 72 69 61 6e 74 73 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 ,.control.variants)))...........
3ce0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f .......{......................co
3d00 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ntinue;..................}......
3d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 28 70 61 72 ..............AddControlItem(par
3d40 65 6e 74 2c 20 70 61 72 65 6e 74 43 6f 6e 74 72 6f 6c 2c 20 63 6f 6e 74 72 6f 6c 2c 20 64 65 76 ent,.parentControl,.control,.dev
3d60 69 63 65 2c 20 75 73 61 67 65 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 20 20 20 20 20 20 ice,.usage,.searchable);........
3d80 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6f 70 ......}................//.Add.op
3da0 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 73 20 66 6f 72 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 tional.controls.for.devices.....
3dc0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 73 20 3d ..........var.optionalControls.=
3de0 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 47 .EditorInputControlLayoutCache.G
3e00 65 74 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 73 46 6f 72 4c 61 79 6f 75 74 28 6c 61 79 6f etOptionalControlsForLayout(layo
3e20 75 74 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 70 74 69 6f ut.name);..............if.(optio
3e40 6e 61 6c 43 6f 6e 74 72 6f 6c 73 2e 41 6e 79 28 29 20 26 26 20 6c 61 79 6f 75 74 2e 69 73 44 65 nalControls.Any().&&.layout.isDe
3e60 76 69 63 65 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 viceLayout)..............{......
3e80 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 70 74 69 6f 6e 61 6c 47 72 6f 75 70 20 3d 20 ............var.optionalGroup.=.
3ea0 6e 65 77 20 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 22 4f 70 74 69 6f 6e new.AdvancedDropdownItem("Option
3ec0 61 6c 20 43 6f 6e 74 72 6f 6c 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 al.Controls");..................
3ee0 66 6f 72 65 61 63 68 20 28 76 61 72 20 6f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 20 69 6e 20 foreach.(var.optionalControl.in.
3f00 6f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 optionalControls)...............
3f20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 ...{......................////FI
3f40 58 4d 45 3a 20 74 68 69 73 20 73 68 6f 75 6c 64 20 6c 69 73 74 20 63 68 69 6c 64 72 65 6e 2c 20 XME:.this.should.list.children,.
3f60 74 6f 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 58 too......................////FIX
3f80 4d 45 3a 20 74 68 69 73 20 73 68 6f 75 6c 64 20 68 61 6e 64 6c 65 20 61 72 72 61 79 73 2c 20 74 ME:.this.should.handle.arrays,.t
3fa0 6f 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 4c 61 79 6f oo......................if.(Layo
3fc0 75 74 4d 61 74 63 68 65 73 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 46 69 utMatchesExpectedControlLayoutFi
3fe0 6c 74 65 72 28 6f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 2e 6c 61 79 6f 75 74 29 29 0d 0a 20 lter(optionalControl.layout))...
4000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
4020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 69 6c 64 20 3d 20 6e 65 77 20 4f 70 ..............var.child.=.new.Op
4040 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 6f 70 74 69 6f 6e tionalControlDropdownItem(option
4060 61 6c 43 6f 6e 74 72 6f 6c 2c 20 64 65 76 69 63 65 2c 20 75 73 61 67 65 29 3b 0d 0a 20 20 20 20 alControl,.device,.usage);......
4080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 69 6c 64 2e 69 63 6f 6e 20 3d ....................child.icon.=
40a0 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 47 .EditorInputControlLayoutCache.G
40c0 65 74 49 63 6f 6e 46 6f 72 4c 61 79 6f 75 74 28 6f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 2e etIconForLayout(optionalControl.
40e0 6c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layout);........................
4100 20 20 6f 70 74 69 6f 6e 61 6c 47 72 6f 75 70 2e 41 64 64 43 68 69 6c 64 28 63 68 69 6c 64 29 3b ..optionalGroup.AddChild(child);
4120 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
4140 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .........}....................if
4160 20 28 6f 70 74 69 6f 6e 61 6c 47 72 6f 75 70 2e 63 68 69 6c 64 72 65 6e 2e 41 6e 79 28 29 29 0d .(optionalGroup.children.Any()).
4180 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
41a0 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 4e 61 6d 65 20 3d 20 45 64 69 74 6f 72 49 ........var.deviceName.=.EditorI
41c0 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 54 72 79 47 65 74 4c 61 79 nputControlLayoutCache.TryGetLay
41e0 6f 75 74 28 64 65 76 69 63 65 29 2e 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 20 3f 3f 0d 0a 20 20 out(device).m_DisplayName.??....
4200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 4e 61 6d 65 ......................ObjectName
4220 73 2e 4e 69 63 69 66 79 56 61 72 69 61 62 6c 65 4e 61 6d 65 28 64 65 76 69 63 65 29 3b 0d 0a 20 s.NicifyVariableName(device);...
4240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 53 65 70 ...................parent.AddSep
4260 61 72 61 74 6f 72 28 22 43 6f 6e 74 72 6f 6c 73 20 50 72 65 73 65 6e 74 20 6f 6e 20 4d 6f 72 65 arator("Controls.Present.on.More
4280 20 53 70 65 63 69 66 69 63 20 22 20 2b 20 64 65 76 69 63 65 4e 61 6d 65 2e 47 65 74 50 6c 75 72 .Specific.".+.deviceName.GetPlur
42a0 61 6c 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 al());......................pare
42c0 6e 74 2e 41 64 64 43 68 69 6c 64 28 6f 70 74 69 6f 6e 61 6c 47 72 6f 75 70 29 3b 0d 0a 20 20 20 nt.AddChild(optionalGroup);.....
42e0 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 .............}..............}...
4300 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 .......}............private.void
4320 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 28 44 65 76 69 63 65 44 72 6f 70 64 6f 77 6e 49 74 .AddControlItem(DeviceDropdownIt
4340 65 6d 20 70 61 72 65 6e 74 2c 20 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 70 em.parent,.ControlDropdownItem.p
4360 61 72 65 6e 74 43 6f 6e 74 72 6f 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 arentControl,..............Input
4380 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 43 6f 6e 74 72 6f 6c 49 74 65 6d 20 63 6f 6e 74 72 6f ControlLayout.ControlItem.contro
43a0 6c 2c 20 73 74 72 69 6e 67 20 64 65 76 69 63 65 2c 20 73 74 72 69 6e 67 20 75 73 61 67 65 2c 20 l,.string.device,.string.usage,.
43c0 62 6f 6f 6c 20 73 65 61 72 63 68 61 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 bool.searchable)..........{.....
43e0 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 69 74 27 73 20 61 6e 20 61 72 72 61 79 2c 20 67 65 .........//.If.it's.an.array,.ge
4400 6e 65 72 61 74 65 20 61 20 63 6f 6e 74 72 6f 6c 20 65 6e 74 72 79 20 66 6f 72 20 65 61 63 68 20 nerate.a.control.entry.for.each.
4420 61 72 72 61 79 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 array.element...............for.
4440 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 28 63 6f 6e 74 72 6f 6c 2e 69 73 41 72 72 61 79 (var.i.=.0;.i.<.(control.isArray
4460 20 3f 20 63 6f 6e 74 72 6f 6c 2e 61 72 72 61 79 53 69 7a 65 20 3a 20 31 29 3b 20 2b 2b 69 29 0d .?.control.arraySize.:.1);.++i).
4480 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
44a0 76 61 72 20 6e 61 6d 65 20 3d 20 63 6f 6e 74 72 6f 6c 2e 69 73 41 72 72 61 79 20 3f 20 63 6f 6e var.name.=.control.isArray.?.con
44c0 74 72 6f 6c 2e 6e 61 6d 65 20 2b 20 69 20 3a 20 63 6f 6e 74 72 6f 6c 2e 6e 61 6d 65 3b 0d 0a 20 trol.name.+.i.:.control.name;...
44e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d ...............var.displayName.=
4500 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 63 6f 6e 74 72 6f 6c 2e 64 .!string.IsNullOrEmpty(control.d
4520 69 73 70 6c 61 79 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 isplayName).....................
4540 20 3f 20 28 63 6f 6e 74 72 6f 6c 2e 69 73 41 72 72 61 79 20 3f 20 24 22 7b 63 6f 6e 74 72 6f 6c .?.(control.isArray.?.$"{control
4560 2e 64 69 73 70 6c 61 79 4e 61 6d 65 7d 20 23 7b 69 7d 22 20 3a 20 63 6f 6e 74 72 6f 6c 2e 64 69 .displayName}.#{i}".:.control.di
4580 73 70 6c 61 79 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 splayName)......................
45a0 3a 20 6e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 :.name;....................var.c
45c0 68 69 6c 64 20 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 70 hild.=.new.ControlDropdownItem(p
45e0 61 72 65 6e 74 43 6f 6e 74 72 6f 6c 2c 20 6e 61 6d 65 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 2c arentControl,.name,.displayName,
4600 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 2c 20 75 73 ......................device,.us
4620 61 67 65 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 age,.searchable);...............
4640 20 20 20 63 68 69 6c 64 2e 69 63 6f 6e 20 3d 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 ...child.icon.=.EditorInputContr
4660 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 47 65 74 49 63 6f 6e 46 6f 72 4c 61 79 6f 75 74 28 63 olLayoutCache.GetIconForLayout(c
4680 6f 6e 74 72 6f 6c 2e 6c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ontrol.layout);.................
46a0 20 76 61 72 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 3d 20 45 64 69 74 6f 72 49 6e 70 75 74 .var.controlLayout.=.EditorInput
46c0 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 54 72 79 47 65 74 4c 61 79 6f 75 74 28 ControlLayoutCache.TryGetLayout(
46e0 63 6f 6e 74 72 6f 6c 2e 6c 61 79 6f 75 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 control.layout);................
4700 20 20 20 20 69 66 20 28 4c 61 79 6f 75 74 4d 61 74 63 68 65 73 45 78 70 65 63 74 65 64 43 6f 6e ....if.(LayoutMatchesExpectedCon
4720 74 72 6f 6c 4c 61 79 6f 75 74 46 69 6c 74 65 72 28 63 6f 6e 74 72 6f 6c 2e 6c 61 79 6f 75 74 29 trolLayoutFilter(control.layout)
4740 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 )......................parent.Ad
4760 64 43 68 69 6c 64 28 63 68 69 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dChild(child);..................
4780 65 6c 73 65 20 69 66 20 28 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 6f 6e 74 72 6f 6c 73 2e else.if.(controlLayout.controls.
47a0 41 6e 79 28 78 20 3d 3e 20 4c 61 79 6f 75 74 4d 61 74 63 68 65 73 45 78 70 65 63 74 65 64 43 6f Any(x.=>.LayoutMatchesExpectedCo
47c0 6e 74 72 6f 6c 4c 61 79 6f 75 74 46 69 6c 74 65 72 28 78 2e 6c 61 79 6f 75 74 29 29 29 0d 0a 20 ntrolLayoutFilter(x.layout)))...
47e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
4800 20 20 20 20 20 20 63 68 69 6c 64 2e 65 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 ......child.enabled.=.false;....
4820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 43 68 69 6c ..................parent.AddChil
4840 64 28 63 68 69 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 d(child);..................}....
4860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 68 69 6c 64 72 65 6e 2e 0d 0a ..............//.Add.children...
4880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 ................if.(controlLayou
48a0 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.!=.null)......................
48c0 41 64 64 43 6f 6e 74 72 6f 6c 54 72 65 65 49 74 65 6d 73 52 65 63 75 72 73 69 76 65 28 63 6f 6e AddControlTreeItemsRecursive(con
48e0 74 72 6f 6c 4c 61 79 6f 75 74 2c 20 70 61 72 65 6e 74 2c 20 64 65 76 69 63 65 2c 20 75 73 61 67 trolLayout,.parent,.device,.usag
4900 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 61 72 e,..........................sear
4920 63 68 61 62 6c 65 2c 20 63 68 69 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a chable,.child);..............}..
4940 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 ........}............private.sta
4960 74 69 63 20 76 6f 69 64 20 41 64 64 50 68 79 73 69 63 61 6c 4b 65 79 42 69 6e 64 69 6e 67 73 54 tic.void.AddPhysicalKeyBindingsT
4980 6f 28 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 70 61 72 65 6e 74 2c 20 4b o(AdvancedDropdownItem.parent,.K
49a0 65 79 62 6f 61 72 64 20 6b 65 79 62 6f 61 72 64 2c 20 62 6f 6f 6c 20 73 65 61 72 63 68 61 62 6c eyboard.keyboard,.bool.searchabl
49c0 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 e)..........{..............forea
49e0 63 68 20 28 76 61 72 20 6b 65 79 20 69 6e 20 6b 65 79 62 6f 61 72 64 2e 63 68 69 6c 64 72 65 6e ch.(var.key.in.keyboard.children
4a00 2e 4f 66 54 79 70 65 3c 4b 65 79 43 6f 6e 74 72 6f 6c 3e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 .OfType<KeyControl>())..........
4a20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 ....{..................//.If.the
4a40 20 6b 65 79 20 68 61 73 20 61 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 20 74 68 61 74 20 64 69 66 .key.has.a.display.name.that.dif
4a60 66 65 72 73 20 66 72 6f 6d 20 74 68 65 20 6b 65 79 20 6e 61 6d 65 2c 20 73 68 6f 77 20 69 74 20 fers.from.the.key.name,.show.it.
4a80 69 6e 20 74 68 65 20 55 49 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 in.the.UI...................var.
4aa0 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 6b 65 79 2e 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 46 displayName.=.key.m_DisplayNameF
4ac0 72 6f 6d 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 romLayout;..................var.
4ae0 6b 65 79 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 6b 65 79 2e 64 69 73 70 6c 61 79 4e 61 6d 65 keyDisplayName.=.key.displayName
4b00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6b 65 79 44 69 73 70 6c 61 ;..................if.(keyDispla
4b20 79 4e 61 6d 65 2e 41 6c 6c 28 78 20 3d 3e 20 78 2e 49 73 50 72 69 6e 74 61 62 6c 65 28 29 29 20 yName.All(x.=>.x.IsPrintable()).
4b40 26 26 20 73 74 72 69 6e 67 2e 43 6f 6d 70 61 72 65 28 6b 65 79 44 69 73 70 6c 61 79 4e 61 6d 65 &&.string.Compare(keyDisplayName
4b60 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ,.displayName,..................
4b80 20 20 20 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 ....StringComparison.InvariantCu
4ba0 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 ltureIgnoreCase).!=.0)..........
4bc0 20 20 20 20 20 20 20 20 20 20 20 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 24 22 7b 64 69 73 ............displayName.=.$"{dis
4be0 70 6c 61 79 4e 61 6d 65 7d 20 28 43 75 72 72 65 6e 74 20 4c 61 79 6f 75 74 3a 20 7b 6b 65 79 2e playName}.(Current.Layout:.{key.
4c00 64 69 73 70 6c 61 79 4e 61 6d 65 7d 29 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 displayName})";.................
4c20 20 20 20 2f 2f 20 46 6f 72 20 6c 65 66 74 2f 72 69 67 68 74 20 6d 6f 64 69 66 69 65 72 20 6b 65 ...//.For.left/right.modifier.ke
4c40 79 73 2c 20 70 72 65 70 65 6e 64 20 61 72 74 69 66 69 63 69 61 6c 20 63 6f 6d 62 69 6e 65 64 20 ys,.prepend.artificial.combined.
4c60 76 65 72 73 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 75 74 74 6f 6e version...................Button
4c80 43 6f 6e 74 72 6f 6c 20 63 6f 6d 62 69 6e 65 64 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d Control.combinedVersion.=.null;.
4ca0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6b 65 79 20 3d 3d 20 6b 65 79 62 .................if.(key.==.keyb
4cc0 6f 61 72 64 2e 6c 65 66 74 53 68 69 66 74 4b 65 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 oard.leftShiftKey)..............
4ce0 20 20 20 20 20 20 20 20 63 6f 6d 62 69 6e 65 64 56 65 72 73 69 6f 6e 20 3d 20 6b 65 79 62 6f 61 ........combinedVersion.=.keyboa
4d00 72 64 2e 73 68 69 66 74 4b 65 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c rd.shiftKey;..................el
4d20 73 65 20 69 66 20 28 6b 65 79 20 3d 3d 20 6b 65 79 62 6f 61 72 64 2e 6c 65 66 74 41 6c 74 4b 65 se.if.(key.==.keyboard.leftAltKe
4d40 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6d 62 69 6e 65 64 y)......................combined
4d60 56 65 72 73 69 6f 6e 20 3d 20 6b 65 79 62 6f 61 72 64 2e 61 6c 74 4b 65 79 3b 0d 0a 20 20 20 20 Version.=.keyboard.altKey;......
4d80 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6b 65 79 20 3d 3d 20 6b 65 79 62 ............else.if.(key.==.keyb
4da0 6f 61 72 64 2e 6c 65 66 74 43 74 72 6c 4b 65 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 oard.leftCtrlKey)...............
4dc0 20 20 20 20 20 20 20 63 6f 6d 62 69 6e 65 64 56 65 72 73 69 6f 6e 20 3d 20 6b 65 79 62 6f 61 72 .......combinedVersion.=.keyboar
4de0 64 2e 63 74 72 6c 4b 65 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 d.ctrlKey;..................if.(
4e00 63 6f 6d 62 69 6e 65 64 56 65 72 73 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 combinedVersion.!=.null)........
4e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 43 68 69 6c 64 28 6e 65 ..............parent.AddChild(ne
4e40 77 20 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 6e 75 6c 6c 2c 20 63 6f 6d 62 w.ControlDropdownItem(null,.comb
4e60 69 6e 65 64 56 65 72 73 69 6f 6e 2e 6e 61 6d 65 2c 20 63 6f 6d 62 69 6e 65 64 56 65 72 73 69 6f inedVersion.name,.combinedVersio
4e80 6e 2e 64 69 73 70 6c 61 79 4e 61 6d 65 2c 20 6b 65 79 62 6f 61 72 64 2e 6c 61 79 6f 75 74 2c 0d n.displayName,.keyboard.layout,.
4ea0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 22 2c 20 73 65 61 ........................."",.sea
4ec0 72 63 68 61 62 6c 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 rchable));....................va
4ee0 72 20 69 74 65 6d 20 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d r.item.=.new.ControlDropdownItem
4f00 28 6e 75 6c 6c 2c 20 6b 65 79 2e 6e 61 6d 65 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 (null,.key.name,.displayName,...
4f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6b 65 79 62 6f 61 72 64 2e 6c 61 79 6f ...................keyboard.layo
4f40 75 74 2c 20 22 22 2c 20 73 65 61 72 63 68 61 62 6c 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ut,."",.searchable);............
4f60 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 43 68 69 6c 64 28 69 74 65 6d 29 3b 0d 0a ........parent.AddChild(item);..
4f80 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ............}..........}........
4fa0 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 64 64 43 68 61 72 61 ....private.static.void.AddChara
4fc0 63 74 65 72 4b 65 79 42 69 6e 64 69 6e 67 73 54 6f 28 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f cterKeyBindingsTo(AdvancedDropdo
4fe0 77 6e 49 74 65 6d 20 70 61 72 65 6e 74 2c 20 4b 65 79 62 6f 61 72 64 20 6b 65 79 62 6f 61 72 64 wnItem.parent,.Keyboard.keyboard
5000 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 )..........{..............foreac
5020 68 20 28 76 61 72 20 6b 65 79 20 69 6e 20 6b 65 79 62 6f 61 72 64 2e 63 68 69 6c 64 72 65 6e 2e h.(var.key.in.keyboard.children.
5040 4f 66 54 79 70 65 3c 4b 65 79 43 6f 6e 74 72 6f 6c 3e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 OfType<KeyControl>())...........
5060 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6b 65 79 2e 6b ...{..................if.(!key.k
5080 65 79 43 6f 64 65 2e 49 73 54 65 78 74 49 6e 70 75 74 4b 65 79 28 29 29 0d 0a 20 20 20 20 20 20 eyCode.IsTextInputKey())........
50a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 ..............continue;.........
50c0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 63 61 6e 20 6f 6e 6c 79 20 62 69 6e 64 20 74 ...........//.We.can.only.bind.t
50e0 6f 20 63 68 61 72 61 63 74 65 72 73 20 74 68 61 74 20 63 61 6e 20 62 65 20 70 72 69 6e 74 65 64 o.characters.that.can.be.printed
5100 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 69 73 70 6c 61 79 4e 61 ...................var.displayNa
5120 6d 65 20 3d 20 6b 65 79 2e 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 me.=.key.displayName;...........
5140 20 20 20 20 20 20 20 69 66 20 28 21 64 69 73 70 6c 61 79 4e 61 6d 65 2e 41 6c 6c 28 78 20 3d 3e .......if.(!displayName.All(x.=>
5160 20 78 2e 49 73 50 72 69 6e 74 61 62 6c 65 28 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .x.IsPrintable()))..............
5180 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ........continue;...............
51a0 20 20 20 20 20 69 66 20 28 64 69 73 70 6c 61 79 4e 61 6d 65 2e 43 6f 6e 74 61 69 6e 73 28 27 29 .....if.(displayName.Contains(')
51c0 27 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 73 70 6c 61 79 '))......................display
51e0 4e 61 6d 65 20 3d 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 22 2c 20 64 69 73 70 6c 61 79 4e 61 Name.=.string.Join("",.displayNa
5200 6d 65 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 22 5c 5c 22 20 2b 20 78 29 29 3b 0d 0a 0d 0a 20 20 me.Select(x.=>."\\".+.x));......
5220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 73 68 6f 75 6c 64 20 62 ..............////TODO:.should.b
5240 65 20 73 65 61 72 63 68 61 62 6c 65 3b 20 77 68 65 6e 20 73 65 61 72 63 68 69 6e 67 2c 20 6e 65 e.searchable;.when.searching,.ne
5260 65 64 73 20 64 69 66 66 65 72 65 6e 74 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 0d 0a 20 20 20 20 eds.different.display.name......
5280 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 20 3d 20 6e 65 77 20 43 6f 6e 74 72 ............var.item.=.new.Contr
52a0 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 28 6e 75 6c 6c 2c 20 24 22 23 28 7b 64 69 73 70 6c 61 olDropdownItem(null,.$"#({displa
52c0 79 4e 61 6d 65 7d 29 22 2c 20 22 22 2c 20 6b 65 79 62 6f 61 72 64 2e 6c 61 79 6f 75 74 2c 20 22 yName})",."",.keyboard.layout,."
52e0 22 2c 20 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d ",.false);..................item
5300 2e 6e 61 6d 65 20 3d 20 6b 65 79 2e 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 .name.=.key.displayName;........
5320 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 65 6e 74 2e 41 64 64 43 68 69 6c 64 28 69 74 65 6d ............parent.AddChild(item
5340 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a );..............}..........}....
5360 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 4c 61 79 6f 75 74 4d 61 74 63 68 ........private.bool.LayoutMatch
5380 65 73 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 46 69 6c 74 65 72 28 73 74 esExpectedControlLayoutFilter(st
53a0 72 69 6e 67 20 6c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ring.layout)..........{.........
53c0 20 20 20 20 20 69 66 20 28 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 20 3d .....if.(m_ExpectedControlType.=
53e0 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 =.null)..................return.
5400 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 54 true;................var.layoutT
5420 79 70 65 20 3d 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 73 5f 4d 61 6e 61 67 65 72 2e 6d 5f 4c 61 ype.=.InputSystem.s_Manager.m_La
5440 79 6f 75 74 73 2e 47 65 74 43 6f 6e 74 72 6f 6c 54 79 70 65 46 6f 72 4c 61 79 6f 75 74 28 6e 65 youts.GetControlTypeForLayout(ne
5460 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6c 61 79 6f 75 74 29 29 3b 0d 0a 20 20 20 20 w.InternedString(layout));......
5480 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c ........return.m_ExpectedControl
54a0 54 79 70 65 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 6c 61 79 6f 75 74 54 79 70 65 Type.IsAssignableFrom(layoutType
54c0 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 );..........}............private
54e0 20 62 6f 6f 6c 20 53 68 6f 75 6c 64 49 6e 63 6c 75 64 65 44 65 76 69 63 65 4c 61 79 6f 75 74 28 .bool.ShouldIncludeDeviceLayout(
5500 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 6c 61 79 6f 75 74 29 0d 0a 20 20 20 20 InputControlLayout.layout)......
5520 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 2e 68 69 ....{..............if.(layout.hi
5540 64 65 49 6e 55 49 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 deInUI)..................return.
5560 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 79 20 64 65 66 61 false;................//.By.defa
5580 75 6c 74 2c 20 69 66 20 61 20 64 65 76 69 63 65 20 68 61 73 20 6e 6f 20 28 75 73 61 62 6c 65 29 ult,.if.a.device.has.no.(usable)
55a0 20 63 6f 6e 74 72 6f 6c 73 2c 20 77 65 20 64 6f 6e 27 74 20 77 61 6e 74 20 69 74 20 6c 69 73 74 .controls,.we.don't.want.it.list
55c0 65 64 20 69 6e 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 70 69 63 6b 65 72 0d 0a 20 20 20 20 20 20 ed.in.the.control.picker........
55e0 20 20 20 20 20 20 2f 2f 20 65 78 63 65 70 74 20 69 66 20 77 65 27 72 65 20 70 69 63 6b 69 6e 67 ......//.except.if.we're.picking
5600 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6c 61 79 6f .devices...............if.(!layo
5620 75 74 2e 63 6f 6e 74 72 6f 6c 73 2e 41 6e 79 28 78 20 3d 3e 20 4c 61 79 6f 75 74 4d 61 74 63 68 ut.controls.Any(x.=>.LayoutMatch
5640 65 73 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 46 69 6c 74 65 72 28 78 2e esExpectedControlLayoutFilter(x.
5660 6c 61 79 6f 75 74 29 29 20 26 26 20 6c 61 79 6f 75 74 2e 63 6f 6e 74 72 6f 6c 73 2e 41 6e 79 28 layout)).&&.layout.controls.Any(
5680 78 20 3d 3e 20 74 72 75 65 29 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d x.=>.true).&&..................m
56a0 5f 4d 6f 64 65 20 21 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 2e 4d 6f 64 65 _Mode.!=.InputControlPicker.Mode
56c0 2e 50 69 63 6b 44 65 76 69 63 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 .PickDevice)..................re
56e0 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 turn.false;................//.If
5700 20 77 65 20 68 61 76 65 20 61 20 64 65 76 69 63 65 20 66 69 6c 74 65 72 2c 20 73 65 65 20 69 66 .we.have.a.device.filter,.see.if
5720 20 77 65 20 73 68 6f 75 6c 64 20 69 67 6e 6f 72 65 20 74 68 65 20 64 65 76 69 63 65 2e 0d 0a 20 .we.should.ignore.the.device....
5740 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 50 61 74 68 73 54 6f 4d ...........if.(m_ControlPathsToM
5760 61 74 63 68 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 43 6f 6e 74 72 6f 6c 50 61 74 68 73 54 6f atch.!=.null.&&.m_ControlPathsTo
5780 4d 61 74 63 68 2e 4c 65 6e 67 74 68 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b Match.Length.>.0)..............{
57a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 74 63 68 65 73 41 6e 79 ..................var.matchesAny
57c0 49 6e 44 65 76 69 63 65 46 69 6c 74 65 72 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 InDeviceFilter.=.false;.........
57e0 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6e 74 72 79 20 69 6e 20 6d .........foreach.(var.entry.in.m
5800 5f 43 6f 6e 74 72 6f 6c 50 61 74 68 73 54 6f 4d 61 74 63 68 29 0d 0a 20 20 20 20 20 20 20 20 20 _ControlPathsToMatch)...........
5820 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .......{......................//
5840 20 49 6e 63 6c 75 64 65 20 74 68 65 20 6c 61 79 6f 75 74 20 69 66 20 69 74 27 73 20 69 6e 20 74 .Include.the.layout.if.it's.in.t
5860 68 65 20 69 6e 68 65 72 69 74 61 6e 63 65 20 68 69 65 72 61 72 63 68 79 20 6f 66 20 74 68 65 20 he.inheritance.hierarchy.of.the.
5880 6c 61 79 6f 75 74 20 77 65 20 65 78 70 65 63 74 20 28 65 69 74 68 65 72 20 62 65 6c 6f 77 0d 0a layout.we.expect.(either.below..
58a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 72 20 61 62 6f 76 65 20 ....................//.or.above.
58c0 69 74 20 6f 72 2c 20 77 65 6c 6c 2c 20 6a 75 73 74 20 72 69 67 68 74 20 6f 6e 20 69 74 29 2e 0d it.or,.well,.just.right.on.it)..
58e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 78 70 65 63 74 65 .....................var.expecte
5900 64 4c 61 79 6f 75 74 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 54 72 79 47 65 dLayout.=.InputControlPath.TryGe
5920 74 44 65 76 69 63 65 4c 61 79 6f 75 74 28 65 6e 74 72 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 tDeviceLayout(entry);...........
5940 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 ...........if.(!string.IsNullOrE
5960 6d 70 74 79 28 65 78 70 65 63 74 65 64 4c 61 79 6f 75 74 29 20 26 26 0d 0a 20 20 20 20 20 20 20 mpty(expectedLayout).&&.........
5980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 65 78 70 65 63 74 65 64 4c 61 79 6f 75 74 .................(expectedLayout
59a0 20 3d 3d 20 6c 61 79 6f 75 74 2e 6e 61 6d 65 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .==.layout.name.||..............
59c0 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e .............InputControlLayout.
59e0 73 5f 4c 61 79 6f 75 74 73 2e 49 73 42 61 73 65 64 4f 6e 28 6c 61 79 6f 75 74 2e 6e 61 6d 65 2c s_Layouts.IsBasedOn(layout.name,
5a00 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 65 78 70 65 63 74 65 64 4c 61 79 6f .new.InternedString(expectedLayo
5a20 75 74 29 29 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ut)).||.........................
5a40 20 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e 49 ..InputControlLayout.s_Layouts.I
5a60 73 42 61 73 65 64 4f 6e 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 65 78 70 65 sBasedOn(new.InternedString(expe
5a80 63 74 65 64 4c 61 79 6f 75 74 29 2c 20 6c 61 79 6f 75 74 2e 6e 61 6d 65 29 29 29 0d 0a 20 20 20 ctedLayout),.layout.name))).....
5aa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
5ac0 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 74 63 68 65 73 41 6e 79 49 6e 44 65 76 69 63 65 46 69 ............matchesAnyInDeviceFi
5ae0 6c 74 65 72 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lter.=.true;....................
5b00 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......break;....................
5b20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ..}..................}..........
5b40 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 61 74 63 68 65 73 41 6e 79 49 6e 44 65 76 69 63 ..........if.(!matchesAnyInDevic
5b60 65 46 69 6c 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 eFilter)......................re
5b80 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 turn.false;..............}......
5ba0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 ..........return.true;..........
5bc0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 74 61 72 74 4c }............private.void.StartL
5be0 69 73 74 65 6e 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 istening()..........{...........
5c00 20 20 20 69 66 20 28 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 3d 3d 20 6e ...if.(m_RebindingOperation.==.n
5c20 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 52 65 62 69 6e 64 69 6e ull)..................m_Rebindin
5c40 67 4f 70 65 72 61 74 69 6f 6e 20 3d 20 6e 65 77 20 49 6e 70 75 74 41 63 74 69 6f 6e 52 65 62 69 gOperation.=.new.InputActionRebi
5c60 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 2e 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 ndingExtensions.RebindingOperati
5c80 6f 6e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 66 on();................////TODO:.f
5ca0 6f 72 20 6b 65 79 62 6f 61 72 64 2c 20 67 65 6e 65 72 61 74 65 20 62 6f 74 68 20 70 6f 73 73 69 or.keyboard,.generate.both.possi
5cc0 62 6c 65 20 70 61 74 68 73 20 28 70 68 79 73 69 63 61 6c 20 61 6e 64 20 62 79 20 64 69 73 70 6c ble.paths.(physical.and.by.displ
5ce0 61 79 20 6e 61 6d 65 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 52 65 62 69 6e 64 ay.name)................m_Rebind
5d00 69 6e 67 4f 70 65 72 61 74 69 6f 6e 2e 52 65 73 65 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ingOperation.Reset();...........
5d20 20 20 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 ...m_RebindingOperation.........
5d40 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 ..........WithExpectedControlTyp
5d60 65 28 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 e(m_ExpectedControlLayout)......
5d80 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 71 75 69 72 65 20 6d 69 6e 69 6d 75 6d 20 61 ............//.Require.minimum.a
5da0 63 74 75 61 74 69 6f 6e 20 6f 66 20 30 2e 31 35 66 2e 20 54 68 69 73 20 69 73 20 61 66 74 65 72 ctuation.of.0.15f..This.is.after
5dc0 20 64 65 61 64 7a 6f 6e 69 6e 67 20 68 61 73 20 62 65 65 6e 20 61 70 70 6c 69 65 64 2e 0d 0a 20 .deadzoning.has.been.applied....
5de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 4d 61 67 6e 69 74 75 64 65 48 61 76 ................WithMagnitudeHav
5e00 69 6e 67 54 6f 42 65 47 72 65 61 74 65 72 54 68 61 6e 28 30 2e 31 35 66 29 0d 0a 20 20 20 20 20 ingToBeGreaterThan(0.15f).......
5e20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 77 65 ...........////REVIEW:.should.we
5e40 20 65 78 63 6c 75 64 65 20 6f 6e 6c 79 20 74 68 65 20 73 79 73 74 65 6d 27 73 20 61 63 74 69 76 .exclude.only.the.system's.activ
5e60 65 20 70 6f 69 6e 74 69 6e 67 20 64 65 76 69 63 65 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 e.pointing.device?..............
5e80 20 20 20 20 2f 2f 20 57 69 74 68 20 74 68 65 20 6d 6f 75 73 65 20 6f 70 65 72 61 74 69 6e 67 20 ....//.With.the.mouse.operating.
5ea0 74 68 65 20 55 49 2c 20 69 74 73 20 63 75 72 73 6f 72 20 63 6f 6e 74 72 6f 6c 20 69 73 20 74 6f the.UI,.its.cursor.control.is.to
5ec0 6f 20 66 69 63 6b 6c 65 20 61 20 74 68 69 6e 67 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 o.fickle.a.thing.to.............
5ee0 20 20 20 20 20 2f 2f 20 62 69 6e 64 20 74 6f 2e 20 49 67 6e 6f 72 65 20 6d 6f 75 73 65 20 70 6f .....//.bind.to..Ignore.mouse.po
5f00 73 69 74 69 6f 6e 20 61 6e 64 20 64 65 6c 74 61 20 61 6e 64 20 63 6c 69 63 6b 73 2e 0d 0a 20 20 sition.and.delta.and.clicks.....
5f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 20 67 6f 20 66 6f 72 ..............//.NOTE:.We.go.for
5f40 20 61 6c 6c 20 74 79 70 65 73 20 6f 66 20 70 6f 69 6e 74 65 72 73 20 68 65 72 65 2c 20 6e 6f 74 .all.types.of.pointers.here,.not
5f60 20 6a 75 73 74 20 6d 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 .just.mice....................Wi
5f80 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 3c 50 6f 69 6e 74 65 72 3e 2f 70 thControlsExcluding("<Pointer>/p
5fa0 6f 73 69 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 osition")...................With
5fc0 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 3c 50 6f 69 6e 74 65 72 3e 2f 64 65 6c ControlsExcluding("<Pointer>/del
5fe0 74 61 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 ta")...................WithContr
6000 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 3c 50 6f 69 6e 74 65 72 3e 2f 70 72 65 73 73 22 29 0d olsExcluding("<Pointer>/press").
6020 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 ..................WithControlsEx
6040 63 6c 75 64 69 6e 67 28 22 3c 50 6f 69 6e 74 65 72 3e 2f 63 6c 69 63 6b 43 6f 75 6e 74 22 29 0d cluding("<Pointer>/clickCount").
6060 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 ..................WithControlsEx
6080 63 6c 75 64 69 6e 67 28 22 3c 50 6f 69 6e 74 65 72 3e 2f 7b 50 72 69 6d 61 72 79 41 63 74 69 6f cluding("<Pointer>/{PrimaryActio
60a0 6e 7d 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 n}")...................WithContr
60c0 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 3c 4d 6f 75 73 65 3e 2f 73 63 72 6f 6c 6c 22 29 0d 0a olsExcluding("<Mouse>/scroll")..
60e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 4f 6e 50 6f 74 65 6e 74 69 61 6c 4d 61 74 63 .................OnPotentialMatc
6100 68 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 70 65 72 61 74 69 6f h(......................operatio
6120 6e 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 n.=>......................{.....
6140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6e 65 76 65 72 .....................//.We.never
6160 20 72 65 61 6c 6c 79 20 63 6f 6d 70 6c 65 74 65 20 74 68 65 20 70 69 63 6b 20 62 75 74 20 6b 65 .really.complete.the.pick.but.ke
6180 65 70 20 6c 69 73 74 65 6e 69 6e 67 20 66 6f 72 20 61 73 20 6c 6f 6e 67 20 61 73 20 74 68 65 20 ep.listening.for.as.long.as.the.
61a0 22 49 6e 74 65 72 61 63 74 69 76 65 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 "Interactive"...................
61c0 20 20 20 20 20 20 20 2f 2f 20 62 75 74 74 6f 6e 20 69 73 20 74 6f 67 67 6c 65 64 20 6f 6e 2e 0d .......//.button.is.toggled.on..
61e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 61 69 ...........................Repai
6200 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 0d 0a 20 nt();......................})...
6220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 4f 6e 43 61 6e 63 65 6c 28 0d 0a 20 20 20 20 20 ................OnCancel(.......
6240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 0d 0a 20 20 20 ...............operation.=>.....
6260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
6280 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 61 69 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 ............Repaint();..........
62a0 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............})..................
62c0 2e 4f 6e 41 70 70 6c 79 42 69 6e 64 69 6e 67 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .OnApplyBinding(................
62e0 20 20 20 20 20 20 28 6f 70 65 72 61 74 69 6f 6e 2c 20 6e 65 77 50 61 74 68 29 20 3d 3e 0d 0a 20 ......(operation,.newPath).=>...
6300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
6320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 69 73 20 6e 65 76 65 72 20 69 ..............//.This.is.never.i
6340 6e 76 6f 6b 65 64 20 28 62 65 63 61 75 73 65 20 77 65 20 64 6f 6e 27 74 20 63 6f 6d 70 6c 65 74 nvoked.(because.we.don't.complet
6360 65 20 74 68 65 20 70 69 63 6b 29 20 62 75 74 20 77 65 20 6e 65 65 64 20 69 74 20 6e 65 76 65 72 e.the.pick).but.we.need.it.never
6380 74 68 65 6c 65 73 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 theless.........................
63a0 20 2f 2f 20 61 73 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 72 65 71 75 69 72 .//.as.RebindingOperation.requir
63c0 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 69 66 20 77 65 20 64 6f 6e 27 74 20 73 75 70 70 es.the.callback.if.we.don't.supp
63e0 6c 79 20 61 6e 20 61 63 74 69 6f 6e 20 74 6f 20 61 70 70 6c 79 20 74 68 65 20 62 69 6e 64 69 6e ly.an.action.to.apply.the.bindin
6400 67 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a g.to.......................});..
6420 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 63 6f 6e 74 ..............//.If.we.have.cont
6440 72 6f 6c 20 70 61 74 68 73 20 74 6f 20 6d 61 74 63 68 2c 20 70 61 73 73 20 74 68 65 6d 20 6f 6e rol.paths.to.match,.pass.them.on
6460 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 50 61 74 68 ...............if.(m_ControlPath
6480 73 54 6f 4d 61 74 63 68 2e 4c 65 6e 67 74 68 53 61 66 65 28 29 20 3e 20 30 29 0d 0a 20 20 20 20 sToMatch.LengthSafe().>.0)......
64a0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 50 61 74 68 73 54 6f 4d 61 74 63 ............m_ControlPathsToMatc
64c0 68 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 h.Select(x.=>.m_RebindingOperati
64e0 6f 6e 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 48 61 76 69 6e 67 54 6f 4d 61 74 63 68 50 61 74 68 on.WithControlsHavingToMatchPath
6500 28 78 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 52 65 62 69 6e 64 69 6e 67 (x));................m_Rebinding
6520 4f 70 65 72 61 74 69 6f 6e 2e 53 74 61 72 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d Operation.Start();..........}...
6540 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 74 6f 70 4c 69 73 74 65 6e .........private.void.StopListen
6560 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f ing()..........{..............m_
6580 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3f 2e 43 61 6e 63 65 6c 28 29 3b 0d 0a 20 RebindingOperation?.Cancel();...
65a0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 64 69 66 66 .......}............//.This.diff
65c0 65 72 73 20 66 72 6f 6d 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 2e 47 65 6e 65 ers.from.RebindingOperation.Gene
65e0 72 61 74 65 50 61 74 68 46 6f 72 43 6f 6e 74 72 6f 6c 20 69 6e 20 74 68 61 74 20 69 74 20 63 79 ratePathForControl.in.that.it.cy
6600 63 6c 65 73 20 74 68 72 6f 75 67 68 20 61 6c 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 6c 61 79 cles.through.all..........//.lay
6620 6f 75 74 73 20 69 6e 20 74 68 65 20 69 6e 68 65 72 69 74 61 6e 63 65 20 63 68 61 69 6e 20 61 6e outs.in.the.inheritance.chain.an
6640 64 20 67 65 6e 65 72 61 74 65 73 20 61 20 70 61 74 68 20 66 6f 72 20 65 61 63 68 20 6f 6e 65 20 d.generates.a.path.for.each.one.
6660 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 2e that.contains.the.given.control.
6680 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 ..........private.static.IEnumer
66a0 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 47 65 6e 65 72 61 74 65 50 6f 73 73 69 62 6c 65 50 61 74 able<string>.GeneratePossiblePat
66c0 68 73 46 6f 72 43 6f 6e 74 72 6f 6c 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f hsForControl(InputControl.contro
66e0 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 l)..........{..............var.b
6700 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 uilder.=.new.StringBuilder();...
6720 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 20 ...........var.deviceLayoutName.
6740 3d 20 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 65 2e 6d 5f 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 =.control.device.m_Layout;......
6760 20 20 20 20 20 20 20 20 64 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ........do..............{.......
6780 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6b 69 70 20 6c 61 79 6f 75 74 20 69 66 20 69 74 20 ...........//.Skip.layout.if.it.
67a0 69 73 20 73 75 70 70 6f 73 65 64 20 74 6f 20 62 65 20 68 69 64 64 65 6e 20 69 6e 20 74 68 65 20 is.supposed.to.be.hidden.in.the.
67c0 55 49 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 UI...................var.layout.
67e0 3d 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e =.EditorInputControlLayoutCache.
6800 54 72 79 47 65 74 4c 61 79 6f 75 74 28 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d TryGetLayout(deviceLayoutName);.
6820 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 2e 68 69 64 65 .................if.(layout.hide
6840 49 6e 55 49 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 InUI)......................conti
6860 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e nue;....................builder.
6880 4c 65 6e 67 74 68 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 Length.=.0;..................yie
68a0 6c 64 20 72 65 74 75 72 6e 20 63 6f 6e 74 72 6f 6c 2e 42 75 69 6c 64 50 61 74 68 28 64 65 76 69 ld.return.control.BuildPath(devi
68c0 63 65 4c 61 79 6f 75 74 4e 61 6d 65 2c 20 62 75 69 6c 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 ceLayoutName,.builder);.........
68e0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 49 6e 70 75 74 .....}..............while.(Input
6900 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e 62 61 73 65 4c 61 79 6f ControlLayout.s_Layouts.baseLayo
6920 75 74 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 28 64 65 76 69 63 65 4c 61 79 6f 75 74 utTable.TryGetValue(deviceLayout
6940 4e 61 6d 65 2c 20 6f 75 74 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 29 29 3b 0d 0a 20 Name,.out.deviceLayoutName));...
6960 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 .......}............private.read
6980 6f 6e 6c 79 20 41 63 74 69 6f 6e 3c 73 74 72 69 6e 67 3e 20 6d 5f 4f 6e 50 69 63 6b 43 61 6c 6c only.Action<string>.m_OnPickCall
69a0 62 61 63 6b 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 43 6f 6e 74 back;..........private.InputCont
69c0 72 6f 6c 50 69 63 6b 65 72 2e 4d 6f 64 65 20 6d 5f 4d 6f 64 65 3b 0d 0a 20 20 20 20 20 20 20 20 rolPicker.Mode.m_Mode;..........
69e0 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 5b 5d 20 6d 5f 43 6f 6e 74 72 6f 6c 50 61 74 68 73 54 private.string[].m_ControlPathsT
6a00 6f 4d 61 74 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 oMatch;..........private.string.
6a20 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 m_ExpectedControlLayout;........
6a40 20 20 70 72 69 76 61 74 65 20 54 79 70 65 20 6d 5f 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c ..private.Type.m_ExpectedControl
6a60 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 41 63 74 69 Type;..........private.InputActi
6a80 6f 6e 52 65 62 69 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 2e 52 65 62 69 6e 64 69 6e 67 4f onRebindingExtensions.RebindingO
6aa0 70 65 72 61 74 69 6f 6e 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3b 0d 0a peration.m_RebindingOperation;..
6ac0 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 69 73 4c 69 73 74 65 6e 69 ..........private.bool.isListeni
6ae0 6e 67 20 3d 3e 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 21 3d 20 6e 75 ng.=>.m_RebindingOperation.!=.nu
6b00 6c 6c 20 26 26 20 6d 5f 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 2e 73 74 61 72 74 ll.&&.m_RebindingOperation.start
6b20 65 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 63 6c 61 73 73 20 49 6e 70 ed;............private.class.Inp
6b40 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 47 55 49 20 3a 20 41 64 76 61 6e 63 65 64 44 72 6f utControlPickerGUI.:.AdvancedDro
6b60 70 64 6f 77 6e 47 55 49 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 pdownGUI..........{.............
6b80 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 .private.readonly.InputControlPi
6ba0 63 6b 65 72 44 72 6f 70 64 6f 77 6e 20 6d 5f 4f 77 6e 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ckerDropdown.m_Owner;...........
6bc0 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 47 55 .....public.InputControlPickerGU
6be0 49 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 44 72 6f 70 64 6f 77 6e 20 6f 77 6e I(InputControlPickerDropdown.own
6c00 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 er)..............{..............
6c20 20 20 20 20 6d 5f 4f 77 6e 65 72 20 3d 20 6f 77 6e 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ....m_Owner.=.owner;............
6c40 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 6f 76 65 72 ..}................internal.over
6c60 72 69 64 65 20 76 6f 69 64 20 42 65 67 69 6e 44 72 61 77 28 45 64 69 74 6f 72 57 69 6e 64 6f 77 ride.void.BeginDraw(EditorWindow
6c80 20 77 69 6e 64 6f 77 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .window)..............{.........
6ca0 20 20 20 20 20 20 20 20 20 69 66 20 28 45 76 65 6e 74 2e 63 75 72 72 65 6e 74 2e 69 73 4b 65 79 .........if.(Event.current.isKey
6cc0 20 26 26 20 45 76 65 6e 74 2e 63 75 72 72 65 6e 74 2e 6b 65 79 43 6f 64 65 20 3d 3d 20 4b 65 79 .&&.Event.current.keyCode.==.Key
6ce0 43 6f 64 65 2e 45 73 63 61 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d Code.Escape)..................{.
6d00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 69 6e 64 6f 77 2e 43 6c 6f 73 .....................window.Clos
6d20 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e e();......................return
6d40 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ;..................}............
6d60 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 77 6e 65 72 2e 69 73 4c 69 73 74 65 6e 69 6e 67 29 ........if.(m_Owner.isListening)
6d80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
6da0 20 20 20 20 20 20 20 20 20 2f 2f 20 45 61 74 20 6b 65 79 20 65 76 65 6e 74 73 20 74 6f 20 73 75 .........//.Eat.key.events.to.su
6dc0 70 70 72 65 73 73 20 74 68 65 20 65 64 69 74 6f 72 20 66 72 6f 6d 20 70 61 73 73 69 6e 67 20 74 ppress.the.editor.from.passing.t
6de0 68 65 6d 20 74 6f 20 74 68 65 20 4f 53 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hem.to.the.OS...................
6e00 20 20 20 2f 2f 20 28 63 61 75 73 69 6e 67 20 62 65 65 70 73 20 6f 72 20 6d 65 6e 75 20 63 6f 6d ...//.(causing.beeps.or.menu.com
6e20 6d 61 6e 64 73 20 62 65 69 6e 67 20 74 72 69 67 67 65 72 65 64 29 2e 0d 0a 20 20 20 20 20 20 20 mands.being.triggered)..........
6e40 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 45 76 65 6e 74 2e 63 75 72 72 65 6e 74 2e 69 .............if.(Event.current.i
6e60 73 4b 65 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 sKey)..........................E
6e80 76 65 6e 74 2e 63 75 72 72 65 6e 74 2e 55 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 vent.current.Use();.............
6ea0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 .....}..............}...........
6ec0 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 44 72 .....internal.override.string.Dr
6ee0 61 77 53 65 61 72 63 68 46 69 65 6c 64 43 6f 6e 74 72 6f 6c 28 73 74 72 69 6e 67 20 73 65 61 72 awSearchFieldControl(string.sear
6f00 63 68 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 chString)..............{........
6f20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 6e 65 77 20 45 64 69 74 6f 72 47 55 49 4c 61 ..........using.(new.EditorGUILa
6f40 79 6f 75 74 2e 48 6f 72 69 7a 6f 6e 74 61 6c 53 63 6f 70 65 28 29 29 0d 0a 20 20 20 20 20 20 20 yout.HorizontalScope()).........
6f60 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
6f80 76 61 72 20 69 73 4c 69 73 74 65 6e 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 var.isListening.=.false;........
6fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 68 65 6e 20 70 69 63 6b 69 6e 67 20 ................//.When.picking.
6fc0 63 6f 6e 74 72 6f 6c 73 2c 20 68 61 76 65 20 61 20 22 4c 69 73 74 65 6e 22 20 62 75 74 74 6f 6e controls,.have.a."Listen".button
6fe0 20 74 68 61 74 20 61 6c 6c 6f 77 73 20 6c 69 73 74 65 6e 69 6e 67 20 66 6f 72 20 69 6e 70 75 74 .that.allows.listening.for.input
7000 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 77 6e .......................if.(m_Own
7020 65 72 2e 6d 5f 4d 6f 64 65 20 3d 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 2e er.m_Mode.==.InputControlPicker.
7040 4d 6f 64 65 2e 50 69 63 6b 43 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Mode.PickControl)...............
7060 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......{........................
7080 20 20 75 73 69 6e 67 20 28 6e 65 77 20 45 64 69 74 6f 72 47 55 49 4c 61 79 6f 75 74 2e 56 65 72 ..using.(new.EditorGUILayout.Ver
70a0 74 69 63 61 6c 53 63 6f 70 65 28 47 55 49 4c 61 79 6f 75 74 2e 4d 61 78 57 69 64 74 68 28 35 30 ticalScope(GUILayout.MaxWidth(50
70c0 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a )))..........................{..
70e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 55 49 4c ............................GUIL
7100 61 79 6f 75 74 2e 53 70 61 63 65 28 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ayout.Space(4);.................
7120 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 4c 69 73 74 65 6e 69 6e 67 4f 6c 64 20 .............var.isListeningOld.
7140 3d 20 6d 5f 4f 77 6e 65 72 2e 69 73 4c 69 73 74 65 6e 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 =.m_Owner.isListening;..........
7160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 4c 69 73 74 65 6e ....................var.isListen
7180 69 6e 67 4e 65 77 20 3d 20 47 55 49 4c 61 79 6f 75 74 2e 54 6f 67 67 6c 65 28 69 73 4c 69 73 74 ingNew.=.GUILayout.Toggle(isList
71a0 65 6e 69 6e 67 4f 6c 64 2c 20 22 4c 69 73 74 65 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 eningOld,."Listen",.............
71c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 53 74 79 6c 65 .....................EditorStyle
71e0 73 2e 6d 69 6e 69 42 75 74 74 6f 6e 2c 20 47 55 49 4c 61 79 6f 75 74 2e 4d 61 78 57 69 64 74 68 s.miniButton,.GUILayout.MaxWidth
7200 28 35 30 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 (50));..........................
7220 20 20 20 20 20 20 69 66 20 28 69 73 4c 69 73 74 65 6e 69 6e 67 4f 6c 64 20 21 3d 20 69 73 4c 69 ......if.(isListeningOld.!=.isLi
7240 73 74 65 6e 69 6e 67 4e 65 77 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 steningNew).....................
7260 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
7280 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 4c 69 73 74 65 6e 69 6e 67 4e 65 77 29 0d ............if.(isListeningNew).
72a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................................
72c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .{..............................
72e0 20 20 20 20 20 20 20 20 6d 5f 4f 77 6e 65 72 2e 53 74 61 72 74 4c 69 73 74 65 6e 69 6e 67 28 29 ........m_Owner.StartListening()
7300 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ;...............................
7320 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...}............................
7340 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......else......................
7360 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
7380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 77 6e 65 72 2e 53 74 6f 70 4c ...................m_Owner.StopL
73a0 69 73 74 65 6e 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 istening();.....................
73c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 61 72 63 68 53 74 72 69 6e 67 20 3d 20 .................searchString.=.
73e0 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 string.Empty;...................
7400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
7420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
7440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4c 69 73 74 65 6e 69 6e 67 20 3d 20 69 73 4c ...............isListening.=.isL
7460 69 73 74 65 6e 69 6e 67 4e 65 77 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 isteningNew;....................
7480 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ......}......................}..
74a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 58 4d 45 3a ......................////FIXME:
74c0 20 74 68 65 20 73 65 61 72 63 68 20 62 6f 78 20 64 6f 65 73 6e 27 74 20 63 6c 65 61 72 20 6f 75 .the.search.box.doesn't.clear.ou
74e0 74 20 77 68 65 6e 20 6c 69 73 74 65 6e 69 6e 67 3b 20 6e 6f 20 69 64 65 61 20 77 68 79 20 74 68 t.when.listening;.no.idea.why.th
7500 65 20 6e 65 77 20 73 74 72 69 6e 67 20 69 73 6e 27 74 20 74 61 6b 69 6e 67 20 65 66 66 65 63 74 e.new.string.isn't.taking.effect
7520 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 47 55 49 2e ......................EditorGUI.
7540 42 65 67 69 6e 44 69 73 61 62 6c 65 64 47 72 6f 75 70 28 69 73 4c 69 73 74 65 6e 69 6e 67 29 3b BeginDisabledGroup(isListening);
7560 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 53 65 61 ......................var.newSea
7580 72 63 68 53 74 72 69 6e 67 20 3d 20 62 61 73 65 2e 44 72 61 77 53 65 61 72 63 68 46 69 65 6c 64 rchString.=.base.DrawSearchField
75a0 43 6f 6e 74 72 6f 6c 28 69 73 4c 69 73 74 65 6e 69 6e 67 20 3f 20 73 74 72 69 6e 67 2e 45 6d 70 Control(isListening.?.string.Emp
75c0 74 79 20 3a 20 73 65 61 72 63 68 53 74 72 69 6e 67 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ty.:.searchString);.............
75e0 20 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 47 55 49 2e 45 6e 64 44 69 73 61 62 6c 65 64 47 72 .........EditorGUI.EndDisabledGr
7600 6f 75 70 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 oup();........................if
7620 20 28 69 73 4c 69 73 74 65 6e 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .(isListening)..................
7640 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 ....{..........................v
7660 61 72 20 72 65 62 69 6e 64 20 3d 20 6d 5f 4f 77 6e 65 72 2e 6d 5f 52 65 62 69 6e 64 69 6e 67 4f ar.rebind.=.m_Owner.m_RebindingO
7680 70 65 72 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 peration;.......................
76a0 20 20 20 72 65 74 75 72 6e 20 22 5c 75 30 30 31 37 22 20 2b 20 73 74 72 69 6e 67 2e 4a 6f 69 6e ...return."\u0017".+.string.Join
76c0 28 22 5c 75 30 30 31 37 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ("\u0017",......................
76e0 20 20 20 20 20 20 20 20 72 65 62 69 6e 64 2e 63 61 6e 64 69 64 61 74 65 73 2e 53 65 6c 65 63 74 ........rebind.candidates.Select
7700 4d 61 6e 79 28 78 20 3d 3e 20 47 65 6e 65 72 61 74 65 50 6f 73 73 69 62 6c 65 50 61 74 68 73 46 Many(x.=>.GeneratePossiblePathsF
7720 6f 72 43 6f 6e 74 72 6f 6c 28 78 29 2e 52 65 76 65 72 73 65 28 29 29 29 3b 0d 0a 20 20 20 20 20 orControl(x).Reverse()));.......
7740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
7760 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 53 65 61 72 63 68 53 74 72 69 6e 67 3b 0d ........return.newSearchString;.
7780 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
77a0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 6f 76 65 72 72 69 }................internal.overri
77c0 64 65 20 76 6f 69 64 20 44 72 61 77 49 74 65 6d 28 41 64 76 61 6e 63 65 64 44 72 6f 70 64 6f 77 de.void.DrawItem(AdvancedDropdow
77e0 6e 49 74 65 6d 20 69 74 65 6d 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 54 65 78 74 75 72 65 nItem.item,.string.name,.Texture
7800 32 44 20 69 63 6f 6e 2c 20 62 6f 6f 6c 20 65 6e 61 62 6c 65 64 2c 0d 0a 20 20 20 20 20 20 20 20 2D.icon,.bool.enabled,..........
7820 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 64 72 61 77 41 72 72 6f 77 2c 20 62 6f 6f 6c 20 73 65 6c ........bool.drawArrow,.bool.sel
7840 65 63 74 65 64 2c 20 62 6f 6f 6c 20 68 61 73 53 65 61 72 63 68 2c 20 62 6f 6f 6c 20 72 69 63 68 ected,.bool.hasSearch,.bool.rich
7860 54 65 78 74 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 Text.=.false)..............{....
7880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 68 61 73 53 65 61 72 63 68 20 26 26 20 69 ..............if.(hasSearch.&&.i
78a0 74 65 6d 20 69 73 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 tem.is.InputControlDropdownItem.
78c0 76 69 65 77 49 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e viewItem)......................n
78e0 61 6d 65 20 3d 20 76 69 65 77 49 74 65 6d 2e 73 65 61 72 63 68 61 62 6c 65 4e 61 6d 65 3b 0d 0a ame.=.viewItem.searchableName;..
7900 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 2e 44 72 61 77 49 74 65 6d 28 ..................base.DrawItem(
7920 69 74 65 6d 2c 20 6e 61 6d 65 2c 20 69 63 6f 6e 2c 20 65 6e 61 62 6c 65 64 2c 20 64 72 61 77 41 item,.name,.icon,.enabled,.drawA
7940 72 72 6f 77 2c 20 73 65 6c 65 63 74 65 64 2c 20 68 61 73 53 65 61 72 63 68 29 3b 0d 0a 20 20 20 rrow,.selected,.hasSearch);.....
7960 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e .........}................intern
7980 61 6c 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 44 72 61 77 46 6f 6f 74 65 72 28 41 64 76 61 al.override.void.DrawFooter(Adva
79a0 6e 63 65 64 44 72 6f 70 64 6f 77 6e 49 74 65 6d 20 73 65 6c 65 63 74 65 64 49 74 65 6d 29 0d 0a ncedDropdownItem.selectedItem)..
79c0 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ............{................../
79e0 2f 64 75 6e 20 77 6f 72 6b 20 62 65 63 61 75 73 65 20 74 68 65 72 65 20 69 73 20 6e 6f 20 73 65 /dun.work.because.there.is.no.se
7a00 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 6c lection..................if.(sel
7a20 65 63 74 65 64 49 74 65 6d 20 69 73 20 43 6f 6e 74 72 6f 6c 44 72 6f 70 64 6f 77 6e 49 74 65 6d ectedItem.is.ControlDropdownItem
7a40 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b .controlItem)..................{
7a60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 65 6e ......................var.conten
7a80 74 20 3d 20 6e 65 77 20 47 55 49 43 6f 6e 74 65 6e 74 28 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 63 t.=.new.GUIContent(controlItem.c
7aa0 6f 6e 74 72 6f 6c 50 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ontrolPath);....................
7ac0 20 20 76 61 72 20 72 65 63 74 20 3d 20 47 55 49 4c 61 79 6f 75 74 55 74 69 6c 69 74 79 2e 47 65 ..var.rect.=.GUILayoutUtility.Ge
7ae0 74 52 65 63 74 28 63 6f 6e 74 65 6e 74 2c 20 68 65 61 64 65 72 53 74 79 6c 65 2c 20 47 55 49 4c tRect(content,.headerStyle,.GUIL
7b00 61 79 6f 75 74 2e 45 78 70 61 6e 64 57 69 64 74 68 28 74 72 75 65 29 29 3b 0d 0a 20 20 20 20 20 ayout.ExpandWidth(true));.......
7b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 47 55 49 2e 54 65 78 74 46 69 65 ...............EditorGUI.TextFie
7b40 6c 64 28 72 65 63 74 2c 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 63 6f 6e 74 72 6f 6c 50 61 74 68 ld(rect,.controlItem.controlPath
7b60 2c 20 68 65 61 64 65 72 53 74 79 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ,.headerStyle);.................
7b80 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .}..............}..........}....
7ba0 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 53 74 79 ........private.static.class.Sty
7bc0 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c les..........{..............publ
7be0 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 53 74 79 6c 65 20 77 61 69 74 ic.static.readonly.GUIStyle.wait
7c00 69 6e 67 46 6f 72 49 6e 70 75 74 4c 61 62 65 6c 20 3d 20 6e 65 77 20 47 55 49 53 74 79 6c 65 28 ingForInputLabel.=.new.GUIStyle(
7c20 22 57 68 69 74 65 42 6f 6c 64 4c 61 62 65 6c 22 29 2e 57 69 74 68 46 6f 6e 74 53 69 7a 65 28 32 "WhiteBoldLabel").WithFontSize(2
7c40 32 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 23 65 6e 64 69 66 2);..........}......}..}..#endif
7c60 20 2f 2f 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .//.UNITY_EDITOR................
7c80 00 00 00 00 00 00 00 00 1a 00 00 00 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 69 63 6b 65 72 44 72 ............InputControlPickerDr
7ca0 6f 70 64 6f 77 6e 00 00 1e 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 opdown......UnityEngine.InputSys
7cc0 74 65 6d 2e 45 64 69 74 6f 72 00 00 tem.Editor..