mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
Compare commits
1249 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d132bc46e2 | ||
|
|
c6c8cf201e | ||
|
|
f266cd4c34 | ||
|
|
18ed85b17b | ||
|
|
d1ca498643 | ||
|
|
07d26f7235 | ||
|
|
0f459624c0 | ||
|
|
45996b730e | ||
|
|
905ab7cf98 | ||
|
|
3c614775c9 | ||
|
|
65118dbc72 | ||
|
|
7fda6bc3b8 | ||
|
|
774525ed50 | ||
|
|
784704b645 | ||
|
|
0060635e66 | ||
|
|
e668c53947 | ||
|
|
2d001ff21f | ||
|
|
cd3a41d18c | ||
|
|
bde2ce54ed | ||
|
|
d5e7aba05c | ||
|
|
54ced30f51 | ||
|
|
1edfab594d | ||
|
|
0df8501650 | ||
|
|
09b694c33c | ||
|
|
ddee7c1479 | ||
|
|
fdf3deed76 | ||
|
|
7e35306b01 | ||
|
|
51575d1025 | ||
|
|
6a527c3a2f | ||
|
|
6d4c76f2a4 | ||
|
|
bbb495b485 | ||
|
|
a54e0056c2 | ||
|
|
4b82eb37b0 | ||
|
|
b536f10b14 | ||
|
|
581db18c7b | ||
|
|
9c3eeaf9cc | ||
|
|
4bce892c79 | ||
|
|
3ebc245cf3 | ||
|
|
1a62062289 | ||
|
|
da62476639 | ||
|
|
b6d67741e7 | ||
|
|
aa41224d57 | ||
|
|
0ae8386316 | ||
|
|
3df3e802d4 | ||
|
|
fbbf3c9c57 | ||
|
|
693484f8e8 | ||
|
|
3af527770b | ||
|
|
bf97c0002f | ||
|
|
1983e6f8bd | ||
|
|
148c2c7db9 | ||
|
|
f78903f1d2 | ||
|
|
8d646b077b | ||
|
|
a2f2117602 | ||
|
|
fabc064a46 | ||
|
|
19c2eb9e78 | ||
|
|
5f9cda1016 | ||
|
|
7a06ac967e | ||
|
|
5494c6b259 | ||
|
|
ac835497da | ||
|
|
c6383a1d22 | ||
|
|
9c50e2b7d7 | ||
|
|
6132f120c2 | ||
|
|
2cf21c69ba | ||
|
|
3e200bd5d0 | ||
|
|
3aa1d60901 | ||
|
|
9774737e67 | ||
|
|
bd378594b1 | ||
|
|
86ee2b98f3 | ||
|
|
1ccb2aa83b | ||
|
|
3fa30b5979 | ||
|
|
5d991e27b1 | ||
|
|
631530dbf7 | ||
|
|
bcbda59523 | ||
|
|
eb3f302552 | ||
|
|
244462cc77 | ||
|
|
11bad8687e | ||
|
|
ed575429b1 | ||
|
|
e87e75acd4 | ||
|
|
9781446aef | ||
|
|
eb49b3c853 | ||
|
|
ba31c63073 | ||
|
|
608e6fd42d | ||
|
|
e94f558d6f | ||
|
|
d7dac033cb | ||
|
|
0bef5967c4 | ||
|
|
c1c8adf122 | ||
|
|
b2e7de5a47 | ||
|
|
ad665a83b9 | ||
|
|
8867f4bf0c | ||
|
|
b9a9a1e60e | ||
|
|
a8a278c989 | ||
|
|
ade8da87a9 | ||
|
|
330ab0a5b2 | ||
|
|
0b1c4bd4c9 | ||
|
|
967ffefbe0 | ||
|
|
7e69adf978 | ||
|
|
ca95df2dd4 | ||
|
|
d3ce4bedd7 | ||
|
|
0b11888ed2 | ||
|
|
66ed2ce62a | ||
|
|
2a733b9d9a | ||
|
|
9a9eb02f05 | ||
|
|
2df24242ac | ||
|
|
c3e4e7d404 | ||
|
|
3714f1e125 | ||
|
|
071d32b2da | ||
|
|
21cfa0781f | ||
|
|
0f20b543ca | ||
|
|
547dadbfc2 | ||
|
|
81be2dacec | ||
|
|
2d87dcf83c | ||
|
|
5965cb7e7f | ||
|
|
049a4434c9 | ||
|
|
c52df06e7a | ||
|
|
82ce5e74aa | ||
|
|
a6eb13c0ab | ||
|
|
eb9983bb18 | ||
|
|
1852eb1b7d | ||
|
|
bc15757db0 | ||
|
|
158bf9d6c7 | ||
|
|
4be7d4c3fb | ||
|
|
eabe4690aa | ||
|
|
f64151b0ee | ||
|
|
53bb6e1f90 | ||
|
|
5e6765f4b0 | ||
|
|
8cbb9503fd | ||
|
|
3e8b155d4a | ||
|
|
e22703c272 | ||
|
|
033009ef82 | ||
|
|
44f704258c | ||
|
|
cd138b4037 | ||
|
|
bb0741af38 | ||
|
|
ea279b6785 | ||
|
|
eb546602ea | ||
|
|
b2f6223958 | ||
|
|
69b18039e6 | ||
|
|
fa11884936 | ||
|
|
0160abf630 | ||
|
|
3721d7cd17 | ||
|
|
1461a6e525 | ||
|
|
a80379c3b9 | ||
|
|
0551bc3731 | ||
|
|
8a790321dd | ||
|
|
d6af826097 | ||
|
|
b525796f79 | ||
|
|
88adcd03be | ||
|
|
5ef205c142 | ||
|
|
b5a3b1c655 | ||
|
|
e81259b298 | ||
|
|
f510ca0a0c | ||
|
|
26a0dfcde8 | ||
|
|
1e9f7e7355 | ||
|
|
0f7bd1833a | ||
|
|
88e3ab1a71 | ||
|
|
3b2a0fb044 | ||
|
|
33e311c457 | ||
|
|
3afb34018d | ||
|
|
5f2fea6828 | ||
|
|
3cab5e6a27 | ||
|
|
af10998e31 | ||
|
|
ef94d35ca2 | ||
|
|
5e5051628d | ||
|
|
9031dd40a3 | ||
|
|
422f892af8 | ||
|
|
b478d43987 | ||
|
|
a83de461d4 | ||
|
|
db07574a61 | ||
|
|
73e027c867 | ||
|
|
4c5f5a213b | ||
|
|
1f8f080c20 | ||
|
|
cf512a3d3d | ||
|
|
6b6403e9c1 | ||
|
|
6796577b9d | ||
|
|
b1be4da9b5 | ||
|
|
3c2795cded | ||
|
|
a1494bf2e1 | ||
|
|
53bfbedefa | ||
|
|
ee9f3feb09 | ||
|
|
841f40e32b | ||
|
|
1aa45b1b88 | ||
|
|
7d698ea8dd | ||
|
|
51516cd7d7 | ||
|
|
d97f570328 | ||
|
|
250b199b2a | ||
|
|
223dd8fc3d | ||
|
|
946d38c87b | ||
|
|
5dc90e6ec8 | ||
|
|
6ed335d483 | ||
|
|
993726c681 | ||
|
|
13c74f1506 | ||
|
|
e92a66ac63 | ||
|
|
a7fd4674b1 | ||
|
|
8a72f29489 | ||
|
|
487e40a64e | ||
|
|
cb347adb52 | ||
|
|
b337ab7abd | ||
|
|
1829660256 | ||
|
|
8fa027737b | ||
|
|
d891c3e8da | ||
|
|
2a265eae60 | ||
|
|
25c10e8638 | ||
|
|
011046aa22 | ||
|
|
a184a258ab | ||
|
|
3435897e99 | ||
|
|
6f11d870c3 | ||
|
|
d4e2bf187f | ||
|
|
84f5d4d605 | ||
|
|
6dce30b33f | ||
|
|
cfa8eeea6c | ||
|
|
3f9b1197d9 | ||
|
|
664054e4b4 | ||
|
|
2ddfdb4fcd | ||
|
|
a9b25f5c0f | ||
|
|
fa25b362cc | ||
|
|
be061df238 | ||
|
|
6cc0cbbf72 | ||
|
|
36123c4cb2 | ||
|
|
91eb123cc7 | ||
|
|
b5e79ba71c | ||
|
|
df66382cf7 | ||
|
|
ce4d96bd4a | ||
|
|
d774fb7664 | ||
|
|
870e7adeb6 | ||
|
|
b4f29562cd | ||
|
|
42ad5ddb7a | ||
|
|
2bf6c245d9 | ||
|
|
2c099efd2b | ||
|
|
42116766d5 | ||
|
|
303775e848 | ||
|
|
550e2b17cb | ||
|
|
178184bcee | ||
|
|
c4f8e3025a | ||
|
|
4fe00c9a1b | ||
|
|
8453692bfe | ||
|
|
2aaf54c661 | ||
|
|
0f5aeaad8d | ||
|
|
f261dd9043 | ||
|
|
7bd3f7da58 | ||
|
|
c530275d84 | ||
|
|
928834fd4b | ||
|
|
fdfaddd627 | ||
|
|
3e20a32bce | ||
|
|
f9f3eb9f6a | ||
|
|
b0db727426 | ||
|
|
26e92238ba | ||
|
|
d9e6c1f951 | ||
|
|
84bb78558e | ||
|
|
39f5855b12 | ||
|
|
3f57ce6276 | ||
|
|
43ff431782 | ||
|
|
18f0d3a772 | ||
|
|
0d6f05c0f9 | ||
|
|
ec026400fc | ||
|
|
a5cbc5b9f5 | ||
|
|
3f6e46ef82 | ||
|
|
e44a6a032f | ||
|
|
0343ee3577 | ||
|
|
aca754a517 | ||
|
|
edd3a47353 | ||
|
|
ab13eff151 | ||
|
|
412c5dd786 | ||
|
|
ec2e25153e | ||
|
|
94c5bba770 | ||
|
|
2e1809793b | ||
|
|
5d730f0bc1 | ||
|
|
1b244e6317 | ||
|
|
4247dec633 | ||
|
|
591a2d2336 | ||
|
|
d78df4a953 | ||
|
|
cdb52d096f | ||
|
|
0ed26e1a7d | ||
|
|
4797a4b338 | ||
|
|
0db81b8456 | ||
|
|
4eb220168e | ||
|
|
e49216a844 | ||
|
|
5b5dd8be53 | ||
|
|
8438591839 | ||
|
|
ad7dc46a0a | ||
|
|
3b3fe6cb95 | ||
|
|
ffd871b755 | ||
|
|
a01ef4a792 | ||
|
|
a219b5bc7d | ||
|
|
62e619deef | ||
|
|
144cf0eaf2 | ||
|
|
9b4c83931b | ||
|
|
c7d532fff9 | ||
|
|
a77d76ff34 | ||
|
|
995cd25bc4 | ||
|
|
f3c1103b0c | ||
|
|
2a6c42d15f | ||
|
|
9da407ea39 | ||
|
|
1ca18c3958 | ||
|
|
70d4791b5b | ||
|
|
af2fceb9e5 | ||
|
|
0b7ed2cf7f | ||
|
|
f288791b71 | ||
|
|
a636c1ff84 | ||
|
|
f36a7b79cd | ||
|
|
bbda1c5c0d | ||
|
|
535ffd45ec | ||
|
|
79399e5db2 | ||
|
|
35a804cbc8 | ||
|
|
b88dda3341 | ||
|
|
58d941c91c | ||
|
|
e96a3b6d4d | ||
|
|
abab1e427e | ||
|
|
09ab40ad37 | ||
|
|
f98c8b34da | ||
|
|
481d9d3032 | ||
|
|
59e4c7c521 | ||
|
|
ed5258895f | ||
|
|
65d80158db | ||
|
|
c596f85c55 | ||
|
|
835d5f9d40 | ||
|
|
8d986c4dc6 | ||
|
|
bf171b28cd | ||
|
|
ac0e11ea39 | ||
|
|
ac3a0e344e | ||
|
|
8f9a6927fd | ||
|
|
134f72293a | ||
|
|
51d334cb60 | ||
|
|
0221405758 | ||
|
|
eebaa19178 | ||
|
|
41ebad422d | ||
|
|
eecf5f16ce | ||
|
|
d02272b82d | ||
|
|
174401ec42 | ||
|
|
76a9f88eee | ||
|
|
26f9b5b9ce | ||
|
|
9a0e6aa6c6 | ||
|
|
9cf6c32817 | ||
|
|
8e2363d114 | ||
|
|
944f77c70b | ||
|
|
41adc2412a | ||
|
|
b068e446d0 | ||
|
|
16dd4236eb | ||
|
|
e1321a8258 | ||
|
|
2fee3c6ffa | ||
|
|
857de890e9 | ||
|
|
a7bc3d0b60 | ||
|
|
2c4c1faeaa | ||
|
|
35f3ce38fb | ||
|
|
e5b66bb8d9 | ||
|
|
b5aecebaf1 | ||
|
|
a2ae5da47f | ||
|
|
cdc987b984 | ||
|
|
352386d1fa | ||
|
|
24512b0d1c | ||
|
|
fd709d08b7 | ||
|
|
21f39cc472 | ||
|
|
0327af1bd5 | ||
|
|
2a0dd1eb8a | ||
|
|
91858ca5ca | ||
|
|
8ad48736f0 | ||
|
|
b6872dda6e | ||
|
|
2a4f91cc65 | ||
|
|
fc82540388 | ||
|
|
1d22fa6cf6 | ||
|
|
327cbfdd39 | ||
|
|
31e2a867fa | ||
|
|
2fea609a63 | ||
|
|
794403afbf | ||
|
|
07ecd3273e | ||
|
|
69592ad46d | ||
|
|
9754ae4a73 | ||
|
|
617dfad22e | ||
|
|
7a9556e957 | ||
|
|
88fa0dfd82 | ||
|
|
1ae75d36d2 | ||
|
|
fd7b1226b5 | ||
|
|
9926d0de7c | ||
|
|
2173ac01fb | ||
|
|
932f295fd3 | ||
|
|
53dd500e03 | ||
|
|
e7ff5c41a6 | ||
|
|
8b072e39fc | ||
|
|
ce529c41ec | ||
|
|
38b6371a81 | ||
|
|
d0963bd018 | ||
|
|
9d7e491bf3 | ||
|
|
ede6628a2d | ||
|
|
ad6c4b9474 | ||
|
|
25de50818d | ||
|
|
65d20fbde8 | ||
|
|
f14da04c05 | ||
|
|
0a5862a0ca | ||
|
|
86c3eba85f | ||
|
|
b8d731c3ae | ||
|
|
c2bb0ead88 | ||
|
|
556a27577d | ||
|
|
481078cbca | ||
|
|
b4ea36cb68 | ||
|
|
53d9ca97e6 | ||
|
|
2f3b076aa4 | ||
|
|
cc89becb4c | ||
|
|
a267c6233f | ||
|
|
216e8b069c | ||
|
|
3e41fba8b0 | ||
|
|
9dc553500d | ||
|
|
525718d35c | ||
|
|
321b82b458 | ||
|
|
b4df69fbeb | ||
|
|
4e321d74c9 | ||
|
|
c6dcd921d8 | ||
|
|
59dd045a42 | ||
|
|
86bd205878 | ||
|
|
3d1d125e40 | ||
|
|
12eba5e730 | ||
|
|
dfea705c5e | ||
|
|
edfa3276cf | ||
|
|
70c2754bd1 | ||
|
|
29f556dc2a | ||
|
|
023b68ffae | ||
|
|
b32d77601e | ||
|
|
4da6b2d775 | ||
|
|
59973f95d6 | ||
|
|
41319ad2a3 | ||
|
|
c8f0d9f014 | ||
|
|
e3e5689fce | ||
|
|
d047b56978 | ||
|
|
a664f34bec | ||
|
|
b57585a0c6 | ||
|
|
41d93177b5 | ||
|
|
c98634df80 | ||
|
|
656e1908f2 | ||
|
|
7cff932a81 | ||
|
|
db384fbc7d | ||
|
|
98a40fc2f1 | ||
|
|
d8032572c1 | ||
|
|
c7f9187b02 | ||
|
|
9196a96981 | ||
|
|
cd73bdd70f | ||
|
|
40500d925f | ||
|
|
2d73375392 | ||
|
|
24e3d549f5 | ||
|
|
0010b4cedf | ||
|
|
569558640a | ||
|
|
a7dc54b48d | ||
|
|
926cbec7eb | ||
|
|
0295d47eba | ||
|
|
dd963c7cce | ||
|
|
29983c23e3 | ||
|
|
807029d211 | ||
|
|
a45ad49414 | ||
|
|
a7885b1dbc | ||
|
|
c63c1d8434 | ||
|
|
355b7f0c3d | ||
|
|
4710d3afbc | ||
|
|
872b01c7ef | ||
|
|
97b03ed0c7 | ||
|
|
eabf6d9bcf | ||
|
|
ac124e8f08 | ||
|
|
129f128f90 | ||
|
|
1684dfdfcc | ||
|
|
2533166f5d | ||
|
|
4194052eed | ||
|
|
bb7eaf3e15 | ||
|
|
fb330e33da | ||
|
|
5b08fc400d | ||
|
|
628570e84d | ||
|
|
6ba553e890 | ||
|
|
37b5989378 | ||
|
|
009ad9dc55 | ||
|
|
b947ac3e96 | ||
|
|
7b9e53c931 | ||
|
|
cfc1a31fc7 | ||
|
|
9b5bbd976d | ||
|
|
0c5ede60af | ||
|
|
b2002121ab | ||
|
|
8597e491e0 | ||
|
|
0b01400493 | ||
|
|
f7c1a764f7 | ||
|
|
9f3d9b3341 | ||
|
|
80e8f3f02d | ||
|
|
dde7688f2e | ||
|
|
4edfdabcd0 | ||
|
|
2cf40a022c | ||
|
|
0014b6f4ed | ||
|
|
7d775a8dd4 | ||
|
|
2c0fee3fd3 | ||
|
|
9b967341c2 | ||
|
|
0f120f26ea | ||
|
|
4a6b12ade1 | ||
|
|
6d5b3f801e | ||
|
|
83f1f3b1e7 | ||
|
|
77903bad20 | ||
|
|
a108efbddf | ||
|
|
0be44a37b2 | ||
|
|
f8e929b347 | ||
|
|
61c1c67733 | ||
|
|
4c195134bc | ||
|
|
527d48f7c2 | ||
|
|
3e89b784e5 | ||
|
|
4931313636 | ||
|
|
4a9327633f | ||
|
|
73151eaf38 | ||
|
|
947d5011c2 | ||
|
|
a8c60ac3a9 | ||
|
|
e2a5a6af60 | ||
|
|
516fa33f93 | ||
|
|
746292892d | ||
|
|
ef8e08e4c7 | ||
|
|
bc276e171b | ||
|
|
4e6e5448e5 | ||
|
|
263c213dcc | ||
|
|
8725cdadf5 | ||
|
|
27791e0202 | ||
|
|
d046e6254f | ||
|
|
ad2f275d5e | ||
|
|
5330da94c8 | ||
|
|
f429e7c911 | ||
|
|
56dd9633a3 | ||
|
|
88383c30f0 | ||
|
|
ffedb2be90 | ||
|
|
918339c56b | ||
|
|
3bc1d10988 | ||
|
|
c014478abc | ||
|
|
7faa18fc3b | ||
|
|
f4cce4a60c | ||
|
|
73f143e915 | ||
|
|
57ca9dd813 | ||
|
|
8d80c3f8ac | ||
|
|
97b4b00766 | ||
|
|
6bc02bfb13 | ||
|
|
c8b96b54fb | ||
|
|
d570e45cb2 | ||
|
|
5a31f9662c | ||
|
|
710414e995 | ||
|
|
e21a3be55b | ||
|
|
85158296a9 | ||
|
|
75f8681043 | ||
|
|
b88f288a11 | ||
|
|
c3027d2102 | ||
|
|
8c706646ed | ||
|
|
b319d9d89e | ||
|
|
e2523b4a80 | ||
|
|
ff5712860f | ||
|
|
3a85fcbc05 | ||
|
|
7dff317981 | ||
|
|
a594f53037 | ||
|
|
ee9fa6f0a3 | ||
|
|
905c1a61ef | ||
|
|
c0a66fa60f | ||
|
|
bb0af2d790 | ||
|
|
64edf00864 | ||
|
|
130e5867e0 | ||
|
|
59a952cf54 | ||
|
|
d8627ebac2 | ||
|
|
9dfb828b16 | ||
|
|
3ad638dd67 | ||
|
|
a6adddf8fe | ||
|
|
082917d3cb | ||
|
|
10de896db9 | ||
|
|
62d9fd8fb7 | ||
|
|
1724039c5d | ||
|
|
20602edee5 | ||
|
|
1603295b16 | ||
|
|
0b22a5b2a3 | ||
|
|
fb33536c26 | ||
|
|
9c2a899c35 | ||
|
|
fee89ebca8 | ||
|
|
17c3fcea8c | ||
|
|
05208deac7 | ||
|
|
dabe13d495 | ||
|
|
f0caf246b5 | ||
|
|
fdfaddaa66 | ||
|
|
7dc62d2989 | ||
|
|
ec71fc4491 | ||
|
|
1d25732fbf | ||
|
|
227dafae53 | ||
|
|
5db52e720c | ||
|
|
609e3e6e33 | ||
|
|
7978d58e71 | ||
|
|
4cfcbd0dd7 | ||
|
|
501d216594 | ||
|
|
249757454f | ||
|
|
7eb6d8090e | ||
|
|
9aedd9fcc5 | ||
|
|
40715b4c12 | ||
|
|
98b4da93a5 | ||
|
|
061a0de29b | ||
|
|
45f4e9a476 | ||
|
|
13ebe99862 | ||
|
|
6d0cc1b87a | ||
|
|
5f1ddce5ed | ||
|
|
a6d62d91bf | ||
|
|
84160d0a3a | ||
|
|
2471874027 | ||
|
|
b3955379a6 | ||
|
|
354401a24a | ||
|
|
9d2181b260 | ||
|
|
b3d7930fc0 | ||
|
|
845542a6bf | ||
|
|
7f14a5ca05 | ||
|
|
66c8672ace | ||
|
|
878b41b055 | ||
|
|
e62f7fdf4f | ||
|
|
9581ca7a12 | ||
|
|
e085b09bb9 | ||
|
|
7033e57d8d | ||
|
|
347b28cb52 | ||
|
|
60dae604b1 | ||
|
|
998d8581ff | ||
|
|
eb987195d6 | ||
|
|
1b9bd2c56a | ||
|
|
212d8a12f8 | ||
|
|
2d6d3aabac | ||
|
|
dce3d1fa17 | ||
|
|
4d3fd786c8 | ||
|
|
39062e02fb | ||
|
|
3da075096f | ||
|
|
ba017a4efa | ||
|
|
2b41943c01 | ||
|
|
2dc8ae98fb | ||
|
|
214f0a519d | ||
|
|
f2115b5bcc | ||
|
|
19bf7403f9 | ||
|
|
7b56359ba2 | ||
|
|
bc2285adf0 | ||
|
|
26e376609b | ||
|
|
9224207aeb | ||
|
|
d846750ac6 | ||
|
|
235f663ea5 | ||
|
|
d37c5a922f | ||
|
|
94e2ad3cc6 | ||
|
|
0669572d5d | ||
|
|
c62d3f691e | ||
|
|
c12a393f22 | ||
|
|
8a0a51867e | ||
|
|
22d1a32651 | ||
|
|
4aed95019c | ||
|
|
3e199836e4 | ||
|
|
78db897510 | ||
|
|
dc797ade45 | ||
|
|
7d12023618 | ||
|
|
97eefb25af | ||
|
|
0ce3b47ad3 | ||
|
|
5742f713e3 | ||
|
|
411c0a135c | ||
|
|
81fbe018d4 | ||
|
|
eaf38495c7 | ||
|
|
a75207487d | ||
|
|
86f0a5b96c | ||
|
|
ae4aebd5ce | ||
|
|
73104a4656 | ||
|
|
c1d7d4ee35 | ||
|
|
577b82e86f | ||
|
|
cdf629e1e7 | ||
|
|
a3781e728d | ||
|
|
e0f8fec74c | ||
|
|
5f6b70a742 | ||
|
|
8bd848219d | ||
|
|
8cafa960e1 | ||
|
|
177ae1dc0a | ||
|
|
6c5a83409b | ||
|
|
8b23abd271 | ||
|
|
d7f11f3976 | ||
|
|
de123e1fcf | ||
|
|
ce722a2371 | ||
|
|
83b5c9a9c7 | ||
|
|
1bd1e4dff2 | ||
|
|
9bb0d1d40b | ||
|
|
d244717ce6 | ||
|
|
2124e4742f | ||
|
|
41a0cf0950 | ||
|
|
24a7efccf4 | ||
|
|
d65fd5159f | ||
|
|
6f78a9c24e | ||
|
|
722110dbc6 | ||
|
|
0687958dab | ||
|
|
930a49b84b | ||
|
|
7c118a43c6 | ||
|
|
e73e1c7de9 | ||
|
|
8f4f501138 | ||
|
|
f87fc8baeb | ||
|
|
fa9f64b060 | ||
|
|
743303b4db | ||
|
|
81ff427c7f | ||
|
|
a2f7098063 | ||
|
|
2d8a1322e1 | ||
|
|
16411edf9c | ||
|
|
e81a081c5f | ||
|
|
3768ad2fdd | ||
|
|
adeb290799 | ||
|
|
8bceb10f44 | ||
|
|
6afd2090ef | ||
|
|
f2f6fc01d2 | ||
|
|
17a1b0b69b | ||
|
|
805e5d8f5e | ||
|
|
619a7d018f | ||
|
|
35ce351fbd | ||
|
|
c27d7425c5 | ||
|
|
07282faf8c | ||
|
|
8414fd5760 | ||
|
|
0bfd3b5b7f | ||
|
|
34bca798c2 | ||
|
|
794c749f0d | ||
|
|
6ac5fae132 | ||
|
|
4824aa01aa | ||
|
|
a741131a37 | ||
|
|
bf79ca5f12 | ||
|
|
97c313b773 | ||
|
|
32da5d409b | ||
|
|
664ddfcb7f | ||
|
|
5a6e823099 | ||
|
|
3a458d6d8d | ||
|
|
45f46015e8 | ||
|
|
14cc7e20c1 | ||
|
|
35a8e4c71d | ||
|
|
2915f831d0 | ||
|
|
e15fa646d6 | ||
|
|
5abde2d7a4 | ||
|
|
a737e9e347 | ||
|
|
93789ccd42 | ||
|
|
5cc77f58d9 | ||
|
|
3947a4a5d8 | ||
|
|
80c9a27e10 | ||
|
|
2275587735 | ||
|
|
63ffdf0493 | ||
|
|
724c95aae1 | ||
|
|
f462b183ee | ||
|
|
c082463722 | ||
|
|
6672c9f10a | ||
|
|
d949bc5fb1 | ||
|
|
9ee9241c63 | ||
|
|
810863dbb4 | ||
|
|
ec5e84a73e | ||
|
|
7ee52508ea | ||
|
|
1894641554 | ||
|
|
6bdc7e74fa | ||
|
|
1568ff5897 | ||
|
|
7c816ef824 | ||
|
|
adafa5721c | ||
|
|
316ccc3e60 | ||
|
|
580fcba740 | ||
|
|
13adae9a98 | ||
|
|
c0f43f7f84 | ||
|
|
fa6324c8cf | ||
|
|
423a4be164 | ||
|
|
d3f1924690 | ||
|
|
ae9e16e6c7 | ||
|
|
d39dd12389 | ||
|
|
feee89f2e2 | ||
|
|
db7fb35bd2 | ||
|
|
983d9da845 | ||
|
|
08050aee78 | ||
|
|
dd932aed97 | ||
|
|
39689ce2b1 | ||
|
|
c72b4ecf1a | ||
|
|
714384458c | ||
|
|
d66b832b89 | ||
|
|
e878d2b2ee | ||
|
|
277bee902e | ||
|
|
f4e7eeb6ae | ||
|
|
8d263b6f84 | ||
|
|
73e2211cca | ||
|
|
d03dc3e4e2 | ||
|
|
586d221573 | ||
|
|
3a16131954 | ||
|
|
721f543d99 | ||
|
|
ed5dfe0a0a | ||
|
|
40c16c1c5c | ||
|
|
648f7c728a | ||
|
|
37503ec012 | ||
|
|
e32136d5b2 | ||
|
|
79cb09df77 | ||
|
|
1d4fc38c20 | ||
|
|
6061730fee | ||
|
|
b3e36708d6 | ||
|
|
9ca5dbd1c8 | ||
|
|
7cd4f32c71 | ||
|
|
7f18d0e80f | ||
|
|
be257d02cb | ||
|
|
e98a113d13 | ||
|
|
d74f7b1372 | ||
|
|
2bde70ff2d | ||
|
|
93866684f0 | ||
|
|
3398c8a151 | ||
|
|
95d013e95e | ||
|
|
e9470242eb | ||
|
|
5eaa6c5c92 | ||
|
|
60e23373f3 | ||
|
|
3ce2fb1430 | ||
|
|
a42a3fc6fd | ||
|
|
aba44d5ea5 | ||
|
|
9a1501db4b | ||
|
|
36fa636dab | ||
|
|
588baef479 | ||
|
|
a58b212bec | ||
|
|
e9f308d028 | ||
|
|
8dc9f21b94 | ||
|
|
a80052ef77 | ||
|
|
af72bd00fa | ||
|
|
d4e8e5abc4 | ||
|
|
23fc8c6c8f | ||
|
|
2d1c20df3a | ||
|
|
df807b0421 | ||
|
|
384222bb96 | ||
|
|
b198774991 | ||
|
|
aeda17978d | ||
|
|
af0eae58d3 | ||
|
|
836d80f779 | ||
|
|
e52054695d | ||
|
|
fca9856c85 | ||
|
|
2388246805 | ||
|
|
004d5d8aea | ||
|
|
ff450a62d5 | ||
|
|
459d8a523f | ||
|
|
e575b5fb3b | ||
|
|
9a79bd608d | ||
|
|
6f63d53152 | ||
|
|
d613ade489 | ||
|
|
61d8efbaaa | ||
|
|
fc80857ea9 | ||
|
|
1989a0f386 | ||
|
|
4f062fb58d | ||
|
|
5e334d82ca | ||
|
|
8349d2bb93 | ||
|
|
bfe648f06c | ||
|
|
d5e33f1224 | ||
|
|
554361bea5 | ||
|
|
e5d7315d41 | ||
|
|
a86de258b3 | ||
|
|
eecc708cba | ||
|
|
aeaa350d29 | ||
|
|
39b8f02f16 | ||
|
|
56596fb229 | ||
|
|
dd605933a4 | ||
|
|
603b7a8a9f | ||
|
|
9774d8b7bf | ||
|
|
3460654898 | ||
|
|
ccb5814024 | ||
|
|
4f69509d6d | ||
|
|
395e2cb1dd | ||
|
|
dd1457b580 | ||
|
|
df27d650a8 | ||
|
|
3a6b166cf6 | ||
|
|
829916e444 | ||
|
|
9413e68b5b | ||
|
|
d536df54ef | ||
|
|
2af6557fc8 | ||
|
|
e37a09b42d | ||
|
|
c403453cc3 | ||
|
|
d7751d6f95 | ||
|
|
543ce7faeb | ||
|
|
3cb83faa8f | ||
|
|
7199bd3eba | ||
|
|
af48c4393a | ||
|
|
5d02d81ba1 | ||
|
|
d3402c3430 | ||
|
|
d63b5c0e40 | ||
|
|
9ea3ada561 | ||
|
|
5680634acc | ||
|
|
2331b2de71 | ||
|
|
9194d2bd1d | ||
|
|
941f60ca97 | ||
|
|
70901c9078 | ||
|
|
ed63dc9d07 | ||
|
|
3659d2dfd8 | ||
|
|
c8669237ca | ||
|
|
4ab5c95d2c | ||
|
|
67d7032ea3 | ||
|
|
c060047d31 | ||
|
|
dfa291e293 | ||
|
|
c65c66cedc | ||
|
|
961031df8e | ||
|
|
5162e7f481 | ||
|
|
dc963f00fa | ||
|
|
efc5b598db | ||
|
|
37131d1885 | ||
|
|
ce42936a9c | ||
|
|
f653e004cc | ||
|
|
92fca5278d | ||
|
|
841e76d2d7 | ||
|
|
d05bed14a4 | ||
|
|
68368265ec | ||
|
|
afc6d783ec | ||
|
|
16bf9de35e | ||
|
|
06c4ebd539 | ||
|
|
ae6b2b336d | ||
|
|
7cc9c376a5 | ||
|
|
bb28447159 | ||
|
|
f77dcddb60 | ||
|
|
f86f47c366 | ||
|
|
e2b841787d | ||
|
|
09be7a9ea6 | ||
|
|
b736325b6a | ||
|
|
d233349171 | ||
|
|
1e01f39917 | ||
|
|
1a3b2935f0 | ||
|
|
127af65b82 | ||
|
|
c6e06d958e | ||
|
|
3aad0fc919 | ||
|
|
c2b11f9544 | ||
|
|
b75f7b6705 | ||
|
|
aff147e0b2 | ||
|
|
bbf7b6d9c5 | ||
|
|
e256486b98 | ||
|
|
7c9b820a8d | ||
|
|
ded4c7a749 | ||
|
|
b5c6137fda | ||
|
|
5d086d855e | ||
|
|
749a2d6b30 | ||
|
|
023fc1f758 | ||
|
|
036463c821 | ||
|
|
0d11af9188 | ||
|
|
4e5df3ee50 | ||
|
|
d8e5ed900d | ||
|
|
d0afb22bee | ||
|
|
712602b767 | ||
|
|
67cc87f8f8 | ||
|
|
3c90458749 | ||
|
|
c23d403e1e | ||
|
|
fd03471ff1 | ||
|
|
c48b1b93d5 | ||
|
|
da6c03d17d | ||
|
|
91fffaeb4a | ||
|
|
099d409390 | ||
|
|
49c8a40bca | ||
|
|
b10dfcc2a6 | ||
|
|
293a6e4137 | ||
|
|
eb8bf4fc8d | ||
|
|
c8a6ef2731 | ||
|
|
aefaf97f8e | ||
|
|
120d07fbdf | ||
|
|
af5241b82d | ||
|
|
ac6a6e024c | ||
|
|
5e6b949ddc | ||
|
|
1073daeede | ||
|
|
4bf19551f4 | ||
|
|
319a3d52b3 | ||
|
|
220ed024cd | ||
|
|
1b2f6c636f | ||
|
|
3835717dfc | ||
|
|
8dd348638d | ||
|
|
5741372139 | ||
|
|
a9b8928404 | ||
|
|
fef39af079 | ||
|
|
7b71a43eab | ||
|
|
cc6a3dce45 | ||
|
|
3f3a9f8551 | ||
|
|
98c8894724 | ||
|
|
7e75fa0309 | ||
|
|
30a50549c8 | ||
|
|
c8a5ba0889 | ||
|
|
c8422a005e | ||
|
|
dab19587eb | ||
|
|
182c05bc8e | ||
|
|
231ffeb0f7 | ||
|
|
db1f5a225f | ||
|
|
e0171afec8 | ||
|
|
13c766f31c | ||
|
|
645dd79342 | ||
|
|
e754e14a03 | ||
|
|
aeced01cce | ||
|
|
1ed59c448f | ||
|
|
16347b0982 | ||
|
|
9a4919f9de | ||
|
|
fb34ebd488 | ||
|
|
cc0b094ad2 | ||
|
|
68d4636907 | ||
|
|
7115e54458 | ||
|
|
a9839efe09 | ||
|
|
279482425c | ||
|
|
cf2e2e8f5b | ||
|
|
55edc0c9ab | ||
|
|
4977fdffbd | ||
|
|
0e388ca8e5 | ||
|
|
88cd1721c6 | ||
|
|
45353c0c11 | ||
|
|
06becf043b | ||
|
|
2e9534b7d1 | ||
|
|
f4e8e34ce2 | ||
|
|
b6a628f3b0 | ||
|
|
18660b2428 | ||
|
|
54d2ccf090 | ||
|
|
f5fa499905 | ||
|
|
b18b38255b | ||
|
|
1b93086307 | ||
|
|
62d989c961 | ||
|
|
db65a03c8d | ||
|
|
7678e06ec8 | ||
|
|
b7c48c12c4 | ||
|
|
23413616f0 | ||
|
|
1c1a3edc9c | ||
|
|
78d49f9d06 | ||
|
|
52fba4e50c | ||
|
|
1f464f6393 | ||
|
|
039681e897 | ||
|
|
7925834202 | ||
|
|
7b40730823 | ||
|
|
3406fdc37c | ||
|
|
afa9b7a29d | ||
|
|
3f6d634c00 | ||
|
|
5ce188dc27 | ||
|
|
b208624a5a | ||
|
|
4ad0e9f039 | ||
|
|
0d2c489360 | ||
|
|
5aea683c8f | ||
|
|
643a02d879 | ||
|
|
e591cb0818 | ||
|
|
177747f845 | ||
|
|
f2d990e2ff | ||
|
|
aeded745cf | ||
|
|
545847d99a | ||
|
|
6c66243044 | ||
|
|
08f50cdf10 | ||
|
|
60c2d70153 | ||
|
|
5b8bfa6be6 | ||
|
|
b5560d55b9 | ||
|
|
546c72d48a | ||
|
|
1e905ae7c2 | ||
|
|
c6fb79de67 | ||
|
|
63d66e4f7a | ||
|
|
f19033f04c | ||
|
|
358b03de75 | ||
|
|
0a99506270 | ||
|
|
15597adac4 | ||
|
|
ea5ae1886c | ||
|
|
19639a6df7 | ||
|
|
6173eddc84 | ||
|
|
55b168ed8c | ||
|
|
947002cd00 | ||
|
|
a114956d84 | ||
|
|
a7f7279223 | ||
|
|
a4ee5a5be2 | ||
|
|
0bdceb5dd4 | ||
|
|
4d794e8fc8 | ||
|
|
472e0d15ab | ||
|
|
8e0d140089 | ||
|
|
7bdabfd04b | ||
|
|
21fc9d11a0 | ||
|
|
33ef5f726f | ||
|
|
d107f3a358 | ||
|
|
93c8151197 | ||
|
|
e51e3d74a5 | ||
|
|
0d66c891ed | ||
|
|
726d26fce3 | ||
|
|
2498593cea | ||
|
|
cabae55b4d | ||
|
|
48a920d273 | ||
|
|
c3b3c42675 | ||
|
|
760ffe59ff | ||
|
|
cc91df01f6 | ||
|
|
da16661390 | ||
|
|
c7fe166167 | ||
|
|
896c5480d0 | ||
|
|
6a77dfd67d | ||
|
|
1ebc396a2f | ||
|
|
3c50c37373 | ||
|
|
10ff1377ec | ||
|
|
f05293187a | ||
|
|
2c3a05684e | ||
|
|
a298cbf7e5 | ||
|
|
06acf26777 | ||
|
|
ec51b7dd14 | ||
|
|
b7c133dffb | ||
|
|
71b459fb67 | ||
|
|
5439fb8b13 | ||
|
|
cbd557e6e7 | ||
|
|
d960a63996 | ||
|
|
a6c2f19d8f | ||
|
|
dec6e8d1b9 | ||
|
|
4e3f76dde7 | ||
|
|
808a8fc9ba | ||
|
|
675971fdbd | ||
|
|
be867be2f8 | ||
|
|
aa3a7fc0c4 | ||
|
|
3ff24995c0 | ||
|
|
2016eb7e99 | ||
|
|
091c5aa189 | ||
|
|
9e60c55337 | ||
|
|
088d558aad | ||
|
|
7faeb58cf6 | ||
|
|
343e93a88c | ||
|
|
b1ff8917da | ||
|
|
c9aee79f43 | ||
|
|
9fdd2a866e | ||
|
|
b4551396b4 | ||
|
|
cc1520b4a7 | ||
|
|
e9de63b69e | ||
|
|
a4f1cc2b2c | ||
|
|
23b126a00a | ||
|
|
8091aa886d | ||
|
|
9f421c7bd8 | ||
|
|
320b6b72a3 | ||
|
|
2c3a9b7ec3 | ||
|
|
a0f2bb5229 | ||
|
|
0cb78ee0f2 | ||
|
|
24be46e3cc | ||
|
|
767a8f0e72 | ||
|
|
11797b3935 | ||
|
|
d04a94e494 | ||
|
|
6f7972e0db | ||
|
|
27e9a1da41 | ||
|
|
ebd3663ec4 | ||
|
|
8fdff9e32d | ||
|
|
8f142046a1 | ||
|
|
f1b6601054 | ||
|
|
3b064f9f82 | ||
|
|
771e48a594 | ||
|
|
9b1385fdf1 | ||
|
|
53443b0a31 | ||
|
|
723c3e876d | ||
|
|
a131070cf5 | ||
|
|
56c18c9d97 | ||
|
|
d005c0bf07 | ||
|
|
eca5f63cc0 | ||
|
|
0fbc77ce24 | ||
|
|
c57d71399e | ||
|
|
7ba2992c5e | ||
|
|
bb9c28e531 | ||
|
|
ee222b6dfc | ||
|
|
e6b69071e6 | ||
|
|
32171d907f | ||
|
|
ac05ef0997 | ||
|
|
d762918baa | ||
|
|
166f803ca5 | ||
|
|
f0a382ddc4 | ||
|
|
98ce92bb95 | ||
|
|
791fcd4008 | ||
|
|
584d5e4c2e | ||
|
|
ae74c6e16f | ||
|
|
eba21844aa | ||
|
|
1b6cb54248 | ||
|
|
9cb603d85d | ||
|
|
ea78cb099c | ||
|
|
216d106014 | ||
|
|
16e39233a6 | ||
|
|
cfc662b522 | ||
|
|
830e45d58f | ||
|
|
ce9911e7fc | ||
|
|
550542ab2c | ||
|
|
bd6164e594 | ||
|
|
b714b97102 | ||
|
|
5c1b235c13 | ||
|
|
ad2757b416 | ||
|
|
c508aac93a | ||
|
|
722313f28b | ||
|
|
46f3b40fbc | ||
|
|
c7515452c2 | ||
|
|
8b66257ca7 | ||
|
|
31c3c0ba3f | ||
|
|
ed1828f6d3 | ||
|
|
a145564524 | ||
|
|
b35f2b74b2 | ||
|
|
23e454533c | ||
|
|
7df8475d21 | ||
|
|
959c8836af | ||
|
|
ea73151cf1 | ||
|
|
402adc4d66 | ||
|
|
09bb4619a8 | ||
|
|
02c41342d1 | ||
|
|
8952227524 | ||
|
|
7c88e7accd | ||
|
|
5c66437630 | ||
|
|
05e7b0a6da | ||
|
|
44a246ce04 | ||
|
|
4a2fc6fc99 | ||
|
|
c3ecfb4b39 | ||
|
|
63925c1df2 | ||
|
|
98efb71cc6 | ||
|
|
00a661f648 | ||
|
|
91582b5e23 | ||
|
|
d1c24e98af | ||
|
|
648f0fa933 | ||
|
|
e51ff6d7e2 | ||
|
|
98f958510d | ||
|
|
88f4e6e0be | ||
|
|
85a581a551 | ||
|
|
35c3a263e6 | ||
|
|
5ac94fa91d | ||
|
|
6edaf437ad | ||
|
|
214952c2b9 | ||
|
|
83f7a38e43 | ||
|
|
0af43df308 | ||
|
|
6bf3853643 | ||
|
|
01699f6e43 | ||
|
|
cd160a1eee | ||
|
|
8490e67305 | ||
|
|
cce22d68f4 | ||
|
|
92ab3521ca | ||
|
|
3901588270 | ||
|
|
6032ef19fb | ||
|
|
a252f737f2 | ||
|
|
52a76dadc5 | ||
|
|
f98afbf64c | ||
|
|
8240be42e0 | ||
|
|
e9a4a1051b | ||
|
|
7d74ff4c2f | ||
|
|
cc1b7d029e | ||
|
|
2fd703e14d | ||
|
|
c9846fdb36 | ||
|
|
4464e8fcc5 | ||
|
|
525b25ee6f | ||
|
|
2d50ee41e7 | ||
|
|
8cce7701d6 | ||
|
|
a655a07ff9 | ||
|
|
c1df41bc65 | ||
|
|
f1585cf51a | ||
|
|
0937c35f24 | ||
|
|
3b350ce041 | ||
|
|
829165a80b | ||
|
|
a619b9ff61 | ||
|
|
97a7b55e74 | ||
|
|
90c0202c42 | ||
|
|
6a810bb940 | ||
|
|
86160a8be0 | ||
|
|
75610d0b90 | ||
|
|
b46254669f | ||
|
|
9ce856b79d | ||
|
|
b290ffa439 | ||
|
|
f0ff619f9b | ||
|
|
2d6024c7f8 | ||
|
|
1f2f2b4753 | ||
|
|
5ffdf1568a | ||
|
|
f24948dd05 | ||
|
|
6d4b73cfbd | ||
|
|
a00be8e329 | ||
|
|
621a3067fe | ||
|
|
ac40a8c41c | ||
|
|
1440c67b78 | ||
|
|
dceb8ecc90 | ||
|
|
b935996dce | ||
|
|
8812e70d6f | ||
|
|
e9f34dfca9 | ||
|
|
0bf8c63ba0 | ||
|
|
f668aab0c6 | ||
|
|
447b017c4f | ||
|
|
44d2f82355 | ||
|
|
387cf53097 | ||
|
|
bf3961daac | ||
|
|
9631205f9b | ||
|
|
60aec5e8e4 | ||
|
|
2b84278af7 | ||
|
|
97d8179f50 | ||
|
|
e665f515d0 | ||
|
|
c25e8a64ca | ||
|
|
edf2167010 | ||
|
|
93cd181feb | ||
|
|
61820cf2e7 | ||
|
|
5255b797b5 | ||
|
|
5d286420c3 | ||
|
|
fe13e21bb8 | ||
|
|
d7a7c117e4 | ||
|
|
c103b461e8 | ||
|
|
f8ab09dcd6 | ||
|
|
f4934ffb87 | ||
|
|
214824031e |
164
.editorconfig
Normal file
164
.editorconfig
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
indent_size = 4
|
||||
# New line preferences
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_within_query_expression_clauses = true
|
||||
|
||||
# Code files
|
||||
[*.{cs,csx,vb,vbx}]
|
||||
indent_size = 4
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = one_less_than_current
|
||||
|
||||
# avoid this. unless absolutely necessary
|
||||
dotnet_style_qualification_for_field = false:suggestion
|
||||
dotnet_style_qualification_for_property = false:suggestion
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
dotnet_style_qualification_for_event = false:suggestion
|
||||
|
||||
# only use var when it's obvious what the variable type is
|
||||
csharp_style_var_for_built_in_types = false:none
|
||||
csharp_style_var_when_type_is_apparent = false:none
|
||||
csharp_style_var_elsewhere = false:suggestion
|
||||
|
||||
# use language keywords instead of BCL types
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||
|
||||
# name all constant fields using PascalCase
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
|
||||
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
|
||||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
||||
|
||||
# internal and private fields should be _camelCase
|
||||
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
|
||||
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
|
||||
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
|
||||
|
||||
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
|
||||
|
||||
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
|
||||
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
|
||||
|
||||
# Code style defaults
|
||||
dotnet_sort_system_directives_first = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = false
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:none
|
||||
csharp_style_expression_bodied_constructors = false:none
|
||||
csharp_style_expression_bodied_operators = false:none
|
||||
csharp_style_expression_bodied_properties = true:none
|
||||
csharp_style_expression_bodied_indexers = true:none
|
||||
csharp_style_expression_bodied_accessors = true:none
|
||||
|
||||
# Pattern matching
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
|
||||
# Null checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
csharp_space_after_dot = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_after_semicolon_in_for_statement = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_around_declaration_statements = do_not_ignore
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_before_comma = false
|
||||
csharp_space_before_dot = false
|
||||
csharp_space_before_open_square_brackets = false
|
||||
csharp_space_before_semicolon_in_for_statement = false
|
||||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
[*.{asm,inc}]
|
||||
indent_size = 8
|
||||
|
||||
# Visual Studio Solution Files
|
||||
[*.sln]
|
||||
indent_style = tab
|
||||
|
||||
# Visual Studio XML Project Files
|
||||
[*.{csproj,vbproj,vcxproj.filters,proj,projitems,shproj}]
|
||||
indent_size = 2
|
||||
|
||||
# XML Configuration Files
|
||||
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}]
|
||||
indent_size = 2
|
||||
|
||||
[CMakeLists.txt]
|
||||
indent_size = 2
|
||||
|
||||
# Makefiles
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
# Batch Files
|
||||
[*.{cmd,bat}]
|
||||
indent_size = 2
|
||||
end_of_line = crlf
|
||||
|
||||
# Bash Files
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
# Web Files
|
||||
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,pcss,svg,vue}]
|
||||
indent_size = 2
|
||||
|
||||
# Markdown Files
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
# JSON Files
|
||||
[*.{json,json5,webmanifest}]
|
||||
indent_size = 2
|
||||
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
custom: "https://fmodel.app/donate"
|
||||
45
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
45
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "Bug Title"
|
||||
labels: [bug]
|
||||
assignees:
|
||||
- iAmAsval
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report! Keep in mind that screenshots and log files help us a lot so don't forget to provide one or both of those (drag and drop files in a text area).
|
||||
Your bug report will be closed without explanation if you don't follow the following rules:
|
||||
- Bad bug explanation will result in bad support and probably on a negative tone
|
||||
- This template shouldn't be used to ask how to use FModel or a certain feature FModel provides
|
||||
- Bug reports must always use the latest FModel with the latest available version of the game you use
|
||||
- If you can't load files, it's probably because of your AES key, no need to file a report
|
||||
- We absolutely do not support modding
|
||||
- type: input
|
||||
id: game
|
||||
attributes:
|
||||
label: Game
|
||||
placeholder: ex. Fortnite, Valorant, ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: error
|
||||
attributes:
|
||||
label: Error
|
||||
description: Tell us what FModel says about the error, from the console and / or the log file
|
||||
placeholder: ex. [ERR] Could not export 'EditorClientAssetRegistry.bin'
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Reproduction steps
|
||||
description: How do you trigger this bug? Please walk us through it step by step.
|
||||
placeholder: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Discord Server
|
||||
url: https://fmodel.app/discord
|
||||
about: Please ask and answer questions here.
|
||||
22
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
22
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
name: Feature Request
|
||||
description: Submit a new feature request
|
||||
title: "Feature Title"
|
||||
labels: [suggestion]
|
||||
assignees:
|
||||
- iAmAsval
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request! Before going any further, make sure what you're about to submit doesn't already exist.
|
||||
Your feature request will be closed without explanation if you don't follow the following rules:
|
||||
- This template shouldn't be used to ask how to use FModel or a certain feature FModel provides
|
||||
- We absolutely do not support modding
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Tell us what you want FModel to be able to do
|
||||
placeholder: Please describe with details and how it could be done if possible...
|
||||
validations:
|
||||
required: true
|
||||
48
.github/workflows/main.yml
vendored
Normal file
48
.github/workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: FModel Builder
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
appVersion:
|
||||
description: 'FModel Version And Release Tag'
|
||||
required: true
|
||||
default: '4.0.X.X'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: GIT Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
- name: Fetch Submodules Recursively
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: .NET 8 Setup
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: .NET Restore
|
||||
run: dotnet restore FModel
|
||||
|
||||
- name: .NET Publish
|
||||
run: dotnet publish FModel -c Release --no-self-contained -r win-x64 -f net8.0-windows -o "./FModel/bin/Publish/" -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:DebugType=None -p:GenerateDocumentationFile=false -p:DebugSymbols=false -p:AssemblyVersion=${{ github.event.inputs.appVersion }} -p:FileVersion=${{ github.event.inputs.appVersion }}
|
||||
|
||||
- name: ZIP File
|
||||
uses: papeloto/action-zip@v1
|
||||
with:
|
||||
files: ./FModel/bin/Publish/FModel.exe
|
||||
dest: FModel.zip # will end up in working directory not the Publish folder
|
||||
|
||||
- name: GIT Release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
title: "FModel v${{ github.event.inputs.appVersion }}"
|
||||
automatic_release_tag: ${{ github.event.inputs.appVersion }}
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
prerelease: false
|
||||
files: FModel.zip
|
||||
65
.github/workflows/qa.yml
vendored
Normal file
65
.github/workflows/qa.yml
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
name: FModel QA Builder
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: GIT Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: .NET 8 Setup
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: .NET Restore
|
||||
run: dotnet restore FModel
|
||||
|
||||
- name: .NET Publish
|
||||
run: dotnet publish "./FModel/FModel.csproj" -c Release --no-restore --no-self-contained -r win-x64 -f net8.0-windows -o "./FModel/bin/Publish/" -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:DebugType=None -p:GenerateDocumentationFile=false -p:DebugSymbols=false
|
||||
|
||||
- name: ZIP File
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: zip
|
||||
filename: ${{ github.sha }}.zip # will end up in working directory not the Publish folder
|
||||
path: ./FModel/bin/Publish/FModel.exe
|
||||
|
||||
- name: Edit QA Artifact
|
||||
uses: ncipollo/release-action@v1.14.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: 'FModel QA Testing'
|
||||
body: 'Dev builds'
|
||||
tag: 'qa'
|
||||
artifacts: ${{ github.sha }}.zip
|
||||
prerelease: true
|
||||
allowUpdates: true
|
||||
|
||||
- name: Get Version
|
||||
id: package_version
|
||||
uses: kzrnm/get-net-sdk-project-versions-action@v2
|
||||
with:
|
||||
proj-path: ./FModel/FModel.csproj
|
||||
|
||||
- name: FModel Auth
|
||||
id: fmodel_auth
|
||||
uses: fjogeleit/http-request-action@v1.15.5
|
||||
with:
|
||||
url: "https://api.fmodel.app/v1/oauth/token"
|
||||
data: '{"username": "${{ secrets.API_USERNAME }}", "password": "${{ secrets.API_PASSWORD }}"}'
|
||||
|
||||
- name: FModel Deploy Build
|
||||
uses: fjogeleit/http-request-action@v1.15.5
|
||||
with:
|
||||
url: "https://api.fmodel.app/v1/infos/${{ secrets.QA_ID }}"
|
||||
method: "PATCH"
|
||||
bearerToken: ${{ fromJson(steps.fmodel_auth.outputs.response).accessToken }}
|
||||
data: '{"version": "${{ steps.package_version.outputs.version }}-dev+${{ github.sha }}", "downloadUrl": "https://github.com/4sval/FModel/releases/download/qa/${{ github.sha }}.zip"}'
|
||||
53
.gitignore
vendored
53
.gitignore
vendored
|
|
@ -4,6 +4,7 @@
|
|||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
|
|
@ -12,6 +13,9 @@
|
|||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
|
|
@ -19,13 +23,17 @@
|
|||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
.idea/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
|
|
@ -36,9 +44,10 @@ Generated\ Files/
|
|||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
|
|
@ -52,7 +61,6 @@ BenchmarkDotNet.Artifacts/
|
|||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
|
@ -60,7 +68,7 @@ StyleCopReport.xml
|
|||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
|
|
@ -77,6 +85,7 @@ StyleCopReport.xml
|
|||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
|
|
@ -119,9 +128,6 @@ _ReSharper*/
|
|||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
|
|
@ -179,6 +185,8 @@ PublishScripts/
|
|||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
|
|
@ -203,12 +211,14 @@ BundleArtifacts/
|
|||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
|
|
@ -221,7 +231,7 @@ ClientBin/
|
|||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
|
|
@ -252,6 +262,9 @@ ServiceFabricBackup/
|
|||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
|
@ -287,12 +300,8 @@ paket-files/
|
|||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
|
|
@ -317,7 +326,7 @@ __pycache__/
|
|||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
|
|
@ -326,5 +335,17 @@ ASALocalRun/
|
|||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
|
|
|||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "CUE4Parse"]
|
||||
path = CUE4Parse
|
||||
url = https://github.com/FabianFG/CUE4Parse
|
||||
1
CUE4Parse
Submodule
1
CUE4Parse
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 455b72e5e38bfe9476b5823bc642fc8ef488347f
|
||||
37
FModel.sln
37
FModel.sln
|
|
@ -1,37 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.202
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FModel", "FModel\FModel.csproj", "{8FABCD3A-9D55-4B54-B237-B259D815DEB8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Debug|x64.Build.0 = Debug|x64
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Debug|x86.Build.0 = Debug|x86
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Release|x64.ActiveCfg = Release|x64
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Release|x64.Build.0 = Release|x64
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Release|x86.ActiveCfg = Release|x86
|
||||
{8FABCD3A-9D55-4B54-B237-B259D815DEB8}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3D4827DE-E5BC-4FA0-9D6B-6804C8F3BA96}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,182 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="FModel.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<FModel.Properties.Settings>
|
||||
<setting name="PAKsPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ExtractOutput" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="createIconForCosmetics" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForVariants" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForConsumablesWeapons" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForTraps" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForChallenges" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="loadFeaturedImage" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="wFilename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="wOpacity" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="wSize" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="isWatermark" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="mergerFileName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="mergerImagesRow" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="AESKey" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UMCosmetics" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UMVariants" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UMConsumablesWeapons" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMTraps" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMChallenges" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UMSize" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="UMOpacity" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="UMWatermark" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMFeatured" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMTCosmeticsVariants" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMTLoading" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UMTWeapons" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMTBanners" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UMTFeaturedIMGs" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UMTAthena" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMTDevices" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMTVehicles" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMFilename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UpdateSettings" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForAmmo" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForSTWDefenders" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForSTWHeroes" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="createIconForSTWCardPacks" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="eEmail" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ePassword" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="IconLanguage" serializeAs="String">
|
||||
<value>English</value>
|
||||
</setting>
|
||||
<setting name="challengesDebug" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="challengesWatermark" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="createIconForCreativeGalleries" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="tryToOpenAssets" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="mergerImagesSaveAs" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UMCTGalleries" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ExchangeToken" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="TokenExpiration" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="tConsKey" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="tConsSecret" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="tToken" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="tTokenSecret" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</FModel.Properties.Settings>
|
||||
</userSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
19
FModel/App.xaml
Normal file
19
FModel/App.xaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<Application x:Class="FModel.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
|
||||
StartupUri="MainWindow.xaml" ShutdownMode="OnMainWindowClose"
|
||||
Exit="AppExit" DispatcherUnhandledException="OnUnhandledException">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Dark.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Color x:Key="{x:Static adonisUi:Colors.AccentColor}">#206BD4</Color>
|
||||
<Color x:Key="{x:Static adonisUi:Colors.AlertColor}">#D49220</Color>
|
||||
<Color x:Key="{x:Static adonisUi:Colors.ErrorColor}">#C22B2B</Color>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
178
FModel/App.xaml.cs
Normal file
178
FModel/App.xaml.cs
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
using AdonisUI.Controls;
|
||||
using Microsoft.Win32;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using FModel.Framework;
|
||||
using FModel.Services;
|
||||
using FModel.Settings;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog.Sinks.SystemConsole.Themes;
|
||||
using MessageBox = AdonisUI.Controls.MessageBox;
|
||||
using MessageBoxImage = AdonisUI.Controls.MessageBoxImage;
|
||||
using MessageBoxResult = AdonisUI.Controls.MessageBoxResult;
|
||||
|
||||
namespace FModel;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App
|
||||
{
|
||||
[DllImport("kernel32.dll")]
|
||||
private static extern bool AttachConsole(int dwProcessId);
|
||||
|
||||
[DllImport("winbrand.dll", CharSet = CharSet.Unicode)]
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
||||
static extern string BrandingFormatString(string format);
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
#if DEBUG
|
||||
AttachConsole(-1);
|
||||
#endif
|
||||
base.OnStartup(e);
|
||||
|
||||
try
|
||||
{
|
||||
UserSettings.Default = JsonConvert.DeserializeObject<UserSettings>(
|
||||
File.ReadAllText(UserSettings.FilePath), JsonNetSerializer.SerializerSettings);
|
||||
}
|
||||
catch
|
||||
{
|
||||
UserSettings.Default = new UserSettings();
|
||||
}
|
||||
|
||||
var createMe = false;
|
||||
if (!Directory.Exists(UserSettings.Default.OutputDirectory))
|
||||
{
|
||||
var currentDir = Directory.GetCurrentDirectory();
|
||||
var dirInfo = new DirectoryInfo(currentDir);
|
||||
if (dirInfo.Attributes.HasFlag(FileAttributes.Archive))
|
||||
throw new Exception("FModel cannot be run from an archive file. Please extract it and try again.");
|
||||
if (dirInfo.Attributes.HasFlag(FileAttributes.ReadOnly))
|
||||
throw new Exception("FModel cannot be run from a read-only directory. Please move it to a writable location.");
|
||||
|
||||
UserSettings.Default.OutputDirectory = Path.Combine(currentDir, "Output");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(UserSettings.Default.RawDataDirectory))
|
||||
{
|
||||
createMe = true;
|
||||
UserSettings.Default.RawDataDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(UserSettings.Default.PropertiesDirectory))
|
||||
{
|
||||
createMe = true;
|
||||
UserSettings.Default.PropertiesDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(UserSettings.Default.TextureDirectory))
|
||||
{
|
||||
createMe = true;
|
||||
UserSettings.Default.TextureDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(UserSettings.Default.AudioDirectory))
|
||||
{
|
||||
createMe = true;
|
||||
UserSettings.Default.AudioDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(UserSettings.Default.ModelDirectory))
|
||||
{
|
||||
createMe = true;
|
||||
UserSettings.Default.ModelDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Exports");
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FModel"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Backups"));
|
||||
if (createMe) Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Exports"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Logs"));
|
||||
Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, ".data"));
|
||||
|
||||
#if DEBUG
|
||||
Log.Logger = new LoggerConfiguration().WriteTo.Console(theme: AnsiConsoleTheme.Literate).WriteTo.File(
|
||||
Path.Combine(UserSettings.Default.OutputDirectory, "Logs", $"FModel-Debug-Log-{DateTime.Now:yyyy-MM-dd}.txt"),
|
||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [FModel] [{Level:u3}] {Message:lj}{NewLine}{Exception}").CreateLogger();
|
||||
#else
|
||||
Log.Logger = new LoggerConfiguration().WriteTo.Console(theme: AnsiConsoleTheme.Literate).WriteTo.File(
|
||||
Path.Combine(UserSettings.Default.OutputDirectory, "Logs", $"FModel-Log-{DateTime.Now:yyyy-MM-dd}.txt"),
|
||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [FModel] [{Level:u3}] {Message:lj}{NewLine}{Exception}").CreateLogger();
|
||||
#endif
|
||||
|
||||
Log.Information("Version {Version} ({CommitId})", Constants.APP_VERSION, Constants.APP_COMMIT_ID);
|
||||
Log.Information("{OS}", GetOperatingSystemProductName());
|
||||
Log.Information("{RuntimeVer}", RuntimeInformation.FrameworkDescription);
|
||||
Log.Information("Culture {SysLang}", CultureInfo.CurrentCulture);
|
||||
}
|
||||
|
||||
private void AppExit(object sender, ExitEventArgs e)
|
||||
{
|
||||
Log.Information("––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––");
|
||||
Log.CloseAndFlush();
|
||||
UserSettings.Save();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
private void OnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
Log.Error("{Exception}", e.Exception);
|
||||
|
||||
var messageBox = new MessageBoxModel
|
||||
{
|
||||
Text = $"An unhandled exception occurred: {e.Exception.Message}",
|
||||
Caption = "Fatal Error",
|
||||
Icon = MessageBoxImage.Error,
|
||||
Buttons = new[]
|
||||
{
|
||||
MessageBoxButtons.Custom("Reset Settings", EErrorKind.ResetSettings),
|
||||
MessageBoxButtons.Custom("Restart", EErrorKind.Restart),
|
||||
MessageBoxButtons.Custom("OK", EErrorKind.Ignore)
|
||||
},
|
||||
IsSoundEnabled = false
|
||||
};
|
||||
|
||||
MessageBox.Show(messageBox);
|
||||
if (messageBox.Result == MessageBoxResult.Custom && (EErrorKind) messageBox.ButtonPressed.Id != EErrorKind.Ignore)
|
||||
{
|
||||
if ((EErrorKind) messageBox.ButtonPressed.Id == EErrorKind.ResetSettings)
|
||||
UserSettings.Delete();
|
||||
|
||||
ApplicationService.ApplicationView.Restart();
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private string GetOperatingSystemProductName()
|
||||
{
|
||||
var productName = string.Empty;
|
||||
try
|
||||
{
|
||||
productName = BrandingFormatString("%WINDOWS_LONG%");
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(productName))
|
||||
productName = Environment.OSVersion.VersionString;
|
||||
|
||||
return $"{productName} ({(Environment.Is64BitOperatingSystem ? "64" : "32")}-bit)";
|
||||
}
|
||||
|
||||
public static string GetRegistryValue(string path, string name = null, RegistryHive root = RegistryHive.CurrentUser)
|
||||
{
|
||||
using var rk = RegistryKey.OpenBaseKey(root, RegistryView.Default).OpenSubKey(path);
|
||||
if (rk != null)
|
||||
return rk.GetValue(name, null) as string;
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
10
FModel/AssemblyInfo.cs
Normal file
10
FModel/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
57
FModel/Constants.cs
Normal file
57
FModel/Constants.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
using CUE4Parse.UE4.Objects.Core.Misc;
|
||||
using FModel.Extensions;
|
||||
|
||||
namespace FModel;
|
||||
|
||||
public static class Constants
|
||||
{
|
||||
public static readonly string APP_PATH = Path.GetFullPath(Environment.GetCommandLineArgs()[0]);
|
||||
public static readonly string APP_VERSION = FileVersionInfo.GetVersionInfo(APP_PATH).FileVersion;
|
||||
public static readonly string APP_COMMIT_ID = FileVersionInfo.GetVersionInfo(APP_PATH).ProductVersion.SubstringAfter('+');
|
||||
public static readonly string APP_SHORT_COMMIT_ID = APP_COMMIT_ID[..7];
|
||||
|
||||
public const string ZERO_64_CHAR = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
public static readonly FGuid ZERO_GUID = new(0U);
|
||||
|
||||
public const float SCALE_DOWN_RATIO = 0.01F;
|
||||
public const int SAMPLES_COUNT = 4;
|
||||
|
||||
public const string WHITE = "#DAE5F2";
|
||||
public const string GRAY = "#BBBBBB";
|
||||
public const string RED = "#E06C75";
|
||||
public const string GREEN = "#98C379";
|
||||
public const string YELLOW = "#E5C07B";
|
||||
public const string BLUE = "#528BCC";
|
||||
|
||||
public const string ISSUE_LINK = "https://github.com/4sval/FModel/discussions/categories/q-a";
|
||||
public const string GH_REPO = "https://api.github.com/repos/4sval/FModel";
|
||||
public const string GH_COMMITS_HISTORY = GH_REPO + "/commits";
|
||||
public const string GH_RELEASES = GH_REPO + "/releases";
|
||||
public const string DONATE_LINK = "https://fmodel.app/donate";
|
||||
public const string DISCORD_LINK = "https://fmodel.app/discord";
|
||||
|
||||
public const string _FN_LIVE_TRIGGER = "fortnite-live.manifest";
|
||||
public const string _VAL_LIVE_TRIGGER = "valorant-live.manifest";
|
||||
|
||||
public const string _NO_PRESET_TRIGGER = "Hand Made";
|
||||
|
||||
public static int PALETTE_LENGTH => COLOR_PALETTE.Length;
|
||||
public static readonly Vector3[] COLOR_PALETTE =
|
||||
{
|
||||
new (0.231f, 0.231f, 0.231f), // Dark gray
|
||||
new (0.376f, 0.490f, 0.545f), // Teal
|
||||
new (0.957f, 0.263f, 0.212f), // Red
|
||||
new (0.196f, 0.804f, 0.196f), // Green
|
||||
new (0.957f, 0.647f, 0.212f), // Orange
|
||||
new (0.612f, 0.153f, 0.690f), // Purple
|
||||
new (0.129f, 0.588f, 0.953f), // Blue
|
||||
new (1.000f, 0.920f, 0.424f), // Yellow
|
||||
new (0.824f, 0.412f, 0.118f), // Brown
|
||||
new (0.612f, 0.800f, 0.922f) // Light blue
|
||||
};
|
||||
}
|
||||
42
FModel/Creator/Bases/BB/BaseBreakersIcon.cs
Normal file
42
FModel/Creator/Bases/BB/BaseBreakersIcon.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Creator.Bases.FN;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.BB;
|
||||
|
||||
public class BaseBreakersIcon : BaseIcon
|
||||
{
|
||||
public BaseBreakersIcon(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
SeriesBackground = Utils.GetBitmap("WorldExplorers/Content/UMG/Materials/t_TextGradient.t_TextGradient");
|
||||
Background = new[] { SKColor.Parse("D0D0D0"), SKColor.Parse("636363") };
|
||||
Border = new[] { SKColor.Parse("D0D0D0"), SKColor.Parse("FFFFFF") };
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FSoftObjectPath iconTextureAssetData, "IconTextureAssetData", "UnlockPortraitGuideImage"))
|
||||
Preview = Utils.GetBitmap(iconTextureAssetData);
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "RegionDisplayName", "ZoneName"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "Description", "RegionShortName", "ZoneDescription"))
|
||||
Description = description.Text;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
}
|
||||
139
FModel/Creator/Bases/FN/BaseBundle.cs
Normal file
139
FModel/Creator/Bases/FN/BaseBundle.cs
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
using System.Collections.Generic;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Extensions;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseBundle : UCreator
|
||||
{
|
||||
private IList<BaseQuest> _quests;
|
||||
private const int _headerHeight = 100;
|
||||
|
||||
public BaseBundle(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 1024;
|
||||
Height = _headerHeight;
|
||||
Margin = 0;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
_quests = new List<BaseQuest>();
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "ItemName"))
|
||||
DisplayName = displayName.Text.ToUpperInvariant();
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] quests, "QuestInfos")) // prout :)
|
||||
{
|
||||
foreach (var quest in quests)
|
||||
{
|
||||
if (!quest.TryGetValue(out FSoftObjectPath questDefinition, "QuestDefinition")) continue;
|
||||
|
||||
BaseQuest q;
|
||||
var path = questDefinition.AssetPathName.Text;
|
||||
do
|
||||
{
|
||||
if (!Utils.TryLoadObject(path, out UObject uObject)) break;
|
||||
|
||||
q = new BaseQuest(uObject, Style);
|
||||
q.ParseForInfo();
|
||||
_quests.Add(q);
|
||||
path = path.SubstringBeforeWithLast('/') + q.NextQuestName + "." + q.NextQuestName;
|
||||
} while (!string.IsNullOrEmpty(q.NextQuestName));
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] completionRewards, "BundleCompletionRewards"))
|
||||
{
|
||||
foreach (var completionReward in completionRewards)
|
||||
{
|
||||
if (!completionReward.TryGetValue(out int completionCount, "CompletionCount") ||
|
||||
!completionReward.TryGetValue(out FStructFallback[] rewards, "Rewards")) continue;
|
||||
|
||||
foreach (var reward in rewards)
|
||||
{
|
||||
if (!reward.TryGetValue(out int quantity, "Quantity") ||
|
||||
!reward.TryGetValue(out string templateId, "TemplateId") ||
|
||||
!reward.TryGetValue(out FSoftObjectPath itemDefinition, "ItemDefinition")) continue;
|
||||
|
||||
if (!itemDefinition.AssetPathName.IsNone &&
|
||||
!itemDefinition.AssetPathName.Text.Contains("/Items/Tokens/") &&
|
||||
!itemDefinition.AssetPathName.Text.Contains("/Items/Quests"))
|
||||
{
|
||||
_quests.Add(new BaseQuest(completionCount, itemDefinition, Style));
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(templateId))
|
||||
{
|
||||
_quests.Add(new BaseQuest(completionCount, quantity, templateId, Style));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Height += 256 * _quests.Count;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Opaque);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawHeader(c);
|
||||
DrawDisplayName(c);
|
||||
DrawQuests(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private readonly SKPaint _headerPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.Bundle, TextSize = 50,
|
||||
TextAlign = SKTextAlign.Center, Color = SKColor.Parse("#262630")
|
||||
};
|
||||
|
||||
private void DrawHeader(SKCanvas c)
|
||||
{
|
||||
c.DrawRect(new SKRect(0, 0, Width, _headerHeight), _headerPaint);
|
||||
|
||||
var background = _quests.Count > 0 ? _quests[0].Background : Background;
|
||||
_headerPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, _headerHeight / 2), Width / 5 * 4,
|
||||
new[] { background[0].WithAlpha(50), background[1].WithAlpha(50) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, 0, Width, _headerHeight), _headerPaint);
|
||||
|
||||
_headerPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(Width / 2, _headerHeight), new SKPoint(Width / 2, 75),
|
||||
new[] { SKColors.Black.WithAlpha(25), background[1].WithAlpha(0) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, 75, Width, _headerHeight), _headerPaint);
|
||||
}
|
||||
|
||||
private new void DrawDisplayName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrEmpty(DisplayName)) return;
|
||||
|
||||
_headerPaint.Shader = null;
|
||||
_headerPaint.Color = SKColors.White;
|
||||
while (_headerPaint.MeasureText(DisplayName) > Width)
|
||||
{
|
||||
_headerPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_headerPaint.Typeface);
|
||||
c.DrawShapedText(shaper, DisplayName, Width / 2f, _headerHeight / 2f + _headerPaint.TextSize / 2 - 10, _headerPaint);
|
||||
}
|
||||
|
||||
private void DrawQuests(SKCanvas c)
|
||||
{
|
||||
var y = _headerHeight;
|
||||
foreach (var quest in _quests)
|
||||
{
|
||||
quest.DrawQuest(c, y);
|
||||
y += quest.Height;
|
||||
}
|
||||
}
|
||||
}
|
||||
278
FModel/Creator/Bases/FN/BaseCommunity.cs
Normal file
278
FModel/Creator/Bases/FN/BaseCommunity.cs
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
using System.Linq;
|
||||
using CUE4Parse.GameTypes.FN.Enums;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.GameplayTags;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using FModel.Extensions;
|
||||
using FModel.Framework;
|
||||
using FModel.Services;
|
||||
using FModel.Settings;
|
||||
using FModel.ViewModels.ApiEndpoints.Models;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseCommunity : BaseIcon
|
||||
{
|
||||
private readonly CommunityDesign _design;
|
||||
private string _rarityName;
|
||||
private string _source;
|
||||
private string _season;
|
||||
private bool _lowerDrawn;
|
||||
|
||||
public BaseCommunity(UObject uObject, EIconStyle style, string designName) : base(uObject, style)
|
||||
{
|
||||
Margin = 0;
|
||||
_lowerDrawn = false;
|
||||
_design = ApplicationService.ApiEndpointView.FModelApi.GetDesign(designName);
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
ParseForReward(UserSettings.Default.CosmeticDisplayAsset);
|
||||
|
||||
if (Object.TryGetValue(out FPackageIndex series, "Series"))
|
||||
{
|
||||
_rarityName = series.Name;
|
||||
}
|
||||
else if (Object.TryGetValue(out FInstancedStruct[] dataList, "DataList") &&
|
||||
dataList.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FPackageIndex _, "Series") == true) is { } dl)
|
||||
{
|
||||
_rarityName = dl.NonConstStruct?.Get<FPackageIndex>("Series").Name;
|
||||
}
|
||||
else if (Object.TryGetValue(out FStructFallback componentContainer, "ComponentContainer") &&
|
||||
componentContainer.TryGetValue(out FPackageIndex[] components, "Components") &&
|
||||
components.FirstOrDefault(c => c.Name.Contains("Series")) is { } seriesDef &&
|
||||
seriesDef.TryLoad(out var seriesDefObj) && seriesDefObj is not null &&
|
||||
seriesDefObj.TryGetValue(out series, "Series"))
|
||||
{
|
||||
_rarityName = series.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
_rarityName = Object.GetOrDefault("Rarity", EFortRarity.Uncommon).GetDescription();
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FGameplayTagContainer gameplayTags, "GameplayTags"))
|
||||
CheckGameplayTags(gameplayTags);
|
||||
if (Object.TryGetValue(out FPackageIndex cosmeticItem, "cosmetic_item"))
|
||||
CosmeticSource = cosmeticItem.Name.ToUpper();
|
||||
|
||||
DisplayName = DisplayName.ToUpper();
|
||||
Description = Description.ToUpper();
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
if (_design == null)
|
||||
{
|
||||
base.Draw(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
if (_design.DrawSeason && _design.Fonts.TryGetValue("Season", out var font))
|
||||
DrawToBottom(c, font, _season);
|
||||
if (_design.DrawSource && _design.Fonts.TryGetValue("Source", out font))
|
||||
DrawToBottom(c, font, _source);
|
||||
DrawUserFacingFlags(c, _design.GameplayTags.DrawCustomOnly);
|
||||
}
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void CheckGameplayTags(FGameplayTagContainer gameplayTags)
|
||||
{
|
||||
if (_design == null) return;
|
||||
if (_design.DrawSource)
|
||||
{
|
||||
if (gameplayTags.TryGetGameplayTag("Cosmetics.Source.", out var source))
|
||||
_source = source.Text["Cosmetics.Source.".Length..].ToUpper();
|
||||
else if (gameplayTags.TryGetGameplayTag("Athena.ItemAction.", out var action))
|
||||
_source = action.Text["Athena.ItemAction.".Length..].ToUpper();
|
||||
}
|
||||
|
||||
if (_design.DrawSet && gameplayTags.TryGetGameplayTag("Cosmetics.Set.", out var set))
|
||||
Description += GetCosmeticSet(set.Text, _design.DrawSetShort);
|
||||
if (_design.DrawSeason && gameplayTags.TryGetGameplayTag("Cosmetics.Filter.Season.", out var season))
|
||||
_season = GetCosmeticSeason(season.Text, _design.DrawSeasonShort);
|
||||
|
||||
var triggers = _design.GameplayTags.DrawCustomOnly ? new[] { "Cosmetics.UserFacingFlags." } : new[] { "Cosmetics.UserFacingFlags.", "Homebase.Class.", "NPC.CharacterType.Survivor.Defender." };
|
||||
GetUserFacingFlags(gameplayTags.GetAllGameplayTags(triggers));
|
||||
}
|
||||
|
||||
private string GetCosmeticSet(string setName, bool bShort)
|
||||
{
|
||||
return bShort ? setName["Cosmetics.Set.".Length..] : base.GetCosmeticSet(setName);
|
||||
}
|
||||
|
||||
private string GetCosmeticSeason(string seasonNumber, bool bShort)
|
||||
{
|
||||
if (!bShort) return base.GetCosmeticSeason(seasonNumber);
|
||||
var s = seasonNumber["Cosmetics.Filter.Season.".Length..];
|
||||
(int chapterIdx, int seasonIdx) = GetInternalSID(int.Parse(s));
|
||||
return $"C{chapterIdx} S{seasonIdx}";
|
||||
}
|
||||
|
||||
private new void DrawBackground(SKCanvas c)
|
||||
{
|
||||
if (_design.Rarities.TryGetValue(_rarityName, out var rarity))
|
||||
{
|
||||
c.DrawBitmap(rarity.Background, 0, 0, ImagePaint);
|
||||
c.DrawBitmap(rarity.Upper, 0, 0, ImagePaint);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DrawBackground(c);
|
||||
}
|
||||
}
|
||||
|
||||
private new void DrawTextBackground(SKCanvas c)
|
||||
{
|
||||
if (!_lowerDrawn && string.IsNullOrEmpty(DisplayName) && string.IsNullOrEmpty(Description)) return;
|
||||
|
||||
_lowerDrawn = true;
|
||||
if (_design.Rarities.TryGetValue(_rarityName, out var rarity))
|
||||
{
|
||||
c.DrawBitmap(rarity.Lower, 0, 0, ImagePaint);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DrawTextBackground(c);
|
||||
}
|
||||
}
|
||||
|
||||
private new void DrawDisplayName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrEmpty(DisplayName)) return;
|
||||
if (_design.Fonts.TryGetValue(nameof(DisplayName), out var font))
|
||||
{
|
||||
DisplayNamePaint.TextSize = font.FontSize;
|
||||
DisplayNamePaint.TextScaleX = font.FontScale;
|
||||
DisplayNamePaint.Color = font.FontColor;
|
||||
DisplayNamePaint.TextSkewX = font.SkewValue;
|
||||
DisplayNamePaint.TextAlign = font.Alignment;
|
||||
if (font.ShadowValue > 0)
|
||||
DisplayNamePaint.ImageFilter = SKImageFilter.CreateDropShadow(2, 2, 4, 4, new SKColor(0, 0, 0, font.ShadowValue));
|
||||
if (font.Typeface.TryGetValue(UserSettings.Default.AssetLanguage, out var path) ||
|
||||
font.Typeface.TryGetValue(ELanguage.English, out path))
|
||||
DisplayNamePaint.Typeface = Utils.Typefaces.OnTheFly(path);
|
||||
|
||||
while (DisplayNamePaint.MeasureText(DisplayName) > Width - Margin * 2)
|
||||
{
|
||||
DisplayNamePaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(DisplayNamePaint.Typeface);
|
||||
var x = font.Alignment switch
|
||||
{
|
||||
SKTextAlign.Center => Width / 2f,
|
||||
_ => font.X
|
||||
};
|
||||
|
||||
c.DrawShapedText(shaper, DisplayName, x, font.Y, DisplayNamePaint);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DrawDisplayName(c);
|
||||
}
|
||||
}
|
||||
|
||||
private new void DrawDescription(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Description)) return;
|
||||
if (_design.Fonts.TryGetValue(nameof(Description), out var font))
|
||||
{
|
||||
DescriptionPaint.TextSize = font.FontSize;
|
||||
DescriptionPaint.TextScaleX = font.FontScale;
|
||||
DescriptionPaint.Color = font.FontColor;
|
||||
DescriptionPaint.TextSkewX = font.SkewValue;
|
||||
DescriptionPaint.TextAlign = font.Alignment;
|
||||
if (font.ShadowValue > 0)
|
||||
DescriptionPaint.ImageFilter = SKImageFilter.CreateDropShadow(2, 2, 4, 4, new SKColor(0, 0, 0, font.ShadowValue));
|
||||
if (font.Typeface.TryGetValue(UserSettings.Default.AssetLanguage, out var path) ||
|
||||
font.Typeface.TryGetValue(ELanguage.English, out path))
|
||||
DescriptionPaint.Typeface = Utils.Typefaces.OnTheFly(path);
|
||||
|
||||
while (DescriptionPaint.MeasureText(Description) > Width - Margin * 2)
|
||||
{
|
||||
DescriptionPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(DescriptionPaint.Typeface);
|
||||
var x = font.Alignment switch
|
||||
{
|
||||
SKTextAlign.Center => Width / 2f,
|
||||
_ => font.X
|
||||
};
|
||||
|
||||
if (font.MaxLineCount < 2)
|
||||
{
|
||||
c.DrawShapedText(shaper, Description, x, font.Y, DescriptionPaint);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DrawMultilineText(c, Description, Width - Margin * 2, Margin, DescriptionPaint.TextAlign,
|
||||
new SKRect(Margin, font.Y, Width - Margin, Height), DescriptionPaint, out _);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DrawDescription(c);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawToBottom(SKCanvas c, FontDesign font, string text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text)) return;
|
||||
if (!_lowerDrawn)
|
||||
{
|
||||
_lowerDrawn = true;
|
||||
DrawTextBackground(c);
|
||||
}
|
||||
|
||||
DisplayNamePaint.TextSize = font.FontSize;
|
||||
DisplayNamePaint.TextScaleX = font.FontScale;
|
||||
DisplayNamePaint.Color = font.FontColor;
|
||||
DisplayNamePaint.TextSkewX = font.SkewValue;
|
||||
DisplayNamePaint.TextAlign = font.Alignment;
|
||||
if (font.ShadowValue > 0)
|
||||
DisplayNamePaint.ImageFilter = SKImageFilter.CreateDropShadow(2, 2, 4, 4, new SKColor(0, 0, 0, font.ShadowValue));
|
||||
if (font.Typeface.TryGetValue(UserSettings.Default.AssetLanguage, out var path) ||
|
||||
font.Typeface.TryGetValue(ELanguage.English, out path))
|
||||
DisplayNamePaint.Typeface = Utils.Typefaces.OnTheFly(path);
|
||||
|
||||
var shaper = new CustomSKShaper(DisplayNamePaint.Typeface);
|
||||
var x = font.Alignment switch
|
||||
{
|
||||
SKTextAlign.Center => Width / 2f,
|
||||
_ => font.X
|
||||
};
|
||||
|
||||
c.DrawShapedText(shaper, text, x, font.Y, DisplayNamePaint);
|
||||
}
|
||||
|
||||
private void DrawUserFacingFlags(SKCanvas c, bool customOnly)
|
||||
{
|
||||
if (UserFacingFlags == null || UserFacingFlags.Count < 1) return;
|
||||
if (customOnly)
|
||||
{
|
||||
c.DrawBitmap(_design.GameplayTags.Custom, 0, 0, ImagePaint);
|
||||
}
|
||||
else
|
||||
{
|
||||
// add size to api
|
||||
// draw
|
||||
}
|
||||
}
|
||||
}
|
||||
325
FModel/Creator/Bases/FN/BaseIcon.cs
Normal file
325
FModel/Creator/Bases/FN/BaseIcon.cs
Normal file
|
|
@ -0,0 +1,325 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using CUE4Parse.GameTypes.FN.Enums;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.GameplayTags;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse_Conversion.Textures;
|
||||
using FModel.Settings;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseIcon : UCreator
|
||||
{
|
||||
public SKBitmap SeriesBackground { get; protected set; }
|
||||
protected string ShortDescription { get; set; }
|
||||
protected string CosmeticSource { get; set; }
|
||||
protected Dictionary<string, SKBitmap> UserFacingFlags { get; set; }
|
||||
|
||||
public BaseIcon(UObject uObject, EIconStyle style) : base(uObject, style) { }
|
||||
|
||||
public void ParseForReward(bool isUsingDisplayAsset)
|
||||
{
|
||||
// rarity
|
||||
if (Object.TryGetValue(out FPackageIndex series, "Series")) GetSeries(series);
|
||||
else if (Object.TryGetValue(out FStructFallback componentContainer, "ComponentContainer")) GetSeries(componentContainer);
|
||||
else GetRarity(Object.GetOrDefault("Rarity", EFortRarity.Uncommon)); // default is uncommon
|
||||
|
||||
if (Object.TryGetValue(out FInstancedStruct[] dataList, "DataList"))
|
||||
{
|
||||
GetSeries(dataList);
|
||||
Preview = Utils.GetBitmap(dataList);
|
||||
}
|
||||
|
||||
// preview
|
||||
if (Preview is null)
|
||||
{
|
||||
if (isUsingDisplayAsset && Utils.TryGetDisplayAsset(Object, out var preview))
|
||||
Preview = preview;
|
||||
else if (Object.TryGetValue(out FPackageIndex itemDefinition, "HeroDefinition", "WeaponDefinition"))
|
||||
Preview = Utils.GetBitmap(itemDefinition);
|
||||
else if (Object.TryGetValue(out FSoftObjectPath largePreview, "LargePreviewImage", "EntryListIcon", "SmallPreviewImage", "BundleImage", "ItemDisplayAsset", "LargeIcon", "ToastIcon", "SmallIcon"))
|
||||
Preview = Utils.GetBitmap(largePreview);
|
||||
else if (Object.TryGetValue(out string s, "LargePreviewImage") && !string.IsNullOrEmpty(s))
|
||||
Preview = Utils.GetBitmap(s);
|
||||
else if (Object.TryGetValue(out FPackageIndex otherPreview, "SmallPreviewImage", "ToastIcon", "access_item"))
|
||||
Preview = Utils.GetBitmap(otherPreview);
|
||||
else if (Object.TryGetValue(out UMaterialInstanceConstant materialInstancePreview, "EventCalloutImage"))
|
||||
Preview = Utils.GetBitmap(materialInstancePreview);
|
||||
else if (Object.TryGetValue(out FStructFallback brush, "IconBrush") && brush.TryGetValue(out UTexture2D res, "ResourceObject"))
|
||||
Preview = Utils.GetBitmap(res);
|
||||
}
|
||||
|
||||
// text
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "ItemName", "BundleName", "DefaultHeaderText", "UIDisplayName", "EntryName", "EventCalloutTitle"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "Description", "ItemDescription", "BundleDescription", "GeneralDescription", "DefaultBodyText", "UIDescription", "UIDisplayDescription", "EntryDescription", "EventCalloutDescription"))
|
||||
Description = description.Text;
|
||||
else if (Object.TryGetValue(out FText[] descriptions, "Description"))
|
||||
Description = string.Join('\n', descriptions.Select(x => x.Text));
|
||||
if (Object.TryGetValue(out FText shortDescription, "ShortDescription", "UIDisplaySubName"))
|
||||
ShortDescription = shortDescription.Text;
|
||||
else if (Object.ExportType.Equals("AthenaItemWrapDefinition", StringComparison.OrdinalIgnoreCase))
|
||||
ShortDescription = Utils.GetLocalizedResource("Fort.Cosmetics", "ItemWrapShortDescription", "Wrap");
|
||||
|
||||
// Only works on non-cataba designs
|
||||
if (Object.TryGetValue(out FStructFallback eventArrowColor, "EventArrowColor") &&
|
||||
eventArrowColor.TryGetValue(out FLinearColor specifiedArrowColor, "SpecifiedColor") &&
|
||||
Object.TryGetValue(out FStructFallback eventArrowShadowColor, "EventArrowShadowColor") &&
|
||||
eventArrowShadowColor.TryGetValue(out FLinearColor specifiedShadowColor, "SpecifiedColor"))
|
||||
{
|
||||
Background = new[] { SKColor.Parse(specifiedArrowColor.Hex), SKColor.Parse(specifiedShadowColor.Hex) };
|
||||
Border = new[] { SKColor.Parse(specifiedShadowColor.Hex), SKColor.Parse(specifiedArrowColor.Hex) };
|
||||
}
|
||||
|
||||
Description = Utils.RemoveHtmlTags(Description);
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
ParseForReward(UserSettings.Default.CosmeticDisplayAsset);
|
||||
|
||||
if (Object.TryGetValue(out FGameplayTagContainer gameplayTags, "GameplayTags"))
|
||||
CheckGameplayTags(gameplayTags);
|
||||
if (Object.TryGetValue(out FPackageIndex cosmeticItem, "cosmetic_item"))
|
||||
CosmeticSource = cosmeticItem.Name;
|
||||
}
|
||||
|
||||
protected void Draw(SKCanvas c)
|
||||
{
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.NoBackground:
|
||||
DrawPreview(c);
|
||||
break;
|
||||
case EIconStyle.NoText:
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawUserFacingFlags(c);
|
||||
break;
|
||||
default:
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
DrawToBottom(c, SKTextAlign.Right, CosmeticSource);
|
||||
if (Description != ShortDescription)
|
||||
DrawToBottom(c, SKTextAlign.Left, ShortDescription);
|
||||
DrawUserFacingFlags(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
Draw(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void GetSeries(FPackageIndex s)
|
||||
{
|
||||
if (!Utils.TryGetPackageIndexExport(s, out UObject export)) return;
|
||||
|
||||
GetSeries(export);
|
||||
}
|
||||
|
||||
private void GetSeries(FInstancedStruct[] s)
|
||||
{
|
||||
if (s.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FPackageIndex _, "Series") == true) is { } dl)
|
||||
GetSeries(dl.NonConstStruct?.Get<FPackageIndex>("Series"));
|
||||
}
|
||||
|
||||
private void GetSeries(FStructFallback s)
|
||||
{
|
||||
if (!s.TryGetValue(out FPackageIndex[] components, "Components")) return;
|
||||
if (components.FirstOrDefault(c => c.Name.Contains("Series")) is not { } seriesDef ||
|
||||
!seriesDef.TryLoad(out var seriesDefObj) || seriesDefObj is null ||
|
||||
!seriesDefObj.TryGetValue(out UObject series, "Series")) return;
|
||||
|
||||
GetSeries(series);
|
||||
}
|
||||
|
||||
protected void GetSeries(UObject uObject)
|
||||
{
|
||||
if (uObject is UTexture2D texture2D)
|
||||
{
|
||||
SeriesBackground = texture2D.Decode();
|
||||
return;
|
||||
}
|
||||
|
||||
if (uObject.TryGetValue(out FSoftObjectPath backgroundTexture, "BackgroundTexture"))
|
||||
{
|
||||
SeriesBackground = Utils.GetBitmap(backgroundTexture);
|
||||
}
|
||||
|
||||
if (uObject.TryGetValue(out FStructFallback colors, "Colors") &&
|
||||
colors.TryGetValue(out FLinearColor color1, "Color1") &&
|
||||
colors.TryGetValue(out FLinearColor color2, "Color2") &&
|
||||
colors.TryGetValue(out FLinearColor color3, "Color3"))
|
||||
{
|
||||
Background = new[] { SKColor.Parse(color1.Hex), SKColor.Parse(color3.Hex) };
|
||||
Border = new[] { SKColor.Parse(color2.Hex), SKColor.Parse(color1.Hex) };
|
||||
}
|
||||
|
||||
if (uObject.Name.Equals("PlatformSeries") &&
|
||||
uObject.TryGetValue(out FSoftObjectPath itemCardMaterial, "ItemCardMaterial") &&
|
||||
Utils.TryLoadObject(itemCardMaterial.AssetPathName.Text, out UMaterialInstanceConstant material))
|
||||
{
|
||||
foreach (var vectorParameter in material.VectorParameterValues)
|
||||
{
|
||||
if (vectorParameter.ParameterValue == null || !vectorParameter.ParameterInfo.Name.Text.Equals("ColorCircuitBackground"))
|
||||
continue;
|
||||
|
||||
Background[0] = SKColor.Parse(vectorParameter.ParameterValue.Value.Hex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void GetRarity(EFortRarity r)
|
||||
{
|
||||
if (!Utils.TryLoadObject("FortniteGame/Content/Balance/RarityData.RarityData", out UObject export)) return;
|
||||
|
||||
if (export.GetByIndex<FStructFallback>((int) r) is { } data &&
|
||||
data.TryGetValue(out FLinearColor color1, "Color1") &&
|
||||
data.TryGetValue(out FLinearColor color2, "Color2") &&
|
||||
data.TryGetValue(out FLinearColor color3, "Color3"))
|
||||
{
|
||||
Background = new[] { SKColor.Parse(color1.Hex), SKColor.Parse(color3.Hex) };
|
||||
Border = new[] { SKColor.Parse(color2.Hex), SKColor.Parse(color1.Hex) };
|
||||
}
|
||||
}
|
||||
|
||||
protected string GetCosmeticSet(string setName)
|
||||
{
|
||||
if (!Utils.TryLoadObject("FortniteGame/Content/Athena/Items/Cosmetics/Metadata/CosmeticSets.CosmeticSets", out UDataTable cosmeticSets))
|
||||
return string.Empty;
|
||||
|
||||
if (!cosmeticSets.TryGetDataTableRow(setName, StringComparison.OrdinalIgnoreCase, out var uObject))
|
||||
return string.Empty;
|
||||
|
||||
var name = string.Empty;
|
||||
if (uObject.TryGetValue(out FText displayName, "DisplayName"))
|
||||
name = displayName.Text;
|
||||
|
||||
var format = Utils.GetLocalizedResource("Fort.Cosmetics", "CosmeticItemDescription_SetMembership_NotRich", "\nPart of the {0} set.");
|
||||
return string.Format(format, name);
|
||||
}
|
||||
|
||||
protected (int, int) GetInternalSID(int number)
|
||||
{
|
||||
static int GetSeasonsInChapter(int chapter) => chapter switch
|
||||
{
|
||||
1 => 10,
|
||||
2 => 8,
|
||||
3 => 4,
|
||||
4 => 5,
|
||||
_ => 10
|
||||
};
|
||||
|
||||
var chapterIdx = 0;
|
||||
var seasonIdx = 0;
|
||||
while (number > 0)
|
||||
{
|
||||
var seasonsInChapter = GetSeasonsInChapter(++chapterIdx);
|
||||
if (number > seasonsInChapter)
|
||||
number -= seasonsInChapter;
|
||||
else
|
||||
{
|
||||
seasonIdx = number;
|
||||
number = 0;
|
||||
}
|
||||
}
|
||||
return (chapterIdx, seasonIdx);
|
||||
}
|
||||
|
||||
protected string GetCosmeticSeason(string seasonNumber)
|
||||
{
|
||||
var s = seasonNumber["Cosmetics.Filter.Season.".Length..];
|
||||
var initial = int.Parse(s);
|
||||
(int chapterIdx, int seasonIdx) = GetInternalSID(initial);
|
||||
|
||||
var season = Utils.GetLocalizedResource("AthenaSeasonItemDefinitionInternal", "SeasonTextFormat", "Season {0}");
|
||||
var introduced = Utils.GetLocalizedResource("Fort.Cosmetics", "CosmeticItemDescription_Season", "\nIntroduced in <SeasonText>{0}</>.");
|
||||
if (initial <= 10) return Utils.RemoveHtmlTags(string.Format(introduced, string.Format(season, s)));
|
||||
|
||||
var chapter = Utils.GetLocalizedResource("AthenaSeasonItemDefinitionInternal", "ChapterTextFormat", "Chapter {0}");
|
||||
var chapterFormat = Utils.GetLocalizedResource("AthenaSeasonItemDefinitionInternal", "ChapterSeasonTextFormat", "{0}, {1}");
|
||||
var d = string.Format(chapterFormat, string.Format(chapter, chapterIdx), string.Format(season, seasonIdx));
|
||||
return Utils.RemoveHtmlTags(string.Format(introduced, d));
|
||||
}
|
||||
|
||||
private void CheckGameplayTags(FGameplayTagContainer gameplayTags)
|
||||
{
|
||||
if (gameplayTags.TryGetGameplayTag("Cosmetics.Source.", out var source))
|
||||
CosmeticSource = source.Text["Cosmetics.Source.".Length..];
|
||||
else if (gameplayTags.TryGetGameplayTag("Athena.ItemAction.", out var action))
|
||||
CosmeticSource = action.Text["Athena.ItemAction.".Length..];
|
||||
|
||||
if (gameplayTags.TryGetGameplayTag("Cosmetics.Set.", out var set))
|
||||
Description += GetCosmeticSet(set.Text);
|
||||
if (gameplayTags.TryGetGameplayTag("Cosmetics.Filter.Season.", out var season))
|
||||
Description += GetCosmeticSeason(season.Text);
|
||||
|
||||
GetUserFacingFlags(gameplayTags.GetAllGameplayTags(
|
||||
"Cosmetics.UserFacingFlags.", "Homebase.Class.", "NPC.CharacterType.Survivor.Defender."));
|
||||
}
|
||||
|
||||
protected void GetUserFacingFlags(IList<string> userFacingFlags)
|
||||
{
|
||||
if (userFacingFlags.Count < 1 || !Utils.TryLoadObject("FortniteGame/Content/Items/ItemCategories.ItemCategories", out UObject itemCategories))
|
||||
return;
|
||||
|
||||
if (!itemCategories.TryGetValue(out FStructFallback[] tertiaryCategories, "TertiaryCategories"))
|
||||
return;
|
||||
|
||||
UserFacingFlags = new Dictionary<string, SKBitmap>(userFacingFlags.Count);
|
||||
foreach (var flag in userFacingFlags)
|
||||
{
|
||||
if (flag.Equals("Cosmetics.UserFacingFlags.HasUpgradeQuests", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (Object.ExportType.Equals("AthenaPetCarrierItemDefinition", StringComparison.OrdinalIgnoreCase))
|
||||
UserFacingFlags[flag] = SKBitmap.Decode(Application.GetResourceStream(new Uri("pack://application:,,,/Resources/T-Icon-Pets-64.png"))?.Stream);
|
||||
else UserFacingFlags[flag] = SKBitmap.Decode(Application.GetResourceStream(new Uri("pack://application:,,,/Resources/T-Icon-Quests-64.png"))?.Stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var category in tertiaryCategories)
|
||||
{
|
||||
if (category.TryGetValue(out FGameplayTagContainer tagContainer, "TagContainer") && tagContainer.TryGetGameplayTag(flag, out _) &&
|
||||
category.TryGetValue(out FStructFallback categoryBrush, "CategoryBrush") && categoryBrush.TryGetValue(out FStructFallback brushXxs, "Brush_XXS") &&
|
||||
brushXxs.TryGetValue(out FPackageIndex resourceObject, "ResourceObject") && Utils.TryGetPackageIndexExport(resourceObject, out UTexture2D texture))
|
||||
{
|
||||
UserFacingFlags[flag] = Utils.GetBitmap(texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawUserFacingFlags(SKCanvas c)
|
||||
{
|
||||
if (UserFacingFlags == null) return;
|
||||
|
||||
const int size = 25;
|
||||
var x = Margin * (int) 2.5;
|
||||
foreach (var flag in UserFacingFlags.Values.Where(flag => flag != null))
|
||||
{
|
||||
c.DrawBitmap(flag.Resize(size), new SKPoint(x, Margin * (int) 2.5), ImagePaint);
|
||||
x += size;
|
||||
}
|
||||
}
|
||||
}
|
||||
293
FModel/Creator/Bases/FN/BaseIconStats.cs
Normal file
293
FModel/Creator/Bases/FN/BaseIconStats.cs
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CUE4Parse.GameTypes.FN.Enums;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Engine.Curves;
|
||||
using CUE4Parse.UE4.Objects.GameplayTags;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Extensions;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseIconStats : BaseIcon
|
||||
{
|
||||
private readonly IList<IconStat> _statistics;
|
||||
private const int _headerHeight = 128;
|
||||
private bool _screenLayer;
|
||||
|
||||
public BaseIconStats(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 1024;
|
||||
Height = _headerHeight;
|
||||
Margin = 0;
|
||||
_statistics = new List<IconStat>();
|
||||
_screenLayer = uObject.ExportType.Equals("FortAccoladeItemDefinition", StringComparison.OrdinalIgnoreCase);
|
||||
DefaultPreview = Utils.GetBitmap("FortniteGame/Content/Athena/HUD/Quests/Art/T_NPC_Default.T_NPC_Default");
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
base.ParseForInfo();
|
||||
DisplayName = DisplayName.ToUpperInvariant();
|
||||
|
||||
if (Object.TryGetValue(out FName accoladeType, "AccoladeType") &&
|
||||
accoladeType.Text.Equals("EFortAccoladeType::Medal", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_screenLayer = false;
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FGameplayTagContainer poiLocations, "POILocations") &&
|
||||
Utils.TryLoadObject("FortniteGame/Content/Quests/QuestIndicatorData.QuestIndicatorData", out UObject uObject) &&
|
||||
uObject.TryGetValue(out FStructFallback[] challengeMapPoiData, "ChallengeMapPoiData"))
|
||||
{
|
||||
foreach (var location in poiLocations)
|
||||
{
|
||||
var locationName = "Unknown";
|
||||
foreach (var poi in challengeMapPoiData)
|
||||
{
|
||||
if (!poi.TryGetValue(out FStructFallback locationTag, "LocationTag") || !locationTag.TryGetValue(out FName tagName, "TagName") ||
|
||||
tagName != location.TagName || !poi.TryGetValue(out FText text, "Text")) continue;
|
||||
|
||||
locationName = text.Text;
|
||||
break;
|
||||
}
|
||||
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "B0C091D7409B1657423C5F97E9CF4C77", "LOCATION NAME"), locationName.ToUpper()));
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback maxStackSize, "MaxStackSize"))
|
||||
{
|
||||
if (maxStackSize.TryGetValue(out float v, "Value") && v > 0)
|
||||
{
|
||||
_statistics.Add(new IconStat("Max Stack", v, 15));
|
||||
}
|
||||
else if (TryGetCurveTableStat(maxStackSize, out var s))
|
||||
{
|
||||
_statistics.Add(new IconStat("Max Stack", s, 15));
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback xpRewardAmount, "XpRewardAmount") && TryGetCurveTableStat(xpRewardAmount, out var x))
|
||||
{
|
||||
_statistics.Add(new IconStat("XP Amount", x));
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback weaponStatHandle, "WeaponStatHandle") &&
|
||||
weaponStatHandle.TryGetValue(out FName weaponRowName, "RowName") &&
|
||||
weaponStatHandle.TryGetValue(out UDataTable dataTable, "DataTable") &&
|
||||
dataTable.TryGetDataTableRow(weaponRowName.Text, StringComparison.OrdinalIgnoreCase, out var weaponRowValue))
|
||||
{
|
||||
if (weaponRowValue.TryGetValue(out int bpc, "BulletsPerCartridge"))
|
||||
{
|
||||
var multiplier = bpc != 0f ? bpc : 1;
|
||||
if (weaponRowValue.TryGetValue(out float dmgPb, "DmgPB") && dmgPb != 0f)
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "35D04D1B45737BEA25B69686D9E085B9", "Damage"), dmgPb * multiplier, 200));
|
||||
}
|
||||
|
||||
if (weaponRowValue.TryGetValue(out float mdpc, "MaxDamagePerCartridge") && mdpc >= 0f)
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "0DEF2455463B008C4499FEA03D149EDF", "Headshot Damage"), mdpc, 200));
|
||||
}
|
||||
else if (weaponRowValue.TryGetValue(out float dmgCritical, "DamageZone_Critical"))
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "0DEF2455463B008C4499FEA03D149EDF", "Headshot Damage"), dmgPb * dmgCritical * multiplier, 200));
|
||||
}
|
||||
}
|
||||
|
||||
if (weaponRowValue.TryGetValue(out int clipSize, "ClipSize") && clipSize != 0)
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "068239DD4327B36124498C9C5F61C038", "Magazine Size"), clipSize, 50));
|
||||
}
|
||||
|
||||
if (weaponRowValue.TryGetValue(out float firingRate, "FiringRate") && firingRate != 0f)
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "27B80BA44805ABD5A2D2BAB2902B250C", "Fire Rate"), firingRate, 15));
|
||||
}
|
||||
|
||||
if (weaponRowValue.TryGetValue(out float armTime, "ArmTime") && armTime != 0f)
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "3BFEB8BD41A677CC5F45B9A90D6EAD6F", "Arming Delay"), armTime, 125));
|
||||
}
|
||||
|
||||
if (weaponRowValue.TryGetValue(out float reloadTime, "ReloadTime") && reloadTime != 0f)
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "6EA26D1A4252034FBD869A90F9A6E49A", "Reload Time"), reloadTime, 15));
|
||||
}
|
||||
|
||||
if ((Object.ExportType.Equals("FortContextTrapItemDefinition", StringComparison.OrdinalIgnoreCase) ||
|
||||
Object.ExportType.Equals("FortTrapItemDefinition", StringComparison.OrdinalIgnoreCase)) &&
|
||||
weaponRowValue.TryGetValue(out UDataTable durabilityTable, "Durability") &&
|
||||
weaponRowValue.TryGetValue(out FName durabilityRowName, "DurabilityRowName") &&
|
||||
durabilityTable.TryGetDataTableRow(durabilityRowName.Text, StringComparison.OrdinalIgnoreCase, out var durability) &&
|
||||
durability.TryGetValue(out int duraByRarity, Object.GetOrDefault("Rarity", EFortRarity.Uncommon).GetDescription()))
|
||||
{
|
||||
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "6FA2882140CB69DE32FD73A392F0585B", "Durability"), duraByRarity, 20));
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
Height += 40 + (int) _informationPaint.TextSize * Utils.SplitLines(Description, _informationPaint, Width - 20).Count;
|
||||
Height += 50 * _statistics.Count;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Opaque);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawHeader(c);
|
||||
DrawDisplayName(c);
|
||||
DrawStatistics(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private bool TryGetCurveTableStat(FStructFallback property, out float statValue)
|
||||
{
|
||||
if (property.TryGetValue(out FStructFallback curve, "Curve") &&
|
||||
curve.TryGetValue(out FName rowName, "RowName") &&
|
||||
curve.TryGetValue(out UCurveTable curveTable, "CurveTable") &&
|
||||
curveTable.TryFindCurve(rowName, out var rowValue) &&
|
||||
rowValue is FSimpleCurve s && s.Keys.Length > 0)
|
||||
{
|
||||
statValue = s.Keys[0].Value;
|
||||
return true;
|
||||
}
|
||||
|
||||
statValue = 0F;
|
||||
return false;
|
||||
}
|
||||
|
||||
private readonly SKPaint _informationPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Color = SKColor.Parse("#262630"), TextSize = 16,
|
||||
Typeface = Utils.Typefaces.Description
|
||||
};
|
||||
|
||||
private void DrawHeader(SKCanvas c)
|
||||
{
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, _headerHeight / 2), Width / 5 * 4,
|
||||
new[] { Background[0].WithAlpha(180), Background[1].WithAlpha(220) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(_headerHeight, 0, Width, _headerHeight), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, _headerHeight / 2), Width / 5 * 4,
|
||||
new[] { SKColor.Parse("#262630"), SKColor.Parse("#1f1f26") }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, _headerHeight, Width, Height), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(Width / 2, _headerHeight), new SKPoint(Width / 2, 75),
|
||||
new[] { SKColors.Black.WithAlpha(25), Background[1].WithAlpha(0) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, 75, Width, _headerHeight), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, _headerHeight / 2), Width / 5 * 4, Background, SKShaderTileMode.Clamp);
|
||||
using var rect = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
rect.MoveTo(0, 0);
|
||||
rect.LineTo(_headerHeight + _headerHeight / 3, 0);
|
||||
rect.LineTo(_headerHeight, _headerHeight);
|
||||
rect.LineTo(0, _headerHeight);
|
||||
rect.Close();
|
||||
c.DrawPath(rect, _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(_headerHeight / 2, _headerHeight / 2), new SKPoint(_headerHeight / 2 + 100, _headerHeight / 2),
|
||||
new[] { SKColors.Black.WithAlpha(25), Background[1].WithAlpha(0) }, SKShaderTileMode.Clamp);
|
||||
c.DrawPath(rect, _informationPaint);
|
||||
|
||||
_informationPaint.Shader = null;
|
||||
|
||||
ImagePaint.BlendMode = _screenLayer ? SKBlendMode.Screen : Preview == null ? SKBlendMode.ColorBurn : SKBlendMode.SrcOver;
|
||||
c.DrawBitmap((Preview ?? DefaultPreview).Resize(_headerHeight), 0, 0, ImagePaint);
|
||||
}
|
||||
|
||||
private new void DrawDisplayName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrEmpty(DisplayName)) return;
|
||||
|
||||
_informationPaint.TextSize = 50;
|
||||
_informationPaint.Color = SKColors.White;
|
||||
_informationPaint.Typeface = Utils.Typefaces.Bundle;
|
||||
while (_informationPaint.MeasureText(DisplayName) > Width - _headerHeight * 2)
|
||||
{
|
||||
_informationPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_informationPaint.Typeface);
|
||||
c.DrawShapedText(shaper, DisplayName, _headerHeight + _headerHeight / 3 + 10, _headerHeight / 2f + _informationPaint.TextSize / 3, _informationPaint);
|
||||
}
|
||||
|
||||
private void DrawStatistics(SKCanvas c)
|
||||
{
|
||||
var outY = _headerHeight + 25f;
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
_informationPaint.TextSize = 16;
|
||||
_informationPaint.Color = SKColors.White.WithAlpha(175);
|
||||
_informationPaint.Typeface = Utils.Typefaces.Description;
|
||||
Utils.DrawMultilineText(c, Description, Width - 40, 0, SKTextAlign.Center,
|
||||
new SKRect(20, outY, Width - 20, Height), _informationPaint, out outY);
|
||||
outY += 25;
|
||||
}
|
||||
|
||||
foreach (var stat in _statistics)
|
||||
{
|
||||
stat.Draw(c, Border[0].WithAlpha(100), Width, _headerHeight, ref outY);
|
||||
outY += 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class IconStat
|
||||
{
|
||||
private readonly string _statName;
|
||||
private readonly object _value;
|
||||
private readonly float _maxValue;
|
||||
|
||||
public IconStat(string statName, object value, float maxValue = 0)
|
||||
{
|
||||
_statName = statName.ToUpperInvariant();
|
||||
_value = value;
|
||||
_maxValue = maxValue;
|
||||
}
|
||||
|
||||
private readonly SKPaint _statPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
TextSize = 25, Typeface = Utils.Typefaces.DisplayName,
|
||||
Color = SKColors.White
|
||||
};
|
||||
|
||||
public void Draw(SKCanvas c, SKColor sliderColor, int width, int height, ref float y)
|
||||
{
|
||||
while (_statPaint.MeasureText(_statName) > height * 2 - 40)
|
||||
{
|
||||
_statPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_statPaint.Typeface);
|
||||
c.DrawShapedText(shaper, _statName, 50, y + 10, _statPaint);
|
||||
|
||||
_statPaint.TextAlign = SKTextAlign.Right;
|
||||
_statPaint.Typeface = Utils.Typefaces.BundleNumber;
|
||||
_statPaint.Color = sliderColor;
|
||||
var sliderRight = width - 100 - _statPaint.MeasureText(_value.ToString());
|
||||
c.DrawRect(new SKRect(height * 2, y, Math.Min(width - height, sliderRight), y + 5), _statPaint);
|
||||
|
||||
_statPaint.Color = SKColors.White;
|
||||
c.DrawText(_value.ToString(), new SKPoint(width - 50, y + 10), _statPaint);
|
||||
|
||||
if (_maxValue < 1 || !float.TryParse(_value.ToString(), out var floatValue)) return;
|
||||
if (floatValue < 0)
|
||||
floatValue = 0;
|
||||
var sliderWidth = (sliderRight - height * 2) * (floatValue / _maxValue);
|
||||
c.DrawRect(new SKRect(height * 2, y, Math.Min(height * 2 + sliderWidth, sliderRight), y + 5), _statPaint);
|
||||
}
|
||||
}
|
||||
99
FModel/Creator/Bases/FN/BaseItemAccessToken.cs
Normal file
99
FModel/Creator/Bases/FN/BaseItemAccessToken.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseItemAccessToken : UCreator
|
||||
{
|
||||
private readonly SKBitmap _locked, _unlocked;
|
||||
private string _unlockedDescription, _exportName;
|
||||
private BaseIcon _icon;
|
||||
|
||||
public BaseItemAccessToken(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
_unlocked = Utils.GetBitmap("FortniteGame/Content/UI/Foundation/Textures/Icons/Locks/T-Icon-Unlocked-128.T-Icon-Unlocked-128").Resize(24);
|
||||
_locked = Utils.GetBitmap("FortniteGame/Content/UI/Foundation/Textures/Icons/Locks/T-Icon-Lock-128.T-Icon-Lock-128").Resize(24);
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FPackageIndex accessItem, "access_item") &&
|
||||
Utils.TryGetPackageIndexExport(accessItem, out UObject uObject))
|
||||
{
|
||||
_exportName = uObject.Name;
|
||||
_icon = new BaseIcon(uObject, EIconStyle.Default);
|
||||
_icon.ParseForReward(false);
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "ItemName") && displayName.Text != "TBD")
|
||||
DisplayName = displayName.Text;
|
||||
else
|
||||
DisplayName = _icon?.DisplayName;
|
||||
|
||||
Description = Object.TryGetValue(out FText description, "Description", "ItemDescription") ? description.Text : _icon?.Description;
|
||||
if (Object.TryGetValue(out FText unlockDescription, "UnlockDescription")) _unlockedDescription = unlockDescription.Text;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.NoBackground:
|
||||
Preview = _icon.Preview;
|
||||
DrawPreview(c);
|
||||
break;
|
||||
case EIconStyle.NoText:
|
||||
Preview = _icon.Preview;
|
||||
_icon.DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
break;
|
||||
default:
|
||||
_icon.DrawBackground(c);
|
||||
DrawInformation(c);
|
||||
DrawToBottom(c, SKTextAlign.Right, _exportName);
|
||||
break;
|
||||
}
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void DrawInformation(SKCanvas c)
|
||||
{
|
||||
var size = 45;
|
||||
var left = Width / 2;
|
||||
|
||||
while (DisplayNamePaint.MeasureText(DisplayName) > Width - _icon.Margin * 2)
|
||||
{
|
||||
DisplayNamePaint.TextSize = size -= 2;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(DisplayNamePaint.Typeface);
|
||||
var shapedText = shaper.Shape(DisplayName, DisplayNamePaint);
|
||||
c.DrawShapedText(shaper, DisplayName, left - shapedText.Width / 2, _icon.Margin * 8 + size, DisplayNamePaint);
|
||||
|
||||
float topBase = _icon.Margin + size * 2;
|
||||
if (!string.IsNullOrEmpty(_unlockedDescription))
|
||||
{
|
||||
c.DrawBitmap(_locked, new SKRect(50, topBase, 50 + _locked.Width, topBase + _locked.Height), ImagePaint);
|
||||
Utils.DrawMultilineText(c, _unlockedDescription, Width, _icon.Margin, SKTextAlign.Left,
|
||||
new SKRect(70 + _locked.Width, topBase + 10, Width - 50, 256), DescriptionPaint, out topBase);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
c.DrawBitmap(_unlocked, new SKRect(50, topBase, 50 + _unlocked.Width, topBase + _unlocked.Height), ImagePaint);
|
||||
Utils.DrawMultilineText(c, Description, Width, _icon.Margin, SKTextAlign.Left,
|
||||
new SKRect(70 + _unlocked.Width, topBase + 10, Width - 50, 256), DescriptionPaint, out topBase);
|
||||
}
|
||||
|
||||
var h = Width - _icon.Margin - topBase;
|
||||
c.DrawBitmap(_icon.Preview ?? _icon.DefaultPreview, new SKRect(left - h / 2, topBase, left + h / 2, Width - _icon.Margin), ImagePaint);
|
||||
}
|
||||
}
|
||||
49
FModel/Creator/Bases/FN/BaseJuno.cs
Normal file
49
FModel/Creator/Bases/FN/BaseJuno.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseJuno : BaseIcon
|
||||
{
|
||||
private BaseIcon _character;
|
||||
|
||||
public BaseJuno(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FSoftObjectPath baseCid, "BaseAthenaCharacterItemDefinition") &&
|
||||
Utils.TryLoadObject(baseCid.AssetPathName.Text, out UObject cid))
|
||||
{
|
||||
_character = new BaseIcon(cid, Style);
|
||||
_character.ParseForInfo();
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath assembledMeshSchema, "AssembledMeshSchema", "LowDetailsAssembledMeshSchema") &&
|
||||
Utils.TryLoadObject(assembledMeshSchema.AssetPathName.Text, out UObject meshSchema) &&
|
||||
meshSchema.TryGetValue(out FInstancedStruct[] additionalData, "AdditionalData"))
|
||||
{
|
||||
foreach (var data in additionalData)
|
||||
{
|
||||
if (data.NonConstStruct?.TryGetValue(out FSoftObjectPath largePreview, "LargePreviewImage", "SmallPreviewImage") ?? false)
|
||||
{
|
||||
_character.Preview = Utils.GetBitmap(largePreview);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath baseEid, "BaseAthenaDanceItemDefinition") &&
|
||||
Utils.TryLoadObject(baseEid.AssetPathName.Text, out UObject eid))
|
||||
{
|
||||
_character = new BaseIcon(eid, Style);
|
||||
_character.ParseForInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw() => _character.Draw();
|
||||
}
|
||||
92
FModel/Creator/Bases/FN/BaseMaterialInstance.cs
Normal file
92
FModel/Creator/Bases/FN/BaseMaterialInstance.cs
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
using System.Linq;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseMaterialInstance : BaseIcon
|
||||
{
|
||||
public BaseMaterialInstance(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Background = new[] { SKColor.Parse("4F4F69"), SKColor.Parse("4F4F69") };
|
||||
Border = new[] { SKColor.Parse("9092AB") };
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object is not UMaterialInstanceConstant material) return;
|
||||
|
||||
texture_finding:
|
||||
foreach (var textureParameter in material.TextureParameterValues) // get texture from base material
|
||||
{
|
||||
if (!textureParameter.ParameterValue.TryLoad<UTexture2D>(out var texture) || Preview != null) continue;
|
||||
switch (textureParameter.ParameterInfo.Name.Text)
|
||||
{
|
||||
case "SeriesTexture":
|
||||
GetSeries(texture);
|
||||
break;
|
||||
case "TextureA":
|
||||
case "TextureB":
|
||||
case "OfferImage":
|
||||
case "CarTexture":
|
||||
Preview = Utils.GetBitmap(texture);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (material.VectorParameterValues.Length == 0 || // try to get color from parent if not found here
|
||||
material.VectorParameterValues.All(x => x.ParameterInfo.Name.Text.Equals("FallOff_Color"))) // use parent if it only contains FallOff_Color
|
||||
{
|
||||
if (material.TryGetValue(out FPackageIndex parent, "Parent"))
|
||||
Utils.TryGetPackageIndexExport(parent, out material);
|
||||
else return;
|
||||
|
||||
if (material == null) return;
|
||||
}
|
||||
|
||||
if (Preview == null)
|
||||
{
|
||||
if (material.TryGetValue(out FPackageIndex parent, "Parent"))
|
||||
Utils.TryGetPackageIndexExport(parent, out material);
|
||||
|
||||
goto texture_finding;
|
||||
}
|
||||
|
||||
foreach (var vectorParameter in material.VectorParameterValues)
|
||||
{
|
||||
if (vectorParameter.ParameterValue == null) continue;
|
||||
switch (vectorParameter.ParameterInfo.Name.Text)
|
||||
{
|
||||
case "Background_Color_A":
|
||||
Background[0] = SKColor.Parse(vectorParameter.ParameterValue.Value.Hex);
|
||||
Border[0] = Background[0];
|
||||
break;
|
||||
case "Background_Color_B": // Border color can be defaulted here in some case where Background_Color_A should be taken from parent but Background_Color_B from base
|
||||
Background[1] = SKColor.Parse(vectorParameter.ParameterValue.Value.Hex);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.NoBackground:
|
||||
DrawPreview(c);
|
||||
break;
|
||||
default:
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
break;
|
||||
}
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
}
|
||||
83
FModel/Creator/Bases/FN/BaseMtxOffer.cs
Normal file
83
FModel/Creator/Bases/FN/BaseMtxOffer.cs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseMtxOffer : UCreator
|
||||
{
|
||||
public BaseMtxOffer(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Background = new[] { SKColor.Parse("4F4F69"), SKColor.Parse("4F4F69") };
|
||||
Border = new[] { SKColor.Parse("9092AB") };
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FSoftObjectPath image, "SoftDetailsImage", "SoftTileImage"))
|
||||
{
|
||||
Preview = Utils.GetBitmap(image);
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback gradient, "Gradient") &&
|
||||
gradient.TryGetValue(out FLinearColor start, "Start") &&
|
||||
gradient.TryGetValue(out FLinearColor stop, "Stop"))
|
||||
{
|
||||
Background = new[] { SKColor.Parse(start.Hex), SKColor.Parse(stop.Hex) };
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FLinearColor background, "Background"))
|
||||
Border = new[] { SKColor.Parse(background.Hex) };
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText shortDescription, "ShortDescription"))
|
||||
Description = shortDescription.Text;
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] details, "DetailsAttributes"))
|
||||
{
|
||||
foreach (var detail in details)
|
||||
{
|
||||
if (detail.TryGetValue(out FText detailName, "Name"))
|
||||
{
|
||||
Description += $"\n- {detailName.Text.TrimEnd()}";
|
||||
}
|
||||
|
||||
if (detail.TryGetValue(out FText detailValue, "Value") && !string.IsNullOrEmpty(detailValue.Text))
|
||||
{
|
||||
Description += $" ({detailValue.Text})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Description = Utils.RemoveHtmlTags(Description);
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.NoBackground:
|
||||
DrawPreview(c);
|
||||
break;
|
||||
case EIconStyle.NoText:
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
break;
|
||||
default:
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
break;
|
||||
}
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
}
|
||||
45
FModel/Creator/Bases/FN/BaseOfferDisplayData.cs
Normal file
45
FModel/Creator/Bases/FN/BaseOfferDisplayData.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System.Collections.Generic;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseOfferDisplayData : UCreator
|
||||
{
|
||||
private readonly List<BaseMaterialInstance> _offerImages;
|
||||
|
||||
public BaseOfferDisplayData(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
_offerImages = new List<BaseMaterialInstance>();
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (!Object.TryGetValue(out FStructFallback[] contextualPresentations, "ContextualPresentations"))
|
||||
return;
|
||||
|
||||
for (var i = 0; i < contextualPresentations.Length; i++)
|
||||
{
|
||||
if (!contextualPresentations[i].TryGetValue(out FSoftObjectPath material, "Material") ||
|
||||
!material.TryLoad(out UMaterialInterface presentation)) continue;
|
||||
|
||||
var offerImage = new BaseMaterialInstance(presentation, Style);
|
||||
offerImage.ParseForInfo();
|
||||
_offerImages.Add(offerImage);
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap[_offerImages.Count];
|
||||
for (var i = 0; i < ret.Length; i++)
|
||||
{
|
||||
ret[i] = _offerImages[i]?.Draw()[0];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
77
FModel/Creator/Bases/FN/BasePlaylist.cs
Normal file
77
FModel/Creator/Bases/FN/BasePlaylist.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Services;
|
||||
using FModel.ViewModels;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BasePlaylist : UCreator
|
||||
{
|
||||
private ApiEndpointViewModel _apiEndpointView => ApplicationService.ApiEndpointView;
|
||||
private SKBitmap _missionIcon;
|
||||
|
||||
public BasePlaylist(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Margin = 0;
|
||||
Width = 1024;
|
||||
Height = 512;
|
||||
Preview = Utils.GetBitmap("FortniteGame/Content/UI/Foundation/Textures/Tiles/T_Athena_Tile_Matchmaking_Default.T_Athena_Tile_Matchmaking_Default");
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FText displayName, "UIDisplayName", "DisplayName"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "UIDescription", "Description"))
|
||||
Description = description.Text;
|
||||
if (Object.TryGetValue(out UTexture2D missionIcon, "MissionIcon"))
|
||||
_missionIcon = Utils.GetBitmap(missionIcon).Resize(25);
|
||||
|
||||
if (!Object.TryGetValue(out FName playlistName, "PlaylistName") || string.IsNullOrWhiteSpace(playlistName.Text))
|
||||
return;
|
||||
|
||||
var playlist = _apiEndpointView.FortniteApi.GetPlaylist(playlistName.Text);
|
||||
if (!playlist.IsSuccess || playlist.Data.Images is not { HasShowcase: true } ||
|
||||
!_apiEndpointView.FortniteApi.TryGetBytes(playlist.Data.Images.Showcase, out var image))
|
||||
return;
|
||||
|
||||
Preview = Utils.GetBitmap(image).ResizeWithRatio(1024, 512);
|
||||
Width = Preview.Width;
|
||||
Height = Preview.Height;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.NoBackground:
|
||||
DrawPreview(c);
|
||||
break;
|
||||
case EIconStyle.NoText:
|
||||
DrawPreview(c);
|
||||
DrawMissionIcon(c);
|
||||
break;
|
||||
default:
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
DrawMissionIcon(c);
|
||||
break;
|
||||
}
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void DrawMissionIcon(SKCanvas c)
|
||||
{
|
||||
if (_missionIcon == null) return;
|
||||
c.DrawBitmap(_missionIcon, new SKPoint(5, 5), ImagePaint);
|
||||
}
|
||||
}
|
||||
278
FModel/Creator/Bases/FN/BaseQuest.cs
Normal file
278
FModel/Creator/Bases/FN/BaseQuest.cs
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Extensions;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseQuest : BaseIcon
|
||||
{
|
||||
private int _count;
|
||||
private Reward _reward;
|
||||
private readonly bool _screenLayer;
|
||||
private readonly string[] _unauthorizedReward = { "Token", "ChallengeBundle", "GiftBox" };
|
||||
|
||||
public string NextQuestName { get; private set; }
|
||||
|
||||
public BaseQuest(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Margin = 0;
|
||||
Width = 1024;
|
||||
Height = 256;
|
||||
DefaultPreview = Utils.GetBitmap("FortniteGame/Content/Athena/HUD/Quests/Art/T_NPC_Default.T_NPC_Default");
|
||||
if (uObject != null)
|
||||
{
|
||||
_screenLayer = uObject.ExportType.Equals("FortFeatItemDefinition", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
private BaseQuest(int completionCount, EIconStyle style) : this(null, style) // completion
|
||||
{
|
||||
var description = completionCount < 0 ?
|
||||
Utils.GetLocalizedResource("AthenaChallengeDetailsEntry", "CompletionRewardFormat_All", "Complete <text color=\"FFF\" case=\"upper\" fontface=\"black\">all {0} challenges</> to earn the reward item") :
|
||||
Utils.GetLocalizedResource("AthenaChallengeDetailsEntry", "CompletionRewardFormat", "Complete <text color=\"FFF\" case=\"upper\" fontface=\"black\">any {0} challenges</> to earn the reward item");
|
||||
|
||||
DisplayName = ReformatString(description, completionCount.ToString(), completionCount < 0);
|
||||
}
|
||||
|
||||
public BaseQuest(int completionCount, FSoftObjectPath itemDefinition, EIconStyle style) : this(completionCount, style) // completion
|
||||
{
|
||||
_reward = Utils.TryLoadObject(itemDefinition.AssetPathName.Text, out UObject uObject) ? new Reward(uObject) : new Reward();
|
||||
}
|
||||
|
||||
public BaseQuest(int completionCount, int quantity, string reward, EIconStyle style) : this(completionCount, style) // completion
|
||||
{
|
||||
_reward = new Reward(quantity, reward);
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
ParseForReward(false);
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback urgentQuestData, "UrgentQuestData"))
|
||||
{
|
||||
if (urgentQuestData.TryGetValue(out FText eventTitle, "EventTitle"))
|
||||
DisplayName = eventTitle.Text;
|
||||
if (urgentQuestData.TryGetValue(out FText eventDescription, "EventDescription"))
|
||||
Description = eventDescription.Text;
|
||||
if (urgentQuestData.TryGetValue(out FPackageIndex alertIcon, "AlertIcon", "BountyPriceImage"))
|
||||
Preview = Utils.GetBitmap(alertIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ShortDescription))
|
||||
Description = ShortDescription;
|
||||
if (string.IsNullOrEmpty(DisplayName) && !string.IsNullOrEmpty(Description))
|
||||
DisplayName = Description;
|
||||
if (DisplayName == Description)
|
||||
Description = string.Empty;
|
||||
|
||||
if ((Object.TryGetValue(out FSoftObjectPath icon, "QuestGiverWidgetIcon", "NotificationIconOverride") &&
|
||||
Utils.TryLoadObject(icon.AssetPathName.Text, out UObject iconObject)) ||
|
||||
(Object.TryGetValue(out FSoftObjectPath tandemCharacterData, "TandemCharacterData") &&
|
||||
Utils.TryLoadObject(tandemCharacterData.AssetPathName.Text, out UObject uObject) &&
|
||||
uObject.TryGetValue(out FSoftObjectPath tandemIcon, "EntryListIcon", "ToastIcon") &&
|
||||
Utils.TryLoadObject(tandemIcon.AssetPathName.Text, out iconObject)))
|
||||
{
|
||||
Preview = iconObject switch
|
||||
{
|
||||
UTexture2D text => Utils.GetBitmap(text),
|
||||
UMaterialInstanceConstant mat => Utils.GetBitmap(mat),
|
||||
_ => Preview
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out int objectiveCompletionCount, "ObjectiveCompletionCount"))
|
||||
_count = objectiveCompletionCount;
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] objectives, "Objectives") && objectives.Length > 0)
|
||||
{
|
||||
// actual description doesn't exist
|
||||
if (string.IsNullOrEmpty(Description) && objectives[0].TryGetValue(out FText description, "Description"))
|
||||
Description = description.Text;
|
||||
|
||||
// ObjectiveCompletionCount doesn't exist
|
||||
if (_count == 0)
|
||||
{
|
||||
if (objectives[0].TryGetValue(out int count, "Count") && count > 1)
|
||||
_count = count;
|
||||
else
|
||||
_count = objectives.Length;
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] rewards, "Rewards"))
|
||||
{
|
||||
foreach (var reward in rewards)
|
||||
{
|
||||
if (!reward.TryGetValue(out FStructFallback itemPrimaryAssetId, "ItemPrimaryAssetId") ||
|
||||
!reward.TryGetValue(out int quantity, "Quantity")) continue;
|
||||
|
||||
if (!itemPrimaryAssetId.TryGetValue(out FStructFallback primaryAssetType, "PrimaryAssetType") ||
|
||||
!itemPrimaryAssetId.TryGetValue(out FName primaryAssetName, "PrimaryAssetName") ||
|
||||
!primaryAssetType.TryGetValue(out FName name, "Name")) continue;
|
||||
|
||||
if (name.Text.Equals("Quest", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
NextQuestName = primaryAssetName.Text;
|
||||
}
|
||||
else if (!_unauthorizedReward.Contains(name.Text))
|
||||
{
|
||||
_reward = new Reward(quantity, $"{name}:{primaryAssetName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_reward == null)
|
||||
{
|
||||
FName rowName = null;
|
||||
if (Object.TryGetValue(out UDataTable rewardsTable, "RewardsTable"))
|
||||
rowName = new FName("Default");
|
||||
else if (Object.TryGetValue(out FStructFallback[] rewardTableRows, "IndividualRewardTableRows") &&
|
||||
rewardTableRows.Length > 0 && rewardTableRows[0].TryGetValue(out rowName, "RowName") &&
|
||||
rewardTableRows[0].TryGetValue(out rewardsTable, "DataTable")) {}
|
||||
|
||||
if (rewardsTable != null && rowName != null && rewardsTable.TryGetDataTableRow(rowName.Text, StringComparison.InvariantCulture, out var row))
|
||||
{
|
||||
if (row.TryGetValue(out FName templateId, "TemplateId") &&
|
||||
row.TryGetValue(out int quantity, "Quantity"))
|
||||
{
|
||||
_reward = new Reward(quantity, templateId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_reward == null && Object.TryGetValue(out FStructFallback[] hiddenRewards, "HiddenRewards"))
|
||||
{
|
||||
foreach (var hiddenReward in hiddenRewards)
|
||||
{
|
||||
if (!hiddenReward.TryGetValue(out FName templateId, "TemplateId") ||
|
||||
!hiddenReward.TryGetValue(out int quantity, "Quantity")) continue;
|
||||
|
||||
_reward = new Reward(quantity, templateId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_reward ??= new Reward();
|
||||
}
|
||||
|
||||
public void DrawQuest(SKCanvas c, int y)
|
||||
{
|
||||
DrawBackground(c, y);
|
||||
DrawPreview(c, y);
|
||||
DrawTexts(c, y);
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Opaque);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawQuest(c, 0);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private string ReformatString(string s, string completionCount, bool isAll)
|
||||
{
|
||||
s = s.Replace("({0})", "{0}").Replace("{QuestNumber}", "<text color=\"FFF\" case=\"upper\" fontface=\"black\">{0}</>");
|
||||
var index = s.IndexOf("{0}|plural(", StringComparison.OrdinalIgnoreCase);
|
||||
if (index > -1)
|
||||
{
|
||||
var p = s.Substring(index, s[index..].IndexOf(')') + 1);
|
||||
s = s.Replace(p, string.Empty);
|
||||
s = s.Insert(s.IndexOf("</>", StringComparison.OrdinalIgnoreCase), p.SubstringAfter("(").SubstringAfter("=").SubstringBefore(","));
|
||||
}
|
||||
|
||||
var upper = s.SubstringAfter(">").SubstringBefore("</>");
|
||||
return string.Format(Utils.RemoveHtmlTags(s.Replace(upper, upper.ToUpper())), isAll ? string.Empty : completionCount).Replace(" ", " ");
|
||||
}
|
||||
|
||||
private readonly SKPaint _informationPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Color = SKColor.Parse("#262630")
|
||||
};
|
||||
|
||||
private void DrawBackground(SKCanvas c, int y)
|
||||
{
|
||||
c.DrawRect(new SKRect(Margin, y, Width, y + Height), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, y + Height / 2), Width / 5 * 4,
|
||||
new[] { Background[0].WithAlpha(50), Background[1].WithAlpha(50) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(Height / 2, y, Width, y + Height), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(Width / 2, y + Height), new SKPoint(Width / 2, 75),
|
||||
new[] { SKColors.Black.WithAlpha(25), Background[1].WithAlpha(0) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, y + 75, Width, y + Height), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, y + Height / 2), Width / 5 * 4, Background, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(Margin, y, Height / 2, y + Height), _informationPaint);
|
||||
|
||||
_informationPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(Height / 2, y + Height / 2), new SKPoint(Height / 2 + 100, y + Height / 2),
|
||||
new[] { SKColors.Black.WithAlpha(25), Background[1].WithAlpha(0) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(Height / 2, y, Height / 2 + 100, y + Height), _informationPaint);
|
||||
}
|
||||
|
||||
private void DrawPreview(SKCanvas c, int y)
|
||||
{
|
||||
ImagePaint.BlendMode = _screenLayer ? SKBlendMode.Screen : Preview == null ? SKBlendMode.ColorBurn : SKBlendMode.SrcOver;
|
||||
c.DrawBitmap(Preview ?? DefaultPreview, new SKRect(Margin, y, Height - Margin, y + Height), ImagePaint);
|
||||
}
|
||||
|
||||
private void DrawTexts(SKCanvas c, int y)
|
||||
{
|
||||
_informationPaint.Shader = null;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(DisplayName))
|
||||
{
|
||||
_informationPaint.TextSize = 40;
|
||||
_informationPaint.Color = SKColors.White;
|
||||
_informationPaint.Typeface = Utils.Typefaces.Bundle;
|
||||
while (_informationPaint.MeasureText(DisplayName) > Width - Height - 10)
|
||||
{
|
||||
_informationPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_informationPaint.Typeface);
|
||||
c.DrawShapedText(shaper, DisplayName, Height, y + 50, _informationPaint);
|
||||
}
|
||||
|
||||
var outY = y + 75f;
|
||||
if (!string.IsNullOrWhiteSpace(Description))
|
||||
{
|
||||
_informationPaint.TextSize = 16;
|
||||
_informationPaint.Color = SKColors.White.WithAlpha(175);
|
||||
_informationPaint.Typeface = Utils.Typefaces.Description;
|
||||
Utils.DrawMultilineText(c, Description, Width - Height, y, SKTextAlign.Left,
|
||||
new SKRect(Height, outY, Width - 10, y + Height), _informationPaint, out outY);
|
||||
}
|
||||
|
||||
_informationPaint.Color = Border[0].WithAlpha(100);
|
||||
c.DrawRect(new SKRect(Height, outY, Width - 150, outY + 5), _informationPaint);
|
||||
|
||||
if (_count > 0)
|
||||
{
|
||||
_informationPaint.TextSize = 25;
|
||||
_informationPaint.Color = SKColors.White;
|
||||
_informationPaint.Typeface = Utils.Typefaces.BundleNumber;
|
||||
c.DrawText("0 / ", new SKPoint(Width - 130, outY + 10), _informationPaint);
|
||||
|
||||
_informationPaint.Color = Border[0];
|
||||
c.DrawText(_count.ToString(), new SKPoint(Width - 95, outY + 10), _informationPaint);
|
||||
}
|
||||
|
||||
_reward.DrawQuest(c, new SKRect(Height, outY + 25, Width - 20, y + Height - 25));
|
||||
}
|
||||
}
|
||||
158
FModel/Creator/Bases/FN/BaseSeason.cs
Normal file
158
FModel/Creator/Bases/FN/BaseSeason.cs
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class Page
|
||||
{
|
||||
public int LevelsNeededForUnlock;
|
||||
public int RewardsNeededForUnlock;
|
||||
public Reward[] RewardEntryList;
|
||||
}
|
||||
|
||||
public class BaseSeason : UCreator
|
||||
{
|
||||
private Reward _firstWinReward;
|
||||
private Page[] _bookXpSchedule;
|
||||
private const int _headerHeight = 150;
|
||||
// keep the list because rewards are ordered by least to most important
|
||||
// we only care about the most but we also have filters so we can't just take the last reward
|
||||
|
||||
public BaseSeason(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 1024;
|
||||
Height = _headerHeight + 50;
|
||||
Margin = 0;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
_bookXpSchedule = Array.Empty<Page>();
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "ItemName"))
|
||||
DisplayName = displayName.Text.ToUpperInvariant();
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback seasonFirstWinRewards, "SeasonFirstWinRewards") &&
|
||||
seasonFirstWinRewards.TryGetValue(out FStructFallback[] rewards, "Rewards"))
|
||||
{
|
||||
foreach (var reward in rewards)
|
||||
{
|
||||
if (!reward.TryGetValue(out FSoftObjectPath itemDefinition, "ItemDefinition") ||
|
||||
!Utils.TryLoadObject(itemDefinition.AssetPathName.Text, out UObject uObject)) continue;
|
||||
|
||||
_firstWinReward = new Reward(uObject);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FPackageIndex[] additionalSeasonData, "AdditionalSeasonData"))
|
||||
{
|
||||
foreach (var data in additionalSeasonData)
|
||||
{
|
||||
if (!Utils.TryGetPackageIndexExport(data, out UObject packageIndex) ||
|
||||
!packageIndex.TryGetValue(out FStructFallback[] pageList, "PageList")) continue;
|
||||
|
||||
var i = 0;
|
||||
_bookXpSchedule = new Page[pageList.Length];
|
||||
foreach (var page in pageList)
|
||||
{
|
||||
if (!page.TryGetValue(out int levelsNeededForUnlock, "LevelsNeededForUnlock") ||
|
||||
!page.TryGetValue(out int rewardsNeededForUnlock, "RewardsNeededForUnlock") ||
|
||||
!page.TryGetValue(out FPackageIndex[] rewardEntryList, "RewardEntryList"))
|
||||
continue;
|
||||
|
||||
var p = new Page
|
||||
{
|
||||
LevelsNeededForUnlock = levelsNeededForUnlock,
|
||||
RewardsNeededForUnlock = rewardsNeededForUnlock,
|
||||
RewardEntryList = new Reward[rewardEntryList.Length]
|
||||
};
|
||||
|
||||
for (var j = 0; j < p.RewardEntryList.Length; j++)
|
||||
{
|
||||
if (!Utils.TryGetPackageIndexExport(rewardEntryList[j], out packageIndex) ||
|
||||
!packageIndex.TryGetValue(out FStructFallback battlePassOffer, "BattlePassOffer") ||
|
||||
!battlePassOffer.TryGetValue(out FStructFallback rewardItem, "RewardItem") ||
|
||||
!rewardItem.TryGetValue(out FSoftObjectPath itemDefinition, "ItemDefinition") ||
|
||||
!Utils.TryLoadObject(itemDefinition.AssetPathName.Text, out UObject uObject)) continue;
|
||||
|
||||
p.RewardEntryList[j] = new Reward(uObject);
|
||||
}
|
||||
|
||||
_bookXpSchedule[i++] = p;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Height += 100 * _bookXpSchedule.Sum(x => x.RewardEntryList.Length) / _bookXpSchedule.Length;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Opaque);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawHeader(c);
|
||||
_firstWinReward?.DrawSeasonWin(c, _headerHeight);
|
||||
DrawBookSchedule(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private const int _DEFAULT_AREA_SIZE = 80;
|
||||
private readonly SKPaint _headerPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.Bundle, TextSize = 50,
|
||||
TextAlign = SKTextAlign.Center, Color = SKColor.Parse("#262630")
|
||||
};
|
||||
|
||||
public void DrawHeader(SKCanvas c)
|
||||
{
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height), _headerPaint);
|
||||
|
||||
_headerPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, _headerHeight / 2), Width / 5 * 4,
|
||||
new[] { SKColors.SkyBlue.WithAlpha(50), SKColors.Blue.WithAlpha(50) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height), _headerPaint);
|
||||
|
||||
_headerPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(Width / 2, _headerHeight), new SKPoint(Width / 2, 75),
|
||||
new[] { SKColors.Black.WithAlpha(25), SKColors.Blue.WithAlpha(0) }, SKShaderTileMode.Clamp);
|
||||
c.DrawRect(new SKRect(0, 75, Width, _headerHeight), _headerPaint);
|
||||
|
||||
_headerPaint.Shader = null;
|
||||
_headerPaint.Color = SKColors.White;
|
||||
while (_headerPaint.MeasureText(DisplayName) > Width)
|
||||
{
|
||||
_headerPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_headerPaint.Typeface);
|
||||
c.DrawShapedText(shaper, DisplayName, Width / 2f, _headerHeight / 2f + _headerPaint.TextSize / 2 - 10, _headerPaint);
|
||||
}
|
||||
|
||||
private void DrawBookSchedule(SKCanvas c)
|
||||
{
|
||||
var x = 20;
|
||||
var y = _headerHeight + 50;
|
||||
foreach (var page in _bookXpSchedule)
|
||||
{
|
||||
foreach (var reward in page.RewardEntryList)
|
||||
{
|
||||
reward.DrawSeason(c, x, y, _DEFAULT_AREA_SIZE);
|
||||
x += _DEFAULT_AREA_SIZE + 20;
|
||||
}
|
||||
|
||||
y += _DEFAULT_AREA_SIZE + 20;
|
||||
x = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
26
FModel/Creator/Bases/FN/BaseSeries.cs
Normal file
26
FModel/Creator/Bases/FN/BaseSeries.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseSeries : BaseIcon
|
||||
{
|
||||
public BaseSeries(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
GetSeries(Object);
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
|
||||
return new []{ret};
|
||||
}
|
||||
}
|
||||
228
FModel/Creator/Bases/FN/BaseTandem.cs
Normal file
228
FModel/Creator/Bases/FN/BaseTandem.cs
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using FModel.Framework;
|
||||
using FModel.Settings;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseTandem : BaseIcon
|
||||
{
|
||||
private string _generalDescription, _additionalDescription;
|
||||
|
||||
public BaseTandem(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
DefaultPreview = Utils.GetBitmap("FortniteGame/Content/UI/Foundation/Textures/BattleRoyale/FeaturedItems/Outfit/T-AthenaSoldiers-CID-883-Athena-Commando-M-ChOneJonesy.T-AthenaSoldiers-CID-883-Athena-Commando-M-ChOneJonesy");
|
||||
Margin = 0;
|
||||
Width = 690;
|
||||
Height = 1080;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
base.ParseForInfo();
|
||||
|
||||
string sidePanel = string.Empty, entryList = string.Empty;
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath sidePanelIcon, "SidePanelIcon"))
|
||||
sidePanel = sidePanelIcon.AssetPathName.Text;
|
||||
if (Object.TryGetValue(out FSoftObjectPath entryListIcon, "EntryListIcon"))
|
||||
entryList = entryListIcon.AssetPathName.Text;
|
||||
|
||||
// Overrides for generic "default" images Epic uses for Quest-only or unfinished NPCs
|
||||
if (sidePanel.Contains("Clown") && entryList.Contains("Clown"))
|
||||
Preview = null;
|
||||
else if (sidePanel.Contains("Bane") && !Object.Name.Contains("Sorana"))
|
||||
Preview = Utils.GetBitmap(entryList);
|
||||
else if (!string.IsNullOrWhiteSpace(sidePanel) && !sidePanel.Contains("Clown"))
|
||||
Preview = Utils.GetBitmap(sidePanel);
|
||||
else if ((string.IsNullOrWhiteSpace(sidePanel) || sidePanel.Contains("Clown")) && !string.IsNullOrWhiteSpace(entryList))
|
||||
Preview = Utils.GetBitmap(entryList);
|
||||
|
||||
if (Object.TryGetValue(out FText genDesc, "GeneralDescription"))
|
||||
_generalDescription = genDesc.Text;
|
||||
if (Object.TryGetValue(out FText addDesc, "AdditionalDescription"))
|
||||
_additionalDescription = addDesc.Text;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Opaque);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawHaze(c);
|
||||
|
||||
// Korean is slightly smaller than other languages, so the font size is increased slightly
|
||||
DrawName(c);
|
||||
DrawGeneralDescription(c);
|
||||
DrawAdditionalDescription(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private readonly SKPaint _panelPaint = new() { IsAntialias = true, FilterQuality = SKFilterQuality.High, Color = SKColor.Parse("#0045C7") };
|
||||
|
||||
private new void DrawBackground(SKCanvas c)
|
||||
{
|
||||
c.DrawBitmap(SKBitmap.Decode(Application.GetResourceStream(new Uri("pack://application:,,,/Resources/npcleftside.png"))?.Stream).Resize(Width, Height), 0, 0, new SKPaint { IsAntialias = false, FilterQuality = SKFilterQuality.None, ImageFilter = SKImageFilter.CreateBlur(0, 25) });
|
||||
|
||||
using var rect1 = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
_panelPaint.Color = SKColor.Parse("#002A8C");
|
||||
rect1.MoveTo(29, 0);
|
||||
rect1.LineTo(62, Height);
|
||||
rect1.LineTo(Width, Height);
|
||||
rect1.LineTo(Width, 0);
|
||||
rect1.LineTo(29, 0);
|
||||
rect1.Close();
|
||||
c.DrawPath(rect1, _panelPaint);
|
||||
|
||||
_panelPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(29, 0), new SKPoint(Width, Height),
|
||||
new[] { SKColor.Parse("#002A8C") }, SKShaderTileMode.Clamp);
|
||||
c.DrawPath(rect1, _panelPaint);
|
||||
|
||||
_panelPaint.Shader = SKShader.CreateRadialGradient(new SKPoint(348, 196), 300, new[] { SKColor.Parse("#0049CE"), SKColor.Parse("#002A8C") }, SKShaderTileMode.Clamp);
|
||||
c.DrawPath(rect1, _panelPaint);
|
||||
|
||||
using var rect2 = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
|
||||
rect2.MoveTo(10, 0);
|
||||
rect2.LineTo(30, 0);
|
||||
rect2.LineTo(63, Height);
|
||||
rect2.LineTo(56, Height);
|
||||
rect2.LineTo(10, 0);
|
||||
rect2.Close();
|
||||
c.DrawPath(rect2, _panelPaint);
|
||||
|
||||
_panelPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(10, 0), new SKPoint(62, Height),
|
||||
new[] { SKColor.Parse("#0045C7") }, SKShaderTileMode.Clamp);
|
||||
c.DrawPath(rect2, _panelPaint);
|
||||
}
|
||||
|
||||
private new void DrawPreview(SKCanvas c)
|
||||
{
|
||||
var previewToUse = Preview ?? DefaultPreview;
|
||||
|
||||
if (Preview == null)
|
||||
{
|
||||
previewToUse = DefaultPreview;
|
||||
ImagePaint.BlendMode = SKBlendMode.DstOut;
|
||||
ImagePaint.Color = SKColor.Parse("#00175F");
|
||||
}
|
||||
|
||||
var x = -125;
|
||||
|
||||
switch (previewToUse.Width)
|
||||
{
|
||||
case 512 when previewToUse.Height == 1024:
|
||||
previewToUse = previewToUse.ResizeWithRatio(500, 1000);
|
||||
x = 100;
|
||||
break;
|
||||
case 512 when previewToUse.Height == 512:
|
||||
case 128 when previewToUse.Height == 128:
|
||||
previewToUse = previewToUse.Resize(512);
|
||||
x = 125;
|
||||
break;
|
||||
default:
|
||||
previewToUse = previewToUse.Resize(1000, 1000);
|
||||
break;
|
||||
}
|
||||
|
||||
c.DrawBitmap(previewToUse, x, 30, ImagePaint);
|
||||
}
|
||||
|
||||
private void DrawHaze(SKCanvas c)
|
||||
{
|
||||
using var rect1 = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
rect1.MoveTo(29, 0);
|
||||
rect1.LineTo(62, Height);
|
||||
rect1.LineTo(Width, Height);
|
||||
rect1.LineTo(Width, 0);
|
||||
rect1.LineTo(29, 0);
|
||||
rect1.Close();
|
||||
|
||||
_panelPaint.Shader = SKShader.CreateLinearGradient(new SKPoint(343, 0), new SKPoint(343, Height),
|
||||
new[] { SKColors.Transparent, SKColor.Parse("#001E70FF"), SKColor.Parse("#001E70").WithAlpha(200), SKColor.Parse("#001E70").WithAlpha(245), SKColor.Parse("#001E70") }, new[] { 0, (float) .1, (float) .65, (float) .85, 1 }, SKShaderTileMode.Clamp);
|
||||
c.DrawPath(rect1, _panelPaint);
|
||||
}
|
||||
|
||||
private void DrawName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(DisplayName)) return;
|
||||
|
||||
DisplayNamePaint.TextSize = UserSettings.Default.AssetLanguage switch
|
||||
{
|
||||
ELanguage.Korean => 56,
|
||||
_ => 42
|
||||
};
|
||||
|
||||
DisplayNamePaint.TextScaleX = (float) 1.1;
|
||||
DisplayNamePaint.Color = SKColors.White;
|
||||
DisplayNamePaint.TextSkewX = (float) -.25;
|
||||
DisplayNamePaint.TextAlign = SKTextAlign.Left;
|
||||
|
||||
var typeface = Utils.Typefaces.TandemDisplayName;
|
||||
if (typeface == Utils.Typefaces.Default)
|
||||
{
|
||||
DisplayNamePaint.TextSize = 30;
|
||||
}
|
||||
|
||||
DisplayNamePaint.Typeface = typeface;
|
||||
var shaper = new CustomSKShaper(DisplayNamePaint.Typeface);
|
||||
c.DrawShapedText(shaper, DisplayName.ToUpper(), 97, 900, DisplayNamePaint);
|
||||
}
|
||||
|
||||
private void DrawGeneralDescription(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_generalDescription)) return;
|
||||
|
||||
DescriptionPaint.TextSize = UserSettings.Default.AssetLanguage switch
|
||||
{
|
||||
ELanguage.Korean => 20,
|
||||
_ => 17
|
||||
};
|
||||
|
||||
DescriptionPaint.Color = SKColor.Parse("#00FFFB");
|
||||
DescriptionPaint.TextAlign = SKTextAlign.Left;
|
||||
|
||||
var typeface = Utils.Typefaces.TandemGenDescription;
|
||||
if (typeface == Utils.Typefaces.Default)
|
||||
{
|
||||
DescriptionPaint.TextSize = 21;
|
||||
}
|
||||
|
||||
DescriptionPaint.Typeface = typeface;
|
||||
var shaper = new CustomSKShaper(DescriptionPaint.Typeface);
|
||||
c.DrawShapedText(shaper, _generalDescription.ToUpper(), 97, 930, DescriptionPaint);
|
||||
}
|
||||
|
||||
private void DrawAdditionalDescription(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_additionalDescription)) return;
|
||||
|
||||
DescriptionPaint.TextSize = UserSettings.Default.AssetLanguage switch
|
||||
{
|
||||
ELanguage.Korean => 22,
|
||||
_ => 18
|
||||
};
|
||||
|
||||
DescriptionPaint.Color = SKColor.Parse("#89D8FF");
|
||||
DescriptionPaint.TextAlign = SKTextAlign.Left;
|
||||
|
||||
var typeface = Utils.Typefaces.TandemAddDescription;
|
||||
if (typeface == Utils.Typefaces.Default)
|
||||
{
|
||||
DescriptionPaint.TextSize = 20;
|
||||
}
|
||||
|
||||
DescriptionPaint.Typeface = typeface;
|
||||
Utils.DrawMultilineText(c, _additionalDescription, Width, 0, SKTextAlign.Left,
|
||||
new SKRect(97, 960, Width - 10, Height), DescriptionPaint, out _);
|
||||
}
|
||||
}
|
||||
191
FModel/Creator/Bases/FN/BaseUserControl.cs
Normal file
191
FModel/Creator/Bases/FN/BaseUserControl.cs
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class BaseUserControl : UCreator
|
||||
{
|
||||
private List<Options> _optionValues = new();
|
||||
|
||||
private readonly SKPaint _displayNamePaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.DisplayName, TextSize = 45,
|
||||
Color = SKColors.White, TextAlign = SKTextAlign.Left
|
||||
};
|
||||
private readonly SKPaint _descriptionPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.DisplayName, TextSize = 25,
|
||||
Color = SKColor.Parse("88DBFF"), TextAlign = SKTextAlign.Left
|
||||
};
|
||||
|
||||
public BaseUserControl(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 512;
|
||||
Height = 128;
|
||||
Margin = 32;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FText optionDisplayName, "OptionDisplayName", "OptionText"))
|
||||
DisplayName = optionDisplayName.Text.ToUpperInvariant();
|
||||
if (Object.TryGetValue(out FText optionDescription, "OptionDescription", "OptionToolTip"))
|
||||
{
|
||||
Description = optionDescription.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Description)) return;
|
||||
Height += (int) _descriptionPaint.TextSize * Utils.SplitLines(Description, _descriptionPaint, Width - Margin).Count;
|
||||
Height += (int) _descriptionPaint.TextSize;
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] optionValues, "OptionValues", "Options"))
|
||||
{
|
||||
_optionValues = new List<Options>();
|
||||
foreach (var option in optionValues)
|
||||
{
|
||||
if (option.TryGetValue(out FText displayName, "DisplayName", "DisplayText"))
|
||||
{
|
||||
var opt = new Options { Option = displayName.Text.ToUpperInvariant() };
|
||||
if (option.TryGetValue(out FLinearColor color, "Value"))
|
||||
opt.Color = SKColor.Parse(color.Hex).WithAlpha(150);
|
||||
|
||||
_optionValues.Add(opt);
|
||||
}
|
||||
else if (option.TryGetValue(out FName primaryAssetName, "PrimaryAssetName"))
|
||||
{
|
||||
_optionValues.Add(new Options { Option = primaryAssetName.Text });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FText optionOnText, "OptionOnText"))
|
||||
_optionValues.Add(new Options { Option = optionOnText.Text });
|
||||
if (Object.TryGetValue(out FText optionOffText, "OptionOffText"))
|
||||
_optionValues.Add(new Options { Option = optionOffText.Text });
|
||||
|
||||
if (Object.TryGetValue(out int iMin, "Min", "DefaultValue") &&
|
||||
Object.TryGetValue(out int iMax, "Max"))
|
||||
{
|
||||
var increment = iMin;
|
||||
if (Object.TryGetValue(out int incrementValue, "IncrementValue"))
|
||||
increment = incrementValue;
|
||||
|
||||
var format = "{0}";
|
||||
if (Object.TryGetValue(out FText unitName, "UnitName"))
|
||||
format = unitName.Text;
|
||||
|
||||
for (var i = iMin; i <= iMax; i += increment)
|
||||
{
|
||||
_optionValues.Add(new Options { Option = string.Format(format, i) });
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out float fMin, "Min", "DefaultValue") &&
|
||||
Object.TryGetValue(out float fMax, "Max"))
|
||||
{
|
||||
var increment = fMin;
|
||||
if (Object.TryGetValue(out float incrementValue, "IncrementValue"))
|
||||
increment = incrementValue;
|
||||
|
||||
var format = "{0}";
|
||||
if (Object.TryGetValue(out FText unitName, "UnitName"))
|
||||
format = unitName.Text;
|
||||
|
||||
for (var i = fMin; i <= fMax; i += increment)
|
||||
{
|
||||
_optionValues.Add(new Options { Option = string.Format(format, i) });
|
||||
}
|
||||
}
|
||||
|
||||
Height += Margin;
|
||||
Height += 35 * _optionValues.Count;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Opaque);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawInformation(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private new void DrawBackground(SKCanvas c)
|
||||
{
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height),
|
||||
new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
Shader = SKShader.CreateLinearGradient(
|
||||
new SKPoint(Width / 2, Height),
|
||||
new SKPoint(Width, Height / 4),
|
||||
new[] { SKColor.Parse("01369C"), SKColor.Parse("1273C8") },
|
||||
SKShaderTileMode.Clamp)
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawInformation(SKCanvas c)
|
||||
{
|
||||
// display name
|
||||
while (_displayNamePaint.MeasureText(DisplayName) > Width - Margin * 2)
|
||||
{
|
||||
_displayNamePaint.TextSize -= 2;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_displayNamePaint.Typeface);
|
||||
c.DrawShapedText(shaper, DisplayName, Margin, Margin + _displayNamePaint.TextSize, _displayNamePaint);
|
||||
#if DEBUG
|
||||
c.DrawRect(new SKRect(Margin, Margin, Width - Margin, Margin + _displayNamePaint.TextSize), new SKPaint { Color = SKColors.Blue, IsStroke = true });
|
||||
#endif
|
||||
|
||||
// description
|
||||
float y = Margin;
|
||||
if (!string.IsNullOrEmpty(DisplayName)) y += _displayNamePaint.TextSize;
|
||||
if (!string.IsNullOrEmpty(Description)) y += _descriptionPaint.TextSize + Margin / 2F;
|
||||
|
||||
Utils.DrawMultilineText(c, Description, Width, Margin, SKTextAlign.Left,
|
||||
new SKRect(Margin, y, Width - Margin, 256), _descriptionPaint, out var top);
|
||||
|
||||
// options
|
||||
foreach (var option in _optionValues)
|
||||
{
|
||||
option.Draw(c, Margin, Width, ref top);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Options
|
||||
{
|
||||
private const int _SPACE = 5;
|
||||
private const int _HEIGHT = 30;
|
||||
|
||||
private readonly SKPaint _optionPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.DisplayName, TextSize = 20,
|
||||
Color = SKColor.Parse("EEFFFF"), TextAlign = SKTextAlign.Left
|
||||
};
|
||||
|
||||
public string Option;
|
||||
public SKColor Color = SKColor.Parse("55C5FC").WithAlpha(150);
|
||||
|
||||
public void Draw(SKCanvas c, int margin, int width, ref float top)
|
||||
{
|
||||
c.DrawRect(new SKRect(margin, top, width - margin, top + _HEIGHT), new SKPaint { IsAntialias = true, FilterQuality = SKFilterQuality.High, Color = Color });
|
||||
c.DrawText(Option, margin + _SPACE * 2, top + 20 * 1.1f, _optionPaint);
|
||||
top += _HEIGHT + _SPACE;
|
||||
}
|
||||
}
|
||||
151
FModel/Creator/Bases/FN/Reward.cs
Normal file
151
FModel/Creator/Bases/FN/Reward.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
using System;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases.FN;
|
||||
|
||||
public class Reward
|
||||
{
|
||||
private string _rewardQuantity;
|
||||
private BaseIcon _theReward;
|
||||
|
||||
public bool HasReward() => _theReward != null;
|
||||
|
||||
public Reward()
|
||||
{
|
||||
_rewardQuantity = "x0";
|
||||
}
|
||||
|
||||
public Reward(int quantity, FName primaryAssetName) : this(quantity, primaryAssetName.Text)
|
||||
{
|
||||
}
|
||||
|
||||
public Reward(int quantity, string assetName) : this()
|
||||
{
|
||||
_rewardQuantity = $"x{quantity:###,###,###}".Trim();
|
||||
|
||||
if (assetName.Contains(':'))
|
||||
{
|
||||
var parts = assetName.Split(':');
|
||||
|
||||
if (parts[0].Equals("HomebaseBannerIcon", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
if (!Utils.TryLoadObject($"FortniteGame/Content/Items/BannerIcons/{parts[1]}.{parts[1]}", out UObject p))
|
||||
return;
|
||||
|
||||
_theReward = new BaseIcon(p, EIconStyle.Default);
|
||||
_theReward.ParseForReward(false);
|
||||
_theReward.Border[0] = SKColors.White;
|
||||
_rewardQuantity = _theReward.DisplayName;
|
||||
}
|
||||
else GetReward(parts[1]);
|
||||
}
|
||||
else GetReward(assetName);
|
||||
}
|
||||
|
||||
public Reward(UObject uObject)
|
||||
{
|
||||
_theReward = new BaseIcon(uObject, EIconStyle.Default);
|
||||
_theReward.ParseForReward(false);
|
||||
_theReward.Border[0] = SKColors.White;
|
||||
_rewardQuantity = _theReward.DisplayName;
|
||||
}
|
||||
|
||||
private readonly SKPaint _rewardPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High
|
||||
};
|
||||
|
||||
public void DrawQuest(SKCanvas c, SKRect rect)
|
||||
{
|
||||
_rewardPaint.TextSize = 50;
|
||||
if (HasReward())
|
||||
{
|
||||
c.DrawBitmap((_theReward.Preview ?? _theReward.DefaultPreview).Resize((int) rect.Height), new SKPoint(rect.Left, rect.Top), _rewardPaint);
|
||||
|
||||
_rewardPaint.Color = _theReward.Border[0];
|
||||
_rewardPaint.Typeface = _rewardQuantity.StartsWith("x") ? Utils.Typefaces.BundleNumber : Utils.Typefaces.Bundle;
|
||||
_rewardPaint.ImageFilter = SKImageFilter.CreateDropShadow(0, 0, 5, 5, _theReward.Background[0].WithAlpha(150));
|
||||
while (_rewardPaint.MeasureText(_rewardQuantity) > rect.Width)
|
||||
{
|
||||
_rewardPaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(_rewardPaint.Typeface);
|
||||
c.DrawShapedText(shaper, _rewardQuantity, rect.Left + rect.Height + 25, rect.MidY + 20, _rewardPaint);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rewardPaint.Color = SKColors.White;
|
||||
_rewardPaint.Typeface = Utils.Typefaces.BundleNumber;
|
||||
c.DrawText("No Reward", new SKPoint(rect.Left, rect.MidY + 20), _rewardPaint);
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawSeasonWin(SKCanvas c, int size)
|
||||
{
|
||||
if (!HasReward()) return;
|
||||
c.DrawBitmap((_theReward.Preview ?? _theReward.DefaultPreview).Resize(size), new SKPoint(0, 0), _rewardPaint);
|
||||
}
|
||||
|
||||
public void DrawSeason(SKCanvas c, int x, int y, int areaSize)
|
||||
{
|
||||
if (!HasReward()) return;
|
||||
|
||||
// area + icon
|
||||
_rewardPaint.Color = SKColor.Parse("#0F5CAF");
|
||||
c.DrawRect(new SKRect(x, y, x + areaSize, y + areaSize), _rewardPaint);
|
||||
c.DrawBitmap(_theReward.Preview.Resize(areaSize), new SKPoint(x, y), _rewardPaint);
|
||||
|
||||
// rarity color
|
||||
_rewardPaint.Color = _theReward.Background[0];
|
||||
var pathBottom = new SKPath {FillType = SKPathFillType.EvenOdd};
|
||||
pathBottom.MoveTo(x, y + areaSize);
|
||||
pathBottom.LineTo(x, y + areaSize - areaSize / 25 * 2.5f);
|
||||
pathBottom.LineTo(x + areaSize, y + areaSize - areaSize / 25 * 4.5f);
|
||||
pathBottom.LineTo(x + areaSize, y + areaSize);
|
||||
pathBottom.Close();
|
||||
c.DrawPath(pathBottom, _rewardPaint);
|
||||
}
|
||||
|
||||
private void GetReward(string trigger)
|
||||
{
|
||||
switch (trigger.ToLower())
|
||||
{
|
||||
// case "athenabattlestar":
|
||||
// _theReward = new BaseIcon(null, EIconStyle.Default);
|
||||
// _theReward.Border[0] = SKColor.Parse("FFDB67");
|
||||
// _theReward.Background[0] = SKColor.Parse("8F4A20");
|
||||
// _theReward.Preview = Utils.GetBitmap("FortniteGame/Content/Athena/UI/Frontend/Art/T_UI_BP_BattleStar_L.T_UI_BP_BattleStar_L");
|
||||
// break;
|
||||
// case "athenaseasonalxp":
|
||||
// _theReward = new BaseIcon(null, EIconStyle.Default);
|
||||
// _theReward.Border[0] = SKColor.Parse("E6FDB1");
|
||||
// _theReward.Background[0] = SKColor.Parse("51830F");
|
||||
// _theReward.Preview = Utils.GetBitmap("FortniteGame/Content/UI/Foundation/Textures/Icons/Items/T-FNBR-XPUncommon-L.T-FNBR-XPUncommon-L");
|
||||
// break;
|
||||
// case "mtxgiveaway":
|
||||
// _theReward = new BaseIcon(null, EIconStyle.Default);
|
||||
// _theReward.Border[0] = SKColor.Parse("DCE6FF");
|
||||
// _theReward.Background[0] = SKColor.Parse("64A0AF");
|
||||
// _theReward.Preview = Utils.GetBitmap("FortniteGame/Content/UI/Foundation/Textures/Icons/Items/T-Items-MTX.T-Items-MTX");
|
||||
// break;
|
||||
default:
|
||||
{
|
||||
var path = Utils.GetFullPath($"FortniteGame/(?:Content/Athena|Content/Items|Plugins/GameFeatures)/.*?/{trigger}.uasset"); // path has no objectname and its needed so we push the trigger again as the objectname
|
||||
if (!string.IsNullOrWhiteSpace(path) && Utils.TryLoadObject(path.Replace("uasset", trigger), out UObject d))
|
||||
{
|
||||
_theReward = new BaseIcon(d, EIconStyle.Default);
|
||||
_theReward.ParseForReward(false);
|
||||
_theReward.Border[0] = SKColors.White;
|
||||
_rewardQuantity = $"{_theReward.DisplayName} ({_rewardQuantity})";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
287
FModel/Creator/Bases/MV/BaseFighter.cs
Normal file
287
FModel/Creator/Bases/MV/BaseFighter.cs
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Extensions;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.MV;
|
||||
|
||||
public class BaseFighter : UCreator
|
||||
{
|
||||
private float _xOffset = 1f;
|
||||
private float _yOffset = 1f;
|
||||
private float _zoom = 1f;
|
||||
|
||||
private readonly SKBitmap _pattern;
|
||||
private readonly SKBitmap _perk;
|
||||
private readonly SKBitmap _emote;
|
||||
private readonly SKBitmap _skin;
|
||||
|
||||
private (SKBitmap, List<string>) _fighterType;
|
||||
private readonly List<SKBitmap> _recommendedPerks;
|
||||
private readonly List<SKBitmap> _availableTaunts;
|
||||
private readonly List<SKBitmap> _skins;
|
||||
|
||||
public BaseFighter(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 1024;
|
||||
DisplayNamePaint.TextSize = 100;
|
||||
DisplayNamePaint.TextAlign = SKTextAlign.Left;
|
||||
DisplayNamePaint.Typeface = Utils.Typefaces.TandemDisplayName;
|
||||
DescriptionPaint.TextSize = 25;
|
||||
DescriptionPaint.Typeface = Utils.Typefaces.TandemGenDescription;
|
||||
DefaultPreview = Utils.GetBitmap("/Game/Panda_Main/UI/PreMatch/Images/DiamondPortraits/0010_Random.0010_Random");
|
||||
|
||||
_pattern = Utils.GetBitmap("/Game/Panda_Main/UI/Assets/UI_Textures/halftone_jagged.halftone_jagged");
|
||||
_perk = Utils.GetBitmap("/Game/Panda_Main/UI/Assets/Icons/ui_icons_perks.ui_icons_perks");
|
||||
_emote = Utils.GetBitmap("/Game/Panda_Main/UI/Assets/Icons/ui_icons_emote.ui_icons_emote");
|
||||
_skin = Utils.GetBitmap("/Game/Panda_Main/UI/Assets/Icons/ui_icons_skins.ui_icons_skins");
|
||||
_fighterType.Item2 = new List<string>();
|
||||
_recommendedPerks = new List<SKBitmap>();
|
||||
_availableTaunts = new List<SKBitmap>();
|
||||
_skins = new List<SKBitmap>();
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FLinearColor backgroundColor, "BackgroundColor"))
|
||||
Background = new[] { SKColor.Parse(backgroundColor.Hex) };
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath portraitMaterial, "CollectionsPortraitMaterial") &&
|
||||
portraitMaterial.TryLoad(out UMaterialInstanceConstant portrait))
|
||||
{
|
||||
_xOffset = Math.Abs(portrait.ScalarParameterValues.FirstOrDefault(x => x.ParameterInfo.Name.Text == "XOffset")?.ParameterValue ?? 1f);
|
||||
_yOffset = Math.Abs(portrait.ScalarParameterValues.FirstOrDefault(x => x.ParameterInfo.Name.Text == "YOffset")?.ParameterValue / 10 ?? 1f);
|
||||
_zoom = Math.Clamp(portrait.ScalarParameterValues.FirstOrDefault(x => x.ParameterInfo.Name.Text == "Zoom")?.ParameterValue ?? 1f, 0, 1);
|
||||
Preview = Utils.GetBitmap(portrait);
|
||||
}
|
||||
else if (Object.TryGetValue(out FSoftObjectPath portraitTexture, "NewCharacterSelectPortraitTexture", "HUDPortraitTexture"))
|
||||
Preview = Utils.GetBitmap(portraitTexture);
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName"))
|
||||
DisplayName = displayName.Text;
|
||||
|
||||
GetFighterClassInfo(Object.GetOrDefault("Class", EFighterClass.Support));
|
||||
_fighterType.Item2.Add(Utils.GetLocalizedResource(Object.GetOrDefault("Type", EFighterType.Horizontal)));
|
||||
if (Object.TryGetValue(out FText property, "Property"))
|
||||
_fighterType.Item2.Add(property.Text);
|
||||
|
||||
if (Object.TryGetValue(out UScriptSet recommendedPerks, "RecommendedPerkDatas")) // PORCO DIO WB USE ARRAYS!!!!!!
|
||||
{
|
||||
foreach (var recommendedPerk in recommendedPerks.Properties)
|
||||
{
|
||||
if (recommendedPerk.GenericValue is not FPackageIndex packageIndex ||
|
||||
!Utils.TryGetPackageIndexExport(packageIndex, out UObject export) ||
|
||||
!export.TryGetValue(out FSoftObjectPath rewardThumbnail, "RewardThumbnail"))
|
||||
continue;
|
||||
|
||||
_recommendedPerks.Add(Utils.GetBitmap(rewardThumbnail));
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath[] availableTaunts, "AvailableTauntData"))
|
||||
{
|
||||
foreach (var taunt in availableTaunts)
|
||||
{
|
||||
if (!Utils.TryLoadObject(taunt.AssetPathName.Text, out UObject export) ||
|
||||
!export.TryGetValue(out FSoftObjectPath rewardThumbnail, "RewardThumbnail"))
|
||||
continue;
|
||||
|
||||
_availableTaunts.Add(Utils.GetBitmap(rewardThumbnail));
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath[] skins, "Skins"))
|
||||
{
|
||||
foreach (var skin in skins)
|
||||
{
|
||||
if (!Utils.TryLoadObject(skin.AssetPathName.Text, out UObject export) ||
|
||||
!export.TryGetValue(out FSoftObjectPath rewardThumbnail, "RewardThumbnail"))
|
||||
continue;
|
||||
|
||||
_skins.Add(Utils.GetBitmap(rewardThumbnail));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawDisplayName(c);
|
||||
DrawFighterInfo(c);
|
||||
DrawRecommendedPerks(c);
|
||||
DrawAvailableTaunts(c);
|
||||
DrawSkins(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void GetFighterClassInfo(EFighterClass clas)
|
||||
{
|
||||
if (!Utils.TryLoadObject("/Game/Panda_Main/UI/In-Game/Data/UICharacterClassInfo_Datatable.UICharacterClassInfo_Datatable", out UDataTable dataTable))
|
||||
return;
|
||||
|
||||
var row = dataTable.RowMap.ElementAt((int) clas).Value;
|
||||
if (!row.TryGetValue(out FText displayName, "DisplayName_5_9DB5DDFF490E1F4AD72329866F96B81D") ||
|
||||
!row.TryGetValue(out FPackageIndex icon, "Icon_8_711534AD4F240D4B001AA6A471EA1895"))
|
||||
return;
|
||||
|
||||
_fighterType.Item1 = Utils.GetBitmap(icon);
|
||||
_fighterType.Item2.Add(displayName.Text);
|
||||
}
|
||||
|
||||
private new void DrawBackground(SKCanvas c)
|
||||
{
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height),
|
||||
new SKPaint
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High, Color = Background[0]
|
||||
});
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(DisplayName))
|
||||
{
|
||||
c.DrawText(DisplayName, -50, 125, new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.DisplayName, TextSize = 200,
|
||||
TextScaleX = .95f, TextSkewX = -0.25f, Color = SKColors.Black.WithAlpha(25)
|
||||
});
|
||||
}
|
||||
|
||||
c.DrawBitmap(_pattern, new SKRect(0, Height / 2, Width, Height), new SKPaint
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High, BlendMode = SKBlendMode.SoftLight
|
||||
});
|
||||
|
||||
var path = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
path.MoveTo(0, Height);
|
||||
path.LineTo(0, Height - 20);
|
||||
path.LineTo(Width, Height - 60);
|
||||
path.LineTo(Width, Height);
|
||||
path.Close();
|
||||
c.DrawPath(path, new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
Color = SKColor.Parse("#141629")
|
||||
});
|
||||
}
|
||||
|
||||
private new void DrawPreview(SKCanvas c)
|
||||
{
|
||||
var img = (Preview ?? DefaultPreview).ResizeWithRatio(_zoom);
|
||||
var x_offset = img.Width * _xOffset;
|
||||
var y_offset = img.Height * -_yOffset;
|
||||
c.DrawBitmap(img, new SKRect(Width + x_offset - img.Width, y_offset, Width + x_offset, img.Height + y_offset), ImagePaint);
|
||||
}
|
||||
|
||||
private new void DrawDisplayName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(DisplayName)) return;
|
||||
c.DrawText(DisplayName.ToUpper(), 50, 100, DisplayNamePaint);
|
||||
}
|
||||
|
||||
private void DrawFighterInfo(SKCanvas c)
|
||||
{
|
||||
if (_fighterType.Item1 != null)
|
||||
c.DrawBitmap(_fighterType.Item1, new SKRect(50, 112.5f, 98, 160.5f), ImagePaint);
|
||||
|
||||
c.DrawText(string.Join(" | ", _fighterType.Item2), 98, 145, DescriptionPaint);
|
||||
}
|
||||
|
||||
private void DrawRecommendedPerks(SKCanvas c)
|
||||
{
|
||||
const int x = 50;
|
||||
const int y = 200;
|
||||
const int size = 64;
|
||||
|
||||
ImagePaint.ImageFilter = null;
|
||||
ImagePaint.BlendMode = SKBlendMode.SoftLight;
|
||||
c.DrawBitmap(_perk, new SKRect(x, y, x + size / 2, y + size / 2), ImagePaint);
|
||||
if (_recommendedPerks.Count < 1) return;
|
||||
|
||||
ImagePaint.BlendMode = SKBlendMode.SrcOver;
|
||||
ImagePaint.ImageFilter = SKImageFilter.CreateDropShadow(0, 0, 2.5f, 2.5f, SKColors.Black);
|
||||
c.DrawBitmap(_recommendedPerks[1], new SKRect(161, y, 225, y + size), ImagePaint);
|
||||
c.DrawBitmap(_recommendedPerks[2], new SKRect(193, y + size / 2, 257, y + size * 1.5f), ImagePaint);
|
||||
c.DrawBitmap(_recommendedPerks[3], new SKRect(161, y + size, 225, y + size * 2), ImagePaint);
|
||||
|
||||
ImagePaint.ImageFilter = SKImageFilter.CreateDropShadow(0, 0, 5, 5, SKColors.Black.WithAlpha(150));
|
||||
c.DrawBitmap(_recommendedPerks[0], new SKRect(x, y, x + size * 2, y + size * 2), ImagePaint);
|
||||
}
|
||||
|
||||
private void DrawAvailableTaunts(SKCanvas c)
|
||||
{
|
||||
var x = 300;
|
||||
const int y = 232;
|
||||
const int size = 64;
|
||||
|
||||
ImagePaint.ImageFilter = null;
|
||||
ImagePaint.BlendMode = SKBlendMode.SoftLight;
|
||||
c.DrawBitmap(_emote, new SKRect(x, y - size / 2, x + size / 2, y), ImagePaint);
|
||||
if (_availableTaunts.Count < 1) return;
|
||||
|
||||
ImagePaint.BlendMode = SKBlendMode.SrcOver;
|
||||
ImagePaint.ImageFilter = SKImageFilter.CreateDropShadow(0, 0, 1.5f, 1.5f, SKColors.Black);
|
||||
|
||||
foreach (var taunt in _availableTaunts)
|
||||
{
|
||||
c.DrawBitmap(taunt, new SKRect(x, y, x + size, y + size), ImagePaint);
|
||||
x += size;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSkins(SKCanvas c)
|
||||
{
|
||||
var x = 50;
|
||||
const int y = 333;
|
||||
const int size = 128;
|
||||
|
||||
ImagePaint.ImageFilter = null;
|
||||
ImagePaint.BlendMode = SKBlendMode.SoftLight;
|
||||
c.DrawBitmap(_skin, new SKRect(x, y, x + size / 4, y + size / 4), ImagePaint);
|
||||
if (_skins.Count < 1) return;
|
||||
|
||||
ImagePaint.BlendMode = SKBlendMode.SrcOver;
|
||||
ImagePaint.ImageFilter = SKImageFilter.CreateDropShadow(0, 0, 1.5f, 1.5f, SKColors.Black);
|
||||
foreach (var skin in _skins)
|
||||
{
|
||||
c.DrawBitmap(skin, new SKRect(x, y, x + size, y + size), ImagePaint);
|
||||
x += size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum EFighterClass : byte
|
||||
{
|
||||
Mage = 4,
|
||||
Tank = 3,
|
||||
Fighter = 2,
|
||||
Bruiser = 2,
|
||||
Assassin = 1,
|
||||
Support = 0 // Default
|
||||
}
|
||||
|
||||
public enum EFighterType : byte
|
||||
{
|
||||
[Description("B980C82D40FF37FD359C74A339CE1B3A")]
|
||||
Hybrid = 2,
|
||||
|
||||
[Description("2C55443D47164019BE73A5ABDC670F36")]
|
||||
Vertical = 1,
|
||||
|
||||
[Description("97A60DD54AA23D4B93D5B891F729BF5C")]
|
||||
Horizontal = 0 // Default
|
||||
}
|
||||
344
FModel/Creator/Bases/MV/BasePandaIcon.cs
Normal file
344
FModel/Creator/Bases/MV/BasePandaIcon.cs
Normal file
|
|
@ -0,0 +1,344 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.MV;
|
||||
|
||||
public class BasePandaIcon : UCreator
|
||||
{
|
||||
private float _y_offset;
|
||||
private ERewardRarity _rarity;
|
||||
private string _type;
|
||||
|
||||
protected readonly List<(SKBitmap, string)> Pictos;
|
||||
|
||||
public BasePandaIcon(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 1024;
|
||||
Margin = 30;
|
||||
DisplayNamePaint.TextSize = 50;
|
||||
DisplayNamePaint.TextAlign = SKTextAlign.Left;
|
||||
DisplayNamePaint.Color = SKColor.Parse("#191C33");
|
||||
DescriptionPaint.TextSize = 25;
|
||||
DefaultPreview = Utils.GetBitmap("/Game/Panda_Main/UI/PreMatch/Images/DiamondPortraits/0010_Random.0010_Random");
|
||||
|
||||
_y_offset = Height / 2 + DescriptionPaint.TextSize;
|
||||
Pictos = new List<(SKBitmap, string)>();
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
var category = Object.GetOrDefault("Category", EPerkCategory.Offense);
|
||||
_rarity = Object.GetOrDefault("Rarity", ERewardRarity.None);
|
||||
|
||||
_type = Object.ExportType;
|
||||
var t = _type switch // ERewardType like
|
||||
{
|
||||
"StatTrackingBundleData" => EItemType.Badge,
|
||||
"AnnouncerPackData" => EItemType.Announcer,
|
||||
"CharacterGiftData" => EItemType.ExperiencePoints,
|
||||
"ProfileIconData" => EItemType.ProfileIcon,
|
||||
"RingOutVfxData" => EItemType.Ringout,
|
||||
"BannerData" => EItemType.Banner,
|
||||
"EmoteData" => EItemType.Sticker,
|
||||
"QuestData" => EItemType.Mission,
|
||||
"TauntData" => EItemType.Emote,
|
||||
"SkinData" => EItemType.Variant,
|
||||
"PerkData" when category == EPerkCategory.CharacterSpecific => EItemType.SignaturePerk,
|
||||
"PerkData" => EItemType.Perk,
|
||||
_ => EItemType.Unknown
|
||||
};
|
||||
|
||||
if (t == EItemType.SignaturePerk) _rarity = ERewardRarity.Legendary;
|
||||
Background = GetRarityBackground(_rarity);
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath rewardThumbnail, "RewardThumbnail", "DisplayTextureRef", "Texture"))
|
||||
Preview = Utils.GetBitmap(rewardThumbnail);
|
||||
else if (Object.TryGetValue(out FPackageIndex icon, "Icon"))
|
||||
Preview = Utils.GetBitmap(icon);
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "QuestName"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "Description", "QuestDescription"))
|
||||
Description = Utils.RemoveHtmlTags(description.Text);
|
||||
|
||||
var unlockLocation = Object.GetOrDefault("UnlockLocation", EUnlockLocation.None);
|
||||
if (t == EItemType.Unknown && unlockLocation == EUnlockLocation.CharacterMastery) t = EItemType.MasteryLevel;
|
||||
|
||||
Pictos.Add((Utils.GetBitmap("/Game/Panda_Main/UI/Assets/Icons/ui_icons_unlocked.ui_icons_unlocked"), Utils.GetLocalizedResource(unlockLocation)));
|
||||
if (Object.TryGetValue(out string slug, "Slug"))
|
||||
{
|
||||
t = _type switch
|
||||
{
|
||||
"HydraSyncedDataAsset" when slug == "gold" => EItemType.Gold,
|
||||
"HydraSyncedDataAsset" when slug == "gleamium" => EItemType.Gleamium,
|
||||
"HydraSyncedDataAsset" when slug == "match_toasts" => EItemType.Toast,
|
||||
_ => t
|
||||
};
|
||||
Pictos.Add((Utils.GetBitmap("/Game/Panda_Main/UI/Assets/Icons/ui_icons_link.ui_icons_link"), slug));
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out int xpValue, "XPValue"))
|
||||
DisplayName += $" (+{xpValue})";
|
||||
|
||||
if (Utils.TryLoadObject("/Game/Panda_Main/UI/Prototype/Foundation/Types/DT_EconomyGlossary.DT_EconomyGlossary", out UDataTable dataTable))
|
||||
{
|
||||
if (t != EItemType.Unknown &&
|
||||
dataTable.RowMap.ElementAt((int) t).Value.TryGetValue(out FText name, "Name_14_7F75AD6047CBDEA7B252B1BD76EF84B9"))
|
||||
_type = name.Text;
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
DrawPictos(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private SKColor[] GetRarityBackground(ERewardRarity rarity)
|
||||
{
|
||||
return rarity switch // the colors here are the base color and brighter color that the game uses for rarities from the "Rarity to Color" blueprint function
|
||||
{
|
||||
ERewardRarity.Common => new[]
|
||||
{
|
||||
SKColor.Parse(new FLinearColor(0.068478f, 0.651406f, 0.016807f, 1.000000f).Hex),
|
||||
SKColor.Parse(new FLinearColor(0.081422f, 1.000000f, 0.000000f, 1.000000f).Hex)
|
||||
},
|
||||
ERewardRarity.Rare => new[]
|
||||
{
|
||||
SKColor.Parse(new FLinearColor(0.035911f, 0.394246f, 0.900000f, 1.000000f).Hex),
|
||||
SKColor.Parse(new FLinearColor(0.033333f, 0.434207f, 1.000000f, 1.000000f).Hex)
|
||||
},
|
||||
ERewardRarity.Epic => new[]
|
||||
{
|
||||
SKColor.Parse(new FLinearColor(0.530391f, 0.060502f, 0.900000f, 1.000000f).Hex),
|
||||
SKColor.Parse(new FLinearColor(0.579907f, 0.045833f, 1.000000f, 1.000000f).Hex)
|
||||
},
|
||||
ERewardRarity.Legendary => new[]
|
||||
{
|
||||
SKColor.Parse(new FLinearColor(1.000000f, 0.223228f, 0.002428f, 1.000000f).Hex),
|
||||
SKColor.Parse(new FLinearColor(1.000000f, 0.479320f, 0.030713f, 1.000000f).Hex)
|
||||
},
|
||||
_ => new[]
|
||||
{
|
||||
SKColor.Parse(new FLinearColor(0.194618f, 0.651406f, 0.630757f, 1.000000f).Hex),
|
||||
SKColor.Parse(new FLinearColor(0.273627f, 0.955208f, 0.914839f, 1.000000f).Hex)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private new void DrawBackground(SKCanvas c)
|
||||
{
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height),
|
||||
new SKPaint
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High, Color = SKColor.Parse("#F3FCF0")
|
||||
});
|
||||
|
||||
var has_tr = _rarity != ERewardRarity.None;
|
||||
var tr = Utils.GetLocalizedResource(_rarity);
|
||||
var tr_paint = new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
TextAlign = SKTextAlign.Right,
|
||||
TextSize = 35,
|
||||
Color = SKColors.White,
|
||||
Typeface = Utils.Typefaces.DisplayName
|
||||
};
|
||||
|
||||
var path = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
path.MoveTo(0, Height);
|
||||
path.LineTo(14, Height);
|
||||
path.LineTo(20, 20);
|
||||
if (has_tr)
|
||||
{
|
||||
const int margin = 15;
|
||||
var width = tr_paint.MeasureText(tr);
|
||||
path.LineTo(Width - width - margin * 2, 15);
|
||||
path.LineTo(Width - width - margin * 2.5f, 60);
|
||||
path.LineTo(Width, 55);
|
||||
}
|
||||
else
|
||||
{
|
||||
path.LineTo(Width, 14);
|
||||
}
|
||||
path.LineTo(Width, 0);
|
||||
path.LineTo(0, 0);
|
||||
path.LineTo(0, Height);
|
||||
path.Close();
|
||||
c.DrawPath(path, new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
Shader = SKShader.CreateLinearGradient(
|
||||
new SKPoint(Width / 2, Height), new SKPoint(Width, Height / 4), Background, SKShaderTileMode.Clamp)
|
||||
});
|
||||
|
||||
if (has_tr)
|
||||
{
|
||||
var x = Width - 20f;
|
||||
foreach (var a in tr.Select(character => character.ToString()).Reverse())
|
||||
{
|
||||
c.DrawText(a, x, 40, tr_paint);
|
||||
x -= tr_paint.MeasureText(a) - 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private new void DrawPreview(SKCanvas c)
|
||||
{
|
||||
const int size = 384;
|
||||
var y = Height - size - Margin * 2;
|
||||
c.DrawBitmap(Preview ?? DefaultPreview, new SKRect(Margin, y, size + Margin, y + size), ImagePaint);
|
||||
}
|
||||
|
||||
private new void DrawDisplayName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(DisplayName))
|
||||
return;
|
||||
|
||||
var x = 450f;
|
||||
while (DisplayNamePaint.MeasureText(DisplayName) > Width - x / 1.25)
|
||||
{
|
||||
DisplayNamePaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var y = Height / 2 - DisplayNamePaint.TextSize / 4;
|
||||
foreach (var a in DisplayName.Select(character => character.ToString()))
|
||||
{
|
||||
c.DrawText(a, x, y, DisplayNamePaint);
|
||||
x += DisplayNamePaint.MeasureText(a) - 4;
|
||||
}
|
||||
}
|
||||
|
||||
private new void DrawDescription(SKCanvas c)
|
||||
{
|
||||
const int x = 450;
|
||||
DescriptionPaint.Color = Background[0];
|
||||
c.DrawText(_type.ToUpper(), x, 170, DescriptionPaint);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Description)) return;
|
||||
|
||||
DescriptionPaint.Color = SKColor.Parse("#191C33");
|
||||
Utils.DrawMultilineText(c, Description, Width - x, Margin, SKTextAlign.Left,
|
||||
new SKRect(x, _y_offset, Width - Margin, Height - Margin), DescriptionPaint, out _y_offset);
|
||||
}
|
||||
|
||||
private void DrawPictos(SKCanvas c)
|
||||
{
|
||||
if (Pictos.Count < 1) return;
|
||||
|
||||
const float x = 450f;
|
||||
const int size = 24;
|
||||
var color = SKColor.Parse("#495B6E");
|
||||
var paint = new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
TextSize = 27,
|
||||
Color = color,
|
||||
Typeface = Utils.Typefaces.Default
|
||||
};
|
||||
|
||||
ImagePaint.ColorFilter = SKColorFilter.CreateBlendMode(color, SKBlendMode.SrcIn);
|
||||
|
||||
foreach (var picto in Pictos)
|
||||
{
|
||||
c.DrawBitmap(picto.Item1, new SKRect(x, _y_offset + 10, x + size, _y_offset + 10 + size), ImagePaint);
|
||||
c.DrawText(picto.Item2, x + size + 10, _y_offset + size + 6, paint);
|
||||
_y_offset += size + 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum ERewardRarity : byte
|
||||
{
|
||||
[Description("0D4B15CE4FB6F2BC5E5F5FAA9E8B376C")]
|
||||
None = 0, // Default
|
||||
|
||||
[Description("0FCDEF47485E2C3D0D477988C481D8E3")]
|
||||
Common = 1,
|
||||
|
||||
[Description("18241CA7441AE16AAFB6EFAB499FF981")]
|
||||
Rare = 2,
|
||||
|
||||
[Description("D999D9CB4754D1078BF9A1B34A231005")]
|
||||
Epic = 3,
|
||||
|
||||
[Description("705AE967407D6EF8870E988A08C6900E")]
|
||||
Legendary = 4
|
||||
}
|
||||
|
||||
public enum EUnlockLocation : byte
|
||||
{
|
||||
[Description("0D4B15CE4FB6F2BC5E5F5FAA9E8B376C")]
|
||||
None = 0, // Default
|
||||
|
||||
[Description("0AFBCE5F41D930D6E9B5138C8EBCFE87")]
|
||||
Shop = 1,
|
||||
|
||||
[Description("062F178B4EE74502C9AD9D878F3D7CEA")]
|
||||
AccountLevel = 2,
|
||||
|
||||
[Description("1AE7A5DF477B2B5F4B3CCC8DCD732884")]
|
||||
CharacterMastery = 3,
|
||||
|
||||
[Description("0B37731C49DC9AE1EAC566950C1A329D")]
|
||||
Battlepass = 4,
|
||||
|
||||
[Description("16F160084187479E5D471786190AE5B7")]
|
||||
CharacterAffinity = 5,
|
||||
|
||||
[Description("E5C1E35C406C585E83B5D18A817FA0B4")]
|
||||
GuildBoss = 6,
|
||||
|
||||
[Description("4A89F5DD432113750EF52D8B58977DCE")]
|
||||
Tutorial = 7
|
||||
}
|
||||
|
||||
public enum EPerkCategory : byte
|
||||
{
|
||||
Offense = 0, // Default
|
||||
Defense = 1,
|
||||
Utility = 2,
|
||||
CharacterSpecific = 3
|
||||
}
|
||||
|
||||
public enum EItemType
|
||||
{
|
||||
Unknown = -1,
|
||||
Announcer,
|
||||
Badge,
|
||||
Banner,
|
||||
BattlePassPoints,
|
||||
Emote,
|
||||
ExperiencePoints,
|
||||
Gleamium,
|
||||
Gold,
|
||||
MasteryLevel,
|
||||
Mission,
|
||||
Perk,
|
||||
PlayerLevel,
|
||||
ProfileIcon,
|
||||
Rested,
|
||||
Ringout,
|
||||
SignaturePerk,
|
||||
Sticker,
|
||||
Toast,
|
||||
Variant
|
||||
}
|
||||
45
FModel/Creator/Bases/MV/BasePerkGroup.cs
Normal file
45
FModel/Creator/Bases/MV/BasePerkGroup.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System.Collections.Generic;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.MV;
|
||||
|
||||
public class BasePerkGroup : UCreator
|
||||
{
|
||||
private readonly List<BasePandaIcon> _perks;
|
||||
|
||||
public BasePerkGroup(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
_perks = new List<BasePandaIcon>();
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out UScriptSet perks, "Perks")) // PORCO DIO WB USE ARRAYS!!!!!!
|
||||
{
|
||||
foreach (var perk in perks.Properties)
|
||||
{
|
||||
if (perk.GenericValue is not FPackageIndex packageIndex ||
|
||||
!Utils.TryGetPackageIndexExport(packageIndex, out UObject export))
|
||||
continue;
|
||||
|
||||
var icon = new BasePandaIcon(export, Style);
|
||||
icon.ParseForInfo();
|
||||
_perks.Add(icon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap[_perks.Count];
|
||||
for (var i = 0; i < ret.Length; i++)
|
||||
{
|
||||
ret[i] = _perks[i].Draw()[0];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
54
FModel/Creator/Bases/MV/BaseQuest.cs
Normal file
54
FModel/Creator/Bases/MV/BaseQuest.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System.ComponentModel;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Extensions;
|
||||
|
||||
namespace FModel.Creator.Bases.MV;
|
||||
|
||||
public class BaseQuest : BasePandaIcon
|
||||
{
|
||||
public BaseQuest(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FStructFallback[] questCompletionRewards, "QuestCompletionRewards") &&
|
||||
questCompletionRewards.Length > 0 && questCompletionRewards[0] is { } actualReward)
|
||||
{
|
||||
var rewardType = actualReward.GetOrDefault("RewardType", EQuestRewardType.Inventory);
|
||||
var count = actualReward.GetOrDefault("Count", 0);
|
||||
Pictos.Add((Utils.GetBitmap("/Game/Panda_Main/UI/Assets/Icons/ui_icons_plus.ui_icons_plus"), count.ToString()));
|
||||
|
||||
base.ParseForInfo();
|
||||
|
||||
if (actualReward.TryGetValue(out FPackageIndex assetReward, "AssetReward") &&
|
||||
Utils.TryGetPackageIndexExport(assetReward, out UObject export))
|
||||
{
|
||||
var item = new BasePandaIcon(export, Style);
|
||||
item.ParseForInfo();
|
||||
Preview = item.Preview;
|
||||
}
|
||||
else if (rewardType != EQuestRewardType.Inventory)
|
||||
{
|
||||
Preview = Utils.GetBitmap(rewardType.GetDescription());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.ParseForInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum EQuestRewardType : byte
|
||||
{
|
||||
Inventory = 0, // Default
|
||||
|
||||
[Description("/Game/Panda_Main/UI/Assets/Icons/UI_CharacterTicket.UI_CharacterTicket")]
|
||||
AccountXP = 1,
|
||||
|
||||
[Description("/Game/Panda_Main/UI/Assets/Icons/UI_BattlepassToken.UI_BattlepassToken")]
|
||||
BattlepassXP = 2
|
||||
}
|
||||
47
FModel/Creator/Bases/SB/BaseDivision.cs
Normal file
47
FModel/Creator/Bases/SB/BaseDivision.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.SB;
|
||||
|
||||
public class BaseDivision : UCreator
|
||||
{
|
||||
public BaseDivision(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FPackageIndex icon, "Icon", "IconNoTier"))
|
||||
{
|
||||
Preview = Utils.GetBitmap(icon);
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FLinearColor lightColor, "UILightColor") &&
|
||||
Object.TryGetValue(out FLinearColor mediumColor, "UIMediumColor") &&
|
||||
Object.TryGetValue(out FLinearColor darkColor, "UIDarkColor") &&
|
||||
Object.TryGetValue(out FLinearColor cardColor, "UICardColor"))
|
||||
{
|
||||
Background = new[] { SKColor.Parse(lightColor.Hex), SKColor.Parse(cardColor.Hex) };
|
||||
Border = new[] { SKColor.Parse(mediumColor.Hex), SKColor.Parse(darkColor.Hex) };
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName"))
|
||||
DisplayName = displayName.Text;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
}
|
||||
49
FModel/Creator/Bases/SB/BaseGameModeInfo.cs
Normal file
49
FModel/Creator/Bases/SB/BaseGameModeInfo.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.SB;
|
||||
|
||||
public class BaseGameModeInfo : UCreator
|
||||
{
|
||||
private SKBitmap _icon;
|
||||
|
||||
public BaseGameModeInfo(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Width = 738;
|
||||
Height = 1024;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "Description"))
|
||||
Description = description.Text;
|
||||
if (Object.TryGetValue(out UMaterialInstanceConstant portrait, "Portrait"))
|
||||
Preview = Utils.GetBitmap(portrait);
|
||||
if (Object.TryGetValue(out UTexture2D icon, "Icon"))
|
||||
_icon = Utils.GetBitmap(icon).Resize(25);
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawIcon(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void DrawIcon(SKCanvas c)
|
||||
{
|
||||
if (_icon == null) return;
|
||||
c.DrawBitmap(_icon, new SKPoint(5, 5), ImagePaint);
|
||||
}
|
||||
}
|
||||
54
FModel/Creator/Bases/SB/BaseLeague.cs
Normal file
54
FModel/Creator/Bases/SB/BaseLeague.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.SB;
|
||||
|
||||
public class BaseLeague : UCreator
|
||||
{
|
||||
private int _promotionXp, _xpLostPerMatch;
|
||||
|
||||
public BaseLeague(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
_promotionXp = 0;
|
||||
_xpLostPerMatch = 0;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out int promotionXp, "PromotionXP"))
|
||||
_promotionXp = promotionXp;
|
||||
if (Object.TryGetValue(out int xpLostPerMatch, "XPLostPerMatch"))
|
||||
_xpLostPerMatch = xpLostPerMatch;
|
||||
|
||||
if (Object.TryGetValue(out FPackageIndex division, "Division") &&
|
||||
Utils.TryGetPackageIndexExport(division, out UObject div))
|
||||
{
|
||||
var d = new BaseDivision(div, Style);
|
||||
d.ParseForInfo();
|
||||
Preview = d.Preview;
|
||||
Background = d.Background;
|
||||
Border = d.Border;
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName"))
|
||||
DisplayName = displayName.Text;
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
|
||||
DrawToBottom(c, SKTextAlign.Left, $"PromotionXP: {_promotionXp}");
|
||||
DrawToBottom(c, SKTextAlign.Right, $"XPLostPerMatch: {_xpLostPerMatch}");
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
}
|
||||
97
FModel/Creator/Bases/SB/BaseSpellIcon.cs
Normal file
97
FModel/Creator/Bases/SB/BaseSpellIcon.cs
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Engine;
|
||||
using CUE4Parse.UE4.Objects.Core.i18N;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using FModel.Creator.Bases.FN;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator.Bases.SB;
|
||||
|
||||
public class BaseSpellIcon : BaseIcon
|
||||
{
|
||||
private SKBitmap _seriesBackground2;
|
||||
|
||||
private readonly SKPaint _overlayPaint = new()
|
||||
{
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
IsAntialias = true,
|
||||
Color = SKColors.Transparent.WithAlpha(75)
|
||||
};
|
||||
|
||||
public BaseSpellIcon(UObject uObject, EIconStyle style) : base(uObject, style)
|
||||
{
|
||||
Background = new[] { SKColor.Parse("FFFFFF"), SKColor.Parse("636363") };
|
||||
Border = new[] { SKColor.Parse("D0D0D0"), SKColor.Parse("FFFFFF") };
|
||||
Width = Object.ExportType.StartsWith("GCosmeticCard") ? 1536 : 512;
|
||||
Height = Object.ExportType.StartsWith("GCosmeticCard") ? 450 : 512;
|
||||
}
|
||||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FName rarity, "Rarity"))
|
||||
GetRarity(rarity);
|
||||
|
||||
if (Object.TryGetValue(out FSoftObjectPath preview, "IconTexture", "OfferTexture", "PortraitTexture"))
|
||||
Preview = Utils.GetBitmap(preview);
|
||||
else if (Object.TryGetValue(out FPackageIndex icon, "IconTexture", "OfferTexture", "PortraitTexture"))
|
||||
Preview = Utils.GetBitmap(icon);
|
||||
|
||||
if (Object.TryGetValue(out FText displayName, "DisplayName", "Title", "Name"))
|
||||
DisplayName = displayName.Text;
|
||||
if (Object.TryGetValue(out FText description, "Description"))
|
||||
Description = description.Text;
|
||||
|
||||
SeriesBackground = Utils.GetBitmap("g3/Content/UI/Textures/assets/HUDAccentFillBox.HUDAccentFillBox");
|
||||
_seriesBackground2 = Utils.GetBitmap("g3/Content/UI/Textures/assets/store/ItemBGStatic_UIT.ItemBGStatic_UIT");
|
||||
}
|
||||
|
||||
public override SKBitmap[] Draw()
|
||||
{
|
||||
var ret = new SKBitmap(Width, Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
using var c = new SKCanvas(ret);
|
||||
|
||||
DrawBackgrounds(c);
|
||||
DrawBackground(c);
|
||||
DrawPreview(c);
|
||||
DrawTextBackground(c);
|
||||
DrawDisplayName(c);
|
||||
DrawDescription(c);
|
||||
|
||||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void DrawBackgrounds(SKCanvas c)
|
||||
{
|
||||
if (SeriesBackground != null)
|
||||
c.DrawBitmap(SeriesBackground, new SKRect(0, 0, Width, Height), ImagePaint);
|
||||
if (_seriesBackground2 != null)
|
||||
c.DrawBitmap(_seriesBackground2, new SKRect(0, 0, Width, Height), _overlayPaint);
|
||||
|
||||
var x = Margin * (int) 2.5;
|
||||
const int radi = 15;
|
||||
c.DrawCircle(x + radi, x + radi, radi, new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
Shader = SKShader.CreateRadialGradient(
|
||||
new SKPoint(radi, radi), radi * 2 / 5 * 4,
|
||||
Background, SKShaderTileMode.Clamp)
|
||||
});
|
||||
}
|
||||
|
||||
private void GetRarity(FName n)
|
||||
{
|
||||
if (!Utils.TryLoadObject("g3/Content/UI/UIKit/DT_RarityColors.DT_RarityColors", out UDataTable rarity)) return;
|
||||
|
||||
if (rarity.TryGetDataTableRow(n.Text["EXRarity::".Length..], StringComparison.Ordinal, out var row))
|
||||
{
|
||||
if (row.TryGetValue(out FLinearColor[] colors, "Colors"))
|
||||
{
|
||||
Background = new[] { SKColor.Parse(colors[0].Hex), SKColor.Parse(colors[2].Hex) };
|
||||
Border = new[] { SKColor.Parse(colors[1].Hex), SKColor.Parse(colors[0].Hex) };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
228
FModel/Creator/Bases/UCreator.cs
Normal file
228
FModel/Creator/Bases/UCreator.cs
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using FModel.Creator.Bases.FN;
|
||||
using FModel.Framework;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator.Bases;
|
||||
|
||||
public abstract class UCreator
|
||||
{
|
||||
protected UObject Object { get; }
|
||||
protected EIconStyle Style { get; }
|
||||
public SKBitmap DefaultPreview { get; set; }
|
||||
public SKBitmap Preview { get; set; }
|
||||
public SKColor[] Background { get; protected set; }
|
||||
public SKColor[] Border { get; protected set; }
|
||||
public string DisplayName { get; protected set; }
|
||||
public string Description { get; protected set; }
|
||||
public int Margin { get; protected set; }
|
||||
public int Width { get; protected set; }
|
||||
public int Height { get; protected set; }
|
||||
|
||||
public abstract void ParseForInfo();
|
||||
public abstract SKBitmap[] Draw();
|
||||
|
||||
protected UCreator(UObject uObject, EIconStyle style)
|
||||
{
|
||||
DefaultPreview = SKBitmap.Decode(Application.GetResourceStream(new Uri("pack://application:,,,/Resources/T_Placeholder_Item_Image.png"))?.Stream);
|
||||
Background = new[] { SKColor.Parse("5BFD00"), SKColor.Parse("003700") };
|
||||
Border = new[] { SKColor.Parse("1E8500"), SKColor.Parse("5BFD00") };
|
||||
DisplayName = string.Empty;
|
||||
Description = string.Empty;
|
||||
Width = 512;
|
||||
Height = 512;
|
||||
Margin = 2;
|
||||
Object = uObject;
|
||||
Style = style;
|
||||
}
|
||||
|
||||
private const int _STARTER_TEXT_POSITION = 380, _NAME_TEXT_SIZE = 45, _BOTTOM_TEXT_SIZE = 15;
|
||||
protected readonly SKPaint DisplayNamePaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.DisplayName, TextSize = _NAME_TEXT_SIZE,
|
||||
Color = SKColors.White, TextAlign = SKTextAlign.Center
|
||||
};
|
||||
protected readonly SKPaint DescriptionPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Typeface = Utils.Typefaces.Description, TextSize = 13,
|
||||
Color = SKColors.White
|
||||
};
|
||||
protected readonly SKPaint ImagePaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High
|
||||
};
|
||||
private readonly SKPaint _textBackgroundPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High, Color = new SKColor(0, 0, 50, 75)
|
||||
};
|
||||
private readonly SKPaint _shortDescriptionPaint = new()
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Color = SKColors.White
|
||||
};
|
||||
|
||||
public void DrawBackground(SKCanvas c)
|
||||
{
|
||||
// reverse doesn't affect basic rarities
|
||||
if (Background[0] == Background[1]) Background[0] = Border[0];
|
||||
Background[0].ToHsl(out _, out _, out var l1);
|
||||
Background[1].ToHsl(out _, out _, out var l2);
|
||||
var reverse = l1 > l2;
|
||||
|
||||
// border
|
||||
c.DrawRect(new SKRect(0, 0, Width, Height),
|
||||
new SKPaint
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Shader = SKShader.CreateLinearGradient(
|
||||
new SKPoint(Width / 2, Height), new SKPoint(Width, Height / 4), Border, SKShaderTileMode.Clamp)
|
||||
});
|
||||
|
||||
if (this is BaseIcon { SeriesBackground: { } } baseIcon)
|
||||
c.DrawBitmap(baseIcon.SeriesBackground, new SKRect(baseIcon.Margin, baseIcon.Margin, baseIcon.Width - baseIcon.Margin,
|
||||
baseIcon.Height - baseIcon.Margin), ImagePaint);
|
||||
else
|
||||
{
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.Flat:
|
||||
{
|
||||
c.DrawRect(new SKRect(Margin, Margin, Width - Margin, Height - Margin),
|
||||
new SKPaint
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Shader = SKShader.CreateLinearGradient(new SKPoint(Width / 2, Height), new SKPoint(Width, Height / 4),
|
||||
new[] { Background[reverse ? 0 : 1].WithAlpha(150), Border[0] }, SKShaderTileMode.Clamp)
|
||||
});
|
||||
if (string.IsNullOrEmpty(DisplayName) && string.IsNullOrEmpty(Description)) return;
|
||||
|
||||
var pathTop = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
pathTop.MoveTo(Margin, Margin);
|
||||
pathTop.LineTo(Margin + Width / 17 * 10, Margin);
|
||||
pathTop.LineTo(Margin, Margin + Height / 17);
|
||||
pathTop.Close();
|
||||
c.DrawPath(pathTop, new SKPaint
|
||||
{
|
||||
IsAntialias = true,
|
||||
FilterQuality = SKFilterQuality.High,
|
||||
Color = Background[1].WithAlpha(75)
|
||||
});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
c.DrawRect(new SKRect(Margin, Margin, Width - Margin, Height - Margin),
|
||||
new SKPaint
|
||||
{
|
||||
IsAntialias = true, FilterQuality = SKFilterQuality.High,
|
||||
Shader = SKShader.CreateRadialGradient(new SKPoint(Width / 2, Height / 2), Width / 5 * 4,
|
||||
new[] { Background[reverse ? 0 : 1], Background[reverse ? 1 : 0] },
|
||||
SKShaderTileMode.Clamp)
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void DrawPreview(SKCanvas c)
|
||||
=> c.DrawBitmap(Preview ?? DefaultPreview, new SKRect(Margin, Margin, Width - Margin, Height - Margin), ImagePaint);
|
||||
|
||||
protected void DrawTextBackground(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrEmpty(DisplayName) && string.IsNullOrEmpty(Description)) return;
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.Flat:
|
||||
{
|
||||
var pathBottom = new SKPath { FillType = SKPathFillType.EvenOdd };
|
||||
pathBottom.MoveTo(Margin, Height - Margin);
|
||||
pathBottom.LineTo(Margin, Height - Margin - Height / 17 * 2.5f);
|
||||
pathBottom.LineTo(Width - Margin, Height - Margin - Height / 17 * 4.5f);
|
||||
pathBottom.LineTo(Width - Margin, Height - Margin);
|
||||
pathBottom.Close();
|
||||
c.DrawPath(pathBottom, _textBackgroundPaint);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
c.DrawRect(new SKRect(Margin, _STARTER_TEXT_POSITION, Width - Margin, Height - Margin), _textBackgroundPaint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void DrawDisplayName(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(DisplayName)) return;
|
||||
|
||||
while (DisplayNamePaint.MeasureText(DisplayName) > Width - Margin * 2)
|
||||
{
|
||||
DisplayNamePaint.TextSize -= 1;
|
||||
}
|
||||
|
||||
var shaper = new CustomSKShaper(DisplayNamePaint.Typeface);
|
||||
var shapedText = shaper.Shape(DisplayName, DisplayNamePaint);
|
||||
var x = Width / 2f;
|
||||
var y = _STARTER_TEXT_POSITION + _NAME_TEXT_SIZE;
|
||||
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.Flat:
|
||||
{
|
||||
DisplayNamePaint.TextAlign = SKTextAlign.Right;
|
||||
x = Width - Margin * 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
var halfWidth = shapedText.Width / 2f;
|
||||
c.DrawLine(x - halfWidth, 0, x - halfWidth, Width, new SKPaint { Color = SKColors.Blue, IsStroke = true });
|
||||
c.DrawLine(x + halfWidth, 0, x + halfWidth, Width, new SKPaint { Color = SKColors.Blue, IsStroke = true });
|
||||
c.DrawRect(new SKRect(Margin, _STARTER_TEXT_POSITION, Width - Margin, y), new SKPaint { Color = SKColors.Blue, IsStroke = true });
|
||||
#endif
|
||||
|
||||
c.DrawShapedText(shaper, DisplayName, x, y, DisplayNamePaint);
|
||||
}
|
||||
|
||||
protected void DrawDescription(SKCanvas c)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Description)) return;
|
||||
|
||||
var maxLine = string.IsNullOrEmpty(DisplayName) ? 8 : 4;
|
||||
var side = SKTextAlign.Center;
|
||||
switch (Style)
|
||||
{
|
||||
case EIconStyle.Flat:
|
||||
side = SKTextAlign.Right;
|
||||
break;
|
||||
}
|
||||
|
||||
Utils.DrawCenteredMultilineText(c, Description, maxLine, Width, Margin, side,
|
||||
new SKRect(Margin, string.IsNullOrEmpty(DisplayName) ? _STARTER_TEXT_POSITION : _STARTER_TEXT_POSITION + _NAME_TEXT_SIZE, Width - Margin, Height - _BOTTOM_TEXT_SIZE), DescriptionPaint);
|
||||
}
|
||||
|
||||
protected void DrawToBottom(SKCanvas c, SKTextAlign side, string text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text)) return;
|
||||
|
||||
_shortDescriptionPaint.TextAlign = side;
|
||||
_shortDescriptionPaint.TextSize = Utils.Typefaces.Bottom == null ? 15 : 13;
|
||||
switch (side)
|
||||
{
|
||||
case SKTextAlign.Left:
|
||||
_shortDescriptionPaint.Typeface = Utils.Typefaces.Bottom ?? Utils.Typefaces.DisplayName;
|
||||
var shaper = new CustomSKShaper(_shortDescriptionPaint.Typeface);
|
||||
c.DrawShapedText(shaper, text, Margin * 2.5f, Width - Margin * 2.5f, _shortDescriptionPaint);
|
||||
break;
|
||||
case SKTextAlign.Right:
|
||||
_shortDescriptionPaint.Typeface = Utils.Typefaces.Bottom ?? Utils.Typefaces.Default;
|
||||
c.DrawText(text, Width - Margin * 2.5f, Width - Margin * 2.5f, _shortDescriptionPaint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
256
FModel/Creator/CreatorPackage.cs
Normal file
256
FModel/Creator/CreatorPackage.cs
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using FModel.Creator.Bases;
|
||||
using FModel.Creator.Bases.BB;
|
||||
using FModel.Creator.Bases.FN;
|
||||
using FModel.Creator.Bases.MV;
|
||||
using FModel.Creator.Bases.SB;
|
||||
|
||||
namespace FModel.Creator;
|
||||
|
||||
public class CreatorPackage : IDisposable
|
||||
{
|
||||
private UObject _object;
|
||||
private EIconStyle _style;
|
||||
|
||||
public CreatorPackage(UObject uObject, EIconStyle style)
|
||||
{
|
||||
_object = uObject;
|
||||
_style = style;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public UCreator ConstructCreator()
|
||||
{
|
||||
TryConstructCreator(out var creator);
|
||||
return creator;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool TryConstructCreator(out UCreator creator)
|
||||
{
|
||||
switch (_object.ExportType)
|
||||
{
|
||||
// Fortnite
|
||||
case "FortCreativeWeaponMeleeItemDefinition":
|
||||
case "AthenaConsumableEmoteItemDefinition":
|
||||
case "AthenaSkyDiveContrailItemDefinition":
|
||||
case "AthenaLoadingScreenItemDefinition":
|
||||
case "AthenaVictoryPoseItemDefinition":
|
||||
case "AthenaPetCarrierItemDefinition":
|
||||
case "AthenaMusicPackItemDefinition":
|
||||
case "AthenaBattleBusItemDefinition":
|
||||
case "AthenaCharacterItemDefinition":
|
||||
case "AthenaMapMarkerItemDefinition":
|
||||
case "AthenaBackpackItemDefinition":
|
||||
case "AthenaPickaxeItemDefinition":
|
||||
case "AthenaGadgetItemDefinition":
|
||||
case "AthenaGliderItemDefinition":
|
||||
case "AthenaSprayItemDefinition":
|
||||
case "AthenaDanceItemDefinition":
|
||||
case "AthenaEmojiItemDefinition":
|
||||
case "AthenaItemWrapDefinition":
|
||||
case "AthenaToyItemDefinition":
|
||||
case "FortHeroType":
|
||||
case "FortTokenType":
|
||||
case "FortAbilityKit":
|
||||
case "FortWorkerType":
|
||||
case "RewardGraphToken":
|
||||
case "JunoKnowledgeBundle":
|
||||
case "FortBannerTokenType":
|
||||
case "FortVariantTokenType":
|
||||
case "FortDecoItemDefinition":
|
||||
case "FortStatItemDefinition":
|
||||
case "FortAmmoItemDefinition":
|
||||
case "FortEmoteItemDefinition":
|
||||
case "FortBadgeItemDefinition":
|
||||
case "SparksMicItemDefinition":
|
||||
case "FortAwardItemDefinition":
|
||||
case "FortStackItemDefinition":
|
||||
case "FortWorldItemDefinition":
|
||||
case "SparksAuraItemDefinition":
|
||||
case "SparksDrumItemDefinition":
|
||||
case "SparksBassItemDefinition":
|
||||
case "FortGadgetItemDefinition":
|
||||
case "AthenaCharmItemDefinition":
|
||||
case "FortPlaysetItemDefinition":
|
||||
case "FortGiftBoxItemDefinition":
|
||||
case "FortOutpostItemDefinition":
|
||||
case "FortVehicleItemDefinition":
|
||||
case "FortMissionItemDefinition":
|
||||
case "FortAccountItemDefinition":
|
||||
case "SparksGuitarItemDefinition":
|
||||
case "FortCardPackItemDefinition":
|
||||
case "FortDefenderItemDefinition":
|
||||
case "FortCurrencyItemDefinition":
|
||||
case "FortResourceItemDefinition":
|
||||
case "FortBackpackItemDefinition":
|
||||
case "FortEventQuestMapDataAsset":
|
||||
case "FortBuildingItemDefinition":
|
||||
case "FortWeaponModItemDefinition":
|
||||
case "FortCodeTokenItemDefinition":
|
||||
case "FortSchematicItemDefinition":
|
||||
case "FortAlterableItemDefinition":
|
||||
case "SparksKeyboardItemDefinition":
|
||||
case "FortWorldMultiItemDefinition":
|
||||
case "FortAlterationItemDefinition":
|
||||
case "FortExpeditionItemDefinition":
|
||||
case "FortIngredientItemDefinition":
|
||||
case "FortConsumableItemDefinition":
|
||||
case "StWFortAccoladeItemDefinition":
|
||||
case "FortAccountBuffItemDefinition":
|
||||
case "FortWeaponMeleeItemDefinition":
|
||||
case "FortPlayerPerksItemDefinition":
|
||||
case "FortPlaysetPropItemDefinition":
|
||||
case "FortPrerollDataItemDefinition":
|
||||
case "JunoRecipeBundleItemDefinition":
|
||||
case "FortHomebaseNodeItemDefinition":
|
||||
case "FortNeverPersistItemDefinition":
|
||||
case "FortPlayerAugmentItemDefinition":
|
||||
case "FortSmartBuildingItemDefinition":
|
||||
case "FortGiftBoxUnlockItemDefinition":
|
||||
case "FortWeaponModItemDefinitionOptic":
|
||||
case "RadioContentSourceItemDefinition":
|
||||
case "FortPlaysetGrenadeItemDefinition":
|
||||
case "JunoWeaponCreatureItemDefinition":
|
||||
case "FortEventDependentItemDefinition":
|
||||
case "FortPersonalVehicleItemDefinition":
|
||||
case "FortGameplayModifierItemDefinition":
|
||||
case "FortHardcoreModifierItemDefinition":
|
||||
case "FortWeaponModItemDefinitionMagazine":
|
||||
case "FortConsumableAccountItemDefinition":
|
||||
case "FortConversionControlItemDefinition":
|
||||
case "FortAccountBuffCreditItemDefinition":
|
||||
case "JunoBuildInstructionsItemDefinition":
|
||||
case "FortCharacterCosmeticItemDefinition":
|
||||
case "JunoBuildingSetAccountItemDefinition":
|
||||
case "FortEventCurrencyItemDefinitionRedir":
|
||||
case "FortPersistentResourceItemDefinition":
|
||||
case "FortWeaponMeleeOffhandItemDefinition":
|
||||
case "FortHomebaseBannerIconItemDefinition":
|
||||
case "FortVehicleCosmeticsVariantTokenType":
|
||||
case "JunoBuildingPropAccountItemDefinition":
|
||||
case "FortCampaignHeroLoadoutItemDefinition":
|
||||
case "FortConditionalResourceItemDefinition":
|
||||
case "FortChallengeBundleScheduleDefinition":
|
||||
case "FortWeaponMeleeDualWieldItemDefinition":
|
||||
case "FortDailyRewardScheduleTokenDefinition":
|
||||
case "FortCreativeWeaponRangedItemDefinition":
|
||||
case "FortVehicleCosmeticsItemDefinition_Body":
|
||||
case "FortVehicleCosmeticsItemDefinition_Skin":
|
||||
case "FortVehicleCosmeticsItemDefinition_Wheel":
|
||||
case "FortCreativeRealEstatePlotItemDefinition":
|
||||
case "FortDeployableBaseCloudSaveItemDefinition":
|
||||
case "FortVehicleCosmeticsItemDefinition_Booster":
|
||||
case "AthenaDanceItemDefinition_AdHocSquadsJoin_C":
|
||||
case "FortVehicleCosmeticsItemDefinition_DriftSmoke":
|
||||
case "FortVehicleCosmeticsItemDefinition_EngineAudio":
|
||||
creator = _style switch
|
||||
{
|
||||
EIconStyle.Cataba => new BaseCommunity(_object, _style, "Cataba"),
|
||||
_ => new BaseIcon(_object, _style)
|
||||
};
|
||||
return true;
|
||||
case "JunoAthenaCharacterItemOverrideDefinition":
|
||||
case "JunoAthenaDanceItemOverrideDefinition":
|
||||
creator = new BaseJuno(_object, _style);
|
||||
return true;
|
||||
case "FortTandemCharacterData":
|
||||
creator = new BaseTandem(_object, _style);
|
||||
return true;
|
||||
case "FortTrapItemDefinition":
|
||||
case "FortSpyTechItemDefinition":
|
||||
case "FortAccoladeItemDefinition":
|
||||
case "FortContextTrapItemDefinition":
|
||||
case "FortWeaponRangedItemDefinition":
|
||||
case "Daybreak_LevelExitVehicle_PartItemDefinition_C":
|
||||
creator = new BaseIconStats(_object, _style);
|
||||
return true;
|
||||
case "FortItemSeriesDefinition":
|
||||
creator = new BaseSeries(_object, _style);
|
||||
return true;
|
||||
case "MaterialInstanceConstant"
|
||||
when _object.Owner != null &&
|
||||
(_object.Owner.Name.Contains("/MI_OfferImages/", StringComparison.OrdinalIgnoreCase) ||
|
||||
_object.Owner.Name.EndsWith($"/RenderSwitch_Materials/{_object.Name}", StringComparison.OrdinalIgnoreCase) ||
|
||||
_object.Owner.Name.EndsWith($"/MI_BPTile/{_object.Name}", StringComparison.OrdinalIgnoreCase)):
|
||||
creator = new BaseMaterialInstance(_object, _style);
|
||||
return true;
|
||||
case "AthenaItemShopOfferDisplayData":
|
||||
creator = new BaseOfferDisplayData(_object, _style);
|
||||
return true;
|
||||
case "FortMtxOfferData":
|
||||
creator = new BaseMtxOffer(_object, _style);
|
||||
return true;
|
||||
case "FortPlaylistAthena":
|
||||
creator = new BasePlaylist(_object, _style);
|
||||
return true;
|
||||
case "FortFeatItemDefinition":
|
||||
case "FortQuestItemDefinition":
|
||||
case "FortQuestItemDefinition_Athena":
|
||||
case "FortQuestItemDefinition_Campaign":
|
||||
case "AthenaDailyQuestDefinition":
|
||||
case "FortUrgentQuestItemDefinition":
|
||||
creator = new Bases.FN.BaseQuest(_object, _style);
|
||||
return true;
|
||||
case "FortCompendiumItemDefinition":
|
||||
case "FortChallengeBundleItemDefinition":
|
||||
creator = new BaseBundle(_object, _style);
|
||||
return true;
|
||||
// case "AthenaSeasonItemDefinition":
|
||||
// creator = new BaseSeason(_object, _style);
|
||||
// return true;
|
||||
case "FortItemAccessTokenType":
|
||||
creator = new BaseItemAccessToken(_object, _style);
|
||||
return true;
|
||||
case "FortCreativeOption":
|
||||
case "PlaylistUserOptionEnum":
|
||||
case "PlaylistUserOptionBool":
|
||||
case "PlaylistUserOptionString":
|
||||
case "PlaylistUserOptionIntEnum":
|
||||
case "PlaylistUserOptionIntRange":
|
||||
case "PlaylistUserOptionColorEnum":
|
||||
case "PlaylistUserOptionFloatEnum":
|
||||
case "PlaylistUserOptionFloatRange":
|
||||
case "PlaylistUserTintedIconIntEnum":
|
||||
case "PlaylistUserOptionPrimaryAsset":
|
||||
case "PlaylistUserOptionCollisionProfileEnum":
|
||||
creator = new BaseUserControl(_object, _style);
|
||||
return true;
|
||||
// PandaGame
|
||||
case "CharacterData":
|
||||
creator = new BaseFighter(_object, _style);
|
||||
return true;
|
||||
case "PerkGroup":
|
||||
creator = new BasePerkGroup(_object, _style);
|
||||
return true;
|
||||
case "StatTrackingBundleData":
|
||||
case "HydraSyncedDataAsset":
|
||||
case "AnnouncerPackData":
|
||||
case "CharacterGiftData":
|
||||
case "ProfileIconData":
|
||||
case "RingOutVfxData":
|
||||
case "BannerData":
|
||||
case "EmoteData":
|
||||
case "TauntData":
|
||||
case "SkinData":
|
||||
case "PerkData":
|
||||
creator = new BasePandaIcon(_object, _style);
|
||||
return true;
|
||||
case "QuestData":
|
||||
creator = new Bases.MV.BaseQuest(_object, _style);
|
||||
return true;
|
||||
default:
|
||||
creator = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString() => $"{_object.ExportType} | {_style}";
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_object = null;
|
||||
}
|
||||
}
|
||||
199
FModel/Creator/Typefaces.cs
Normal file
199
FModel/Creator/Typefaces.cs
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using FModel.Settings;
|
||||
using FModel.ViewModels;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace FModel.Creator;
|
||||
|
||||
public class Typefaces
|
||||
{
|
||||
private readonly Uri _BURBANK_BIG_CONDENSED_BOLD = new("pack://application:,,,/Resources/BurbankBigCondensed-Bold.ttf");
|
||||
private const string _EXT = ".ufont";
|
||||
|
||||
// FortniteGame
|
||||
private const string _FORTNITE_BASE_PATH = "/Game/UI/Foundation/Fonts/";
|
||||
private const string _ASIA_ERINM = "AsiaERINM"; // korean fortnite
|
||||
private const string _BURBANK_BIG_CONDENSED_BLACK = "BurbankBigCondensed-Black"; // russian
|
||||
private const string _BURBANK_BIG_REGULAR_BLACK = "BurbankBigRegular-Black";
|
||||
private const string _BURBANK_BIG_REGULAR_BOLD = "BurbankBigRegular-Bold"; // official fortnite ig
|
||||
private const string _BURBANK_SMALL_MEDIUM = "BurbankSmall-Medium";
|
||||
private const string _DROID_SANS_FORTNITE_SUBSET = "DroidSans-Fortnite-Subset";
|
||||
private const string _NOTO_COLOR_EMOJI = "NotoColorEmoji";
|
||||
private const string _NOTO_SANS_BOLD = "NotoSans-Bold";
|
||||
private const string _NOTO_SANS_FORTNITE_BOLD = "NotoSans-Fortnite-Bold";
|
||||
private const string _NOTO_SANS_FORTNITE_ITALIC = "NotoSans-Fortnite-Italic";
|
||||
private const string _NOTO_SANS_FORTNITE_REGULAR = "NotoSans-Fortnite-Regular";
|
||||
private const string _NOTO_SANS_ITALIC = "NotoSans-Italic";
|
||||
private const string _NOTO_SANS_REGULAR = "NotoSans-Regular";
|
||||
private const string _NOTO_SANS_ARABIC_BLACK = "NotoSansArabic-Black"; // arabic fortnite
|
||||
private const string _NOTO_SANS_ARABIC_BOLD = "NotoSansArabic-Bold";
|
||||
private const string _NOTO_SANS_ARABIC_REGULAR = "NotoSansArabic-Regular";
|
||||
private const string _NOTO_SANS_JP_BOLD = "NotoSansJP-Bold"; // japanese fortnite
|
||||
private const string _NOTO_SANS_KR_REGULAR = "NotoSansKR-Regular";
|
||||
private const string _NOTO_SANS_SC_BLACK = "NotoSansSC-Black"; // simplified chinese fortnite
|
||||
private const string _NOTO_SANS_SC_REGULAR = "NotoSansSC-Regular";
|
||||
private const string _NOTO_SANS_TC_BLACK = "NotoSansTC-Black"; // traditional chinese fortnite
|
||||
private const string _NOTO_SANS_TC_REGULAR = "NotoSansTC-Regular";
|
||||
private const string _BURBANK_SMALL_BLACK = "burbanksmall-black";
|
||||
private const string _BURBANK_SMALL_BOLD = "burbanksmall-bold";
|
||||
|
||||
// PandaGame
|
||||
private const string _PANDAGAME_BASE_PATH = "/Game/Panda_Main/UI/Fonts/";
|
||||
private const string _NORMS_STD_CONDENSED_EXTRABOLD_ITALIC = "Norms/TT_Norms_Std_Condensed_ExtraBold_Italic";
|
||||
private const string _NORMS_PRO_EXTRABOLD_ITALIC = "Norms/TT_Norms_Pro_ExtraBold_Italic";
|
||||
private const string _NORMS_STD_CONDENSED_MEDIUM = "Norms/TT_Norms_Std_Condensed_Medium";
|
||||
private const string _XIANGHEHEI_SC_PRO_BLACK = "XiangHeHei_SC/MXiangHeHeiSCPro-Black";
|
||||
private const string _XIANGHEHEI_SC_PRO_HEAVY = "XiangHeHei_SC/MXiangHeHeiSCPro-Heavy";
|
||||
|
||||
private readonly CUE4ParseViewModel _viewModel;
|
||||
|
||||
public readonly SKTypeface Default; // used as a fallback font for all untranslated strings (item source, ...)
|
||||
public readonly SKTypeface DisplayName;
|
||||
public readonly SKTypeface Description;
|
||||
public readonly SKTypeface Bottom; // must be null for non-latin base languages
|
||||
public readonly SKTypeface Bundle;
|
||||
public readonly SKTypeface BundleNumber;
|
||||
public readonly SKTypeface TandemDisplayName;
|
||||
public readonly SKTypeface TandemGenDescription;
|
||||
public readonly SKTypeface TandemAddDescription;
|
||||
|
||||
public Typefaces(CUE4ParseViewModel viewModel)
|
||||
{
|
||||
_viewModel = viewModel;
|
||||
var language = UserSettings.Default.AssetLanguage;
|
||||
|
||||
Default = SKTypeface.FromStream(Application.GetResourceStream(_BURBANK_BIG_CONDENSED_BOLD)?.Stream);
|
||||
|
||||
switch (viewModel.Provider.InternalGameName.ToUpperInvariant())
|
||||
{
|
||||
case "FORTNITEGAME":
|
||||
{
|
||||
DisplayName = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => _ASIA_ERINM,
|
||||
ELanguage.Russian => _BURBANK_BIG_CONDENSED_BLACK,
|
||||
ELanguage.Japanese => _NOTO_SANS_JP_BOLD,
|
||||
ELanguage.Arabic => _NOTO_SANS_ARABIC_BLACK,
|
||||
ELanguage.TraditionalChinese => _NOTO_SANS_TC_BLACK,
|
||||
ELanguage.Chinese => _NOTO_SANS_SC_BLACK,
|
||||
_ => string.Empty
|
||||
} + _EXT);
|
||||
|
||||
Description = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => _NOTO_SANS_KR_REGULAR,
|
||||
ELanguage.Japanese => _NOTO_SANS_JP_BOLD,
|
||||
ELanguage.Arabic => _NOTO_SANS_ARABIC_REGULAR,
|
||||
ELanguage.TraditionalChinese => _NOTO_SANS_TC_REGULAR,
|
||||
ELanguage.Chinese => _NOTO_SANS_SC_REGULAR,
|
||||
_ => _NOTO_SANS_REGULAR
|
||||
} + _EXT);
|
||||
|
||||
Bottom = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => string.Empty,
|
||||
ELanguage.Japanese => string.Empty,
|
||||
ELanguage.Arabic => string.Empty,
|
||||
ELanguage.TraditionalChinese => string.Empty,
|
||||
ELanguage.Chinese => string.Empty,
|
||||
_ => _BURBANK_SMALL_BOLD
|
||||
} + _EXT, true);
|
||||
|
||||
BundleNumber = OnTheFly(_FORTNITE_BASE_PATH + _BURBANK_BIG_CONDENSED_BLACK + _EXT);
|
||||
|
||||
Bundle = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => _ASIA_ERINM,
|
||||
ELanguage.Russian => _BURBANK_BIG_CONDENSED_BLACK,
|
||||
ELanguage.Japanese => _NOTO_SANS_JP_BOLD,
|
||||
ELanguage.Arabic => _NOTO_SANS_ARABIC_BLACK,
|
||||
ELanguage.TraditionalChinese => _NOTO_SANS_TC_BLACK,
|
||||
ELanguage.Chinese => _NOTO_SANS_SC_BLACK,
|
||||
_ => string.Empty
|
||||
} + _EXT, true) ?? BundleNumber;
|
||||
|
||||
TandemDisplayName = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => _ASIA_ERINM,
|
||||
ELanguage.Russian => _BURBANK_BIG_CONDENSED_BLACK,
|
||||
ELanguage.Japanese => _NOTO_SANS_JP_BOLD,
|
||||
ELanguage.Arabic => _NOTO_SANS_ARABIC_BLACK,
|
||||
ELanguage.TraditionalChinese => _NOTO_SANS_TC_BLACK,
|
||||
ELanguage.Chinese => _NOTO_SANS_SC_BLACK,
|
||||
_ => _BURBANK_BIG_REGULAR_BLACK
|
||||
} + _EXT);
|
||||
|
||||
TandemGenDescription = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => _ASIA_ERINM,
|
||||
ELanguage.Japanese => _NOTO_SANS_JP_BOLD,
|
||||
ELanguage.Arabic => _NOTO_SANS_ARABIC_BLACK,
|
||||
ELanguage.TraditionalChinese => _NOTO_SANS_TC_BLACK,
|
||||
ELanguage.Chinese => _NOTO_SANS_SC_BLACK,
|
||||
_ => _BURBANK_SMALL_BLACK
|
||||
} + _EXT);
|
||||
|
||||
TandemAddDescription = OnTheFly(_FORTNITE_BASE_PATH +
|
||||
language switch
|
||||
{
|
||||
ELanguage.Korean => _ASIA_ERINM,
|
||||
ELanguage.Japanese => _NOTO_SANS_JP_BOLD,
|
||||
ELanguage.Arabic => _NOTO_SANS_ARABIC_BLACK,
|
||||
ELanguage.TraditionalChinese => _NOTO_SANS_TC_BLACK,
|
||||
ELanguage.Chinese => _NOTO_SANS_SC_BLACK,
|
||||
_ => _BURBANK_SMALL_BOLD
|
||||
} + _EXT);
|
||||
break;
|
||||
}
|
||||
case "MULTIVERSUS":
|
||||
{
|
||||
DisplayName = OnTheFly(_PANDAGAME_BASE_PATH + language switch
|
||||
{
|
||||
ELanguage.Chinese => _XIANGHEHEI_SC_PRO_HEAVY,
|
||||
_ => _NORMS_PRO_EXTRABOLD_ITALIC
|
||||
} + _EXT);
|
||||
|
||||
Description = OnTheFly(_PANDAGAME_BASE_PATH + language switch
|
||||
{
|
||||
ELanguage.Chinese => _XIANGHEHEI_SC_PRO_BLACK,
|
||||
_ => _NORMS_STD_CONDENSED_MEDIUM
|
||||
} + _EXT);
|
||||
|
||||
TandemDisplayName = OnTheFly(_PANDAGAME_BASE_PATH + language switch
|
||||
{
|
||||
ELanguage.Chinese => _XIANGHEHEI_SC_PRO_BLACK,
|
||||
_ => _NORMS_STD_CONDENSED_EXTRABOLD_ITALIC
|
||||
} + _EXT);
|
||||
|
||||
TandemGenDescription = OnTheFly(_PANDAGAME_BASE_PATH + language switch
|
||||
{
|
||||
ELanguage.Chinese => _XIANGHEHEI_SC_PRO_HEAVY,
|
||||
_ => _NORMS_STD_CONDENSED_MEDIUM
|
||||
} + _EXT);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DisplayName = Default;
|
||||
Description = Default;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SKTypeface OnTheFly(string path, bool fallback = false)
|
||||
{
|
||||
if (!_viewModel.Provider.TrySaveAsset(path, out var data)) return fallback ? null : Default;
|
||||
var m = new MemoryStream(data) { Position = 0 };
|
||||
return SKTypeface.FromStream(m);
|
||||
}
|
||||
}
|
||||
420
FModel/Creator/Utils.cs
Normal file
420
FModel/Creator/Utils.cs
Normal file
|
|
@ -0,0 +1,420 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Material;
|
||||
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||||
using CUE4Parse.UE4.Objects.UObject;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using CUE4Parse_Conversion.Textures;
|
||||
using CUE4Parse.UE4.Assets.Objects;
|
||||
using FModel.Framework;
|
||||
using FModel.Extensions;
|
||||
using FModel.Services;
|
||||
using FModel.Settings;
|
||||
using FModel.ViewModels;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
|
||||
namespace FModel.Creator;
|
||||
|
||||
public static class Utils
|
||||
{
|
||||
private static ApplicationViewModel _applicationView => ApplicationService.ApplicationView;
|
||||
private static readonly Regex _htmlRegex = new("<.*?>");
|
||||
public static Typefaces Typefaces;
|
||||
|
||||
public static string RemoveHtmlTags(string s)
|
||||
{
|
||||
var match = _htmlRegex.Match(s);
|
||||
while (match.Success)
|
||||
{
|
||||
s = s.Replace(match.Value, string.Empty);
|
||||
match = match.NextMatch();
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
public static bool TryGetDisplayAsset(UObject uObject, out SKBitmap preview)
|
||||
{
|
||||
if (uObject.TryGetValue(out FSoftObjectPath sidePanelIcon, "SidePanelIcon"))
|
||||
{
|
||||
preview = GetBitmap(sidePanelIcon);
|
||||
return preview != null;
|
||||
}
|
||||
|
||||
var path = $"/Game/Catalog/MI_OfferImages/MI_{uObject.Name.Replace("Athena_Commando_", string.Empty)}";
|
||||
if (!TryLoadObject(path, out UMaterialInstanceConstant material)) // non-obfuscated item definition
|
||||
{
|
||||
if (!TryLoadObject($"{path[..path.LastIndexOf('_')]}_{path.SubstringAfterLast('_').ToLower()}", out material)) // Try to get MI with lowercase obfuscation
|
||||
TryLoadObject(path[..path.LastIndexOf('_')], out material); // hopefully gets obfuscated item definition
|
||||
}
|
||||
|
||||
preview = GetBitmap(material);
|
||||
return preview != null;
|
||||
}
|
||||
|
||||
public static SKBitmap GetBitmap(FPackageIndex packageIndex)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (!TryGetPackageIndexExport(packageIndex, out UObject export)) return null;
|
||||
switch (export)
|
||||
{
|
||||
case UTexture2D texture:
|
||||
return GetBitmap(texture);
|
||||
case UMaterialInstanceConstant material:
|
||||
return GetBitmap(material);
|
||||
default:
|
||||
{
|
||||
if (export.TryGetValue(out FInstancedStruct[] dataList, "DataList")) return GetBitmap(dataList);
|
||||
if (export.TryGetValue(out FSoftObjectPath previewImage, "LargePreviewImage", "SmallPreviewImage")) return GetBitmap(previewImage);
|
||||
if (export.TryGetValue(out string largePreview, "LargePreviewImage")) return GetBitmap(largePreview);
|
||||
if (export.TryGetValue(out FPackageIndex smallPreview, "SmallPreviewImage"))
|
||||
{
|
||||
packageIndex = smallPreview;
|
||||
continue;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static SKBitmap GetBitmap(FInstancedStruct[] structs)
|
||||
{
|
||||
if (structs.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FSoftObjectPath p, "LargeIcon") == true && !p.AssetPathName.IsNone) is { NonConstStruct: not null } isl)
|
||||
{
|
||||
return GetBitmap(isl.NonConstStruct.Get<FSoftObjectPath>("LargeIcon"));
|
||||
}
|
||||
|
||||
if (structs.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FSoftObjectPath p, "Icon") == true && !p.AssetPathName.IsNone) is { NonConstStruct: not null } isi)
|
||||
{
|
||||
return GetBitmap(isi.NonConstStruct.Get<FSoftObjectPath>("Icon"));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static SKBitmap GetBitmap(UMaterialInstanceConstant material)
|
||||
{
|
||||
if (material == null) return null;
|
||||
foreach (var textureParameter in material.TextureParameterValues)
|
||||
{
|
||||
if (!textureParameter.ParameterValue.TryLoad<UTexture2D>(out var texture)) continue;
|
||||
switch (textureParameter.ParameterInfo.Name.Text)
|
||||
{
|
||||
case "MainTex":
|
||||
case "Texture":
|
||||
case "TextureA":
|
||||
case "TextureB":
|
||||
case "OfferImage":
|
||||
case "KeyArtTexture":
|
||||
case "NPC-Portrait":
|
||||
{
|
||||
return GetBitmap(texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static SKBitmap GetB64Bitmap(string b64) => SKBitmap.Decode(new MemoryStream(Convert.FromBase64String(b64)) { Position = 0 });
|
||||
public static SKBitmap GetBitmap(FSoftObjectPath softObjectPath) => GetBitmap(softObjectPath.AssetPathName.Text);
|
||||
public static SKBitmap GetBitmap(string fullPath) => TryLoadObject(fullPath, out UTexture2D texture) ? GetBitmap(texture) : null;
|
||||
public static SKBitmap GetBitmap(UTexture2D texture) => texture.Decode(UserSettings.Default.CurrentDir.TexturePlatform);
|
||||
public static SKBitmap GetBitmap(byte[] data) => SKBitmap.Decode(data);
|
||||
|
||||
public static SKBitmap ResizeWithRatio(this SKBitmap me, double width, double height)
|
||||
{
|
||||
var ratioX = width / me.Width;
|
||||
var ratioY = height / me.Height;
|
||||
return ResizeWithRatio(me, ratioX < ratioY ? ratioX : ratioY);
|
||||
}
|
||||
public static SKBitmap ResizeWithRatio(this SKBitmap me, double ratio)
|
||||
{
|
||||
return me.Resize(Convert.ToInt32(me.Width * ratio), Convert.ToInt32(me.Height * ratio));
|
||||
}
|
||||
|
||||
public static SKBitmap Resize(this SKBitmap me, int size) => me.Resize(size, size);
|
||||
public static SKBitmap Resize(this SKBitmap me, int width, int height)
|
||||
{
|
||||
var bmp = new SKBitmap(new SKImageInfo(width, height), SKBitmapAllocFlags.ZeroPixels);
|
||||
using var pixmap = bmp.PeekPixels();
|
||||
me.ScalePixels(pixmap, SKFilterQuality.Medium);
|
||||
return bmp;
|
||||
}
|
||||
|
||||
public static bool TryGetPackageIndexExport<T>(FPackageIndex packageIndex, out T export) where T : UObject
|
||||
{
|
||||
return packageIndex.TryLoad(out export);
|
||||
}
|
||||
|
||||
// fullpath must be either without any extension or with the export objectname
|
||||
public static bool TryLoadObject<T>(string fullPath, out T export) where T : UObject
|
||||
{
|
||||
return _applicationView.CUE4Parse.Provider.TryLoadObject(fullPath, out export);
|
||||
}
|
||||
|
||||
public static IEnumerable<UObject> LoadExports(string packagePath)
|
||||
{
|
||||
return _applicationView.CUE4Parse.Provider.LoadAllObjects(packagePath);
|
||||
}
|
||||
|
||||
public static float GetMaxFontSize(double sectorSize, SKTypeface typeface, string text, float degreeOfCertainty = 1f, float maxFont = 100f)
|
||||
{
|
||||
var max = maxFont;
|
||||
var min = 0f;
|
||||
var last = -1f;
|
||||
float value;
|
||||
while (true)
|
||||
{
|
||||
value = min + ((max - min) / 2);
|
||||
using (SKFont ft = new SKFont(typeface, value))
|
||||
using (SKPaint paint = new SKPaint(ft))
|
||||
{
|
||||
if (paint.MeasureText(text) > sectorSize)
|
||||
{
|
||||
last = value;
|
||||
max = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
min = value;
|
||||
if (Math.Abs(last - value) <= degreeOfCertainty)
|
||||
return last;
|
||||
|
||||
last = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetLocalizedResource(string @namespace, string key, string defaultValue)
|
||||
{
|
||||
return _applicationView.CUE4Parse.Provider.GetLocalizedString(@namespace, key, defaultValue);
|
||||
}
|
||||
public static string GetLocalizedResource<T>(T @enum) where T : Enum
|
||||
{
|
||||
var resource = _applicationView.CUE4Parse.Provider.GetLocalizedString("", @enum.GetDescription(), @enum.ToString());
|
||||
return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(resource.ToLower());
|
||||
}
|
||||
|
||||
public static string GetFullPath(string partialPath)
|
||||
{
|
||||
var regex = new Regex(partialPath, RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
foreach (var path in _applicationView.CUE4Parse.Provider.Files.Keys)
|
||||
{
|
||||
if (regex.IsMatch(path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public static void DrawCenteredMultilineText(SKCanvas c, string text, int maxCount, int size, int margin, SKTextAlign side, SKRect area, SKPaint paint)
|
||||
{
|
||||
var lineHeight = paint.TextSize * 1.2f;
|
||||
var lines = SplitLines(text, paint, area.Width - margin);
|
||||
|
||||
#if DEBUG
|
||||
c.DrawRect(new SKRect(area.Left, area.Top, area.Right, area.Bottom), new SKPaint { Color = SKColors.Red, IsStroke = true });
|
||||
#endif
|
||||
|
||||
if (lines == null) return;
|
||||
if (lines.Count <= maxCount) maxCount = lines.Count;
|
||||
var height = maxCount * lineHeight;
|
||||
var y = area.MidY - height / 2;
|
||||
|
||||
var shaper = new CustomSKShaper(paint.Typeface);
|
||||
for (var i = 0; i < maxCount; i++)
|
||||
{
|
||||
var line = lines[i];
|
||||
if (line == null) continue;
|
||||
|
||||
var lineText = line.Trim();
|
||||
var shapedText = shaper.Shape(lineText, paint);
|
||||
|
||||
y += lineHeight;
|
||||
var x = side switch
|
||||
{
|
||||
SKTextAlign.Center => area.MidX - shapedText.Width / 2,
|
||||
SKTextAlign.Right => size - margin - shapedText.Width,
|
||||
SKTextAlign.Left => margin,
|
||||
_ => throw new NotImplementedException()
|
||||
};
|
||||
|
||||
c.DrawShapedText(shaper, lineText, x, y, paint);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DrawMultilineText(SKCanvas c, string text, int size, int margin, SKTextAlign side, SKRect area, SKPaint paint, out float yPos)
|
||||
{
|
||||
yPos = area.Top;
|
||||
var lineHeight = paint.TextSize * 1.2f;
|
||||
var lines = SplitLines(text, paint, area.Width);
|
||||
if (lines == null) return;
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
var fontSize = GetMaxFontSize(area.Width, paint.Typeface, line);
|
||||
if (paint.TextSize > fontSize) // if the text is not fitting in the line decrease the font size (CKJ languages)
|
||||
{
|
||||
paint.TextSize = fontSize;
|
||||
lineHeight = paint.TextSize * 1.2f;
|
||||
}
|
||||
|
||||
if (line == null) continue;
|
||||
var lineText = line.Trim();
|
||||
var shaper = new CustomSKShaper(paint.Typeface);
|
||||
var shapedText = shaper.Shape(lineText, paint);
|
||||
|
||||
var x = side switch
|
||||
{
|
||||
SKTextAlign.Center => area.MidX - shapedText.Width / 2,
|
||||
SKTextAlign.Right => size - margin - shapedText.Width,
|
||||
SKTextAlign.Left => area.Left,
|
||||
_ => throw new NotImplementedException()
|
||||
};
|
||||
|
||||
c.DrawShapedText(shaper, lineText, x, yPos, paint);
|
||||
yPos += lineHeight;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
c.DrawRect(new SKRect(area.Left, area.Top - paint.TextSize, area.Right, yPos), new SKPaint { Color = SKColors.Red, IsStroke = true });
|
||||
#endif
|
||||
}
|
||||
|
||||
#region Chinese, Korean and Japanese text split
|
||||
|
||||
// https://github.com/YoungjaeKim/mikan.sharp/blob/master/MikanSharp/Mikan/Mikan.cs
|
||||
|
||||
static string joshi = @"(でなければ|について|かしら|くらい|けれど|なのか|ばかり|ながら|ことよ|こそ|こと|さえ|しか|した|たり|だけ|だに|だの|つつ|ても|てよ|でも|とも|から|など|なり|ので|のに|ほど|まで|もの|やら|より|って|で|と|な|に|ね|の|も|は|ば|へ|や|わ|を|か|が|さ|し|ぞ|て)";
|
||||
static string keywords = @"(\ |[a-zA-Z0-9]+\.[a-z]{2,}|[一-龠々〆ヵヶゝ]+|[ぁ-んゝ]+|[ァ-ヴー]+|[a-zA-Z0-9]+|[a-zA-Z0-9]+)";
|
||||
static string periods = @"([\.\,。、!\!?\?]+)$";
|
||||
static string bracketsBegin = @"([〈《「『「((\[【〔〚〖〘❮❬❪❨(<{❲❰{❴])";
|
||||
static string bracketsEnd = @"([〉》」』」))\]】〕〗〙〛}>\)❩❫❭❯❱❳❵}])";
|
||||
|
||||
public static string[] SplitCKJText(string str)
|
||||
{
|
||||
var line1 = Regex.Split(str, keywords).ToList();
|
||||
var line2 = line1.SelectMany((o, _) => Regex.Split(o, joshi)).ToList();
|
||||
var line3 = line2.SelectMany((o, _) => Regex.Split(o, bracketsBegin)).ToList();
|
||||
var line4 = line3.SelectMany((o, _) => Regex.Split(o, bracketsEnd)).ToList();
|
||||
var words = line4.Where(o => !string.IsNullOrEmpty(o)).ToList();
|
||||
|
||||
var prevType = string.Empty;
|
||||
var prevWord = string.Empty;
|
||||
List<string> result = new List<string>();
|
||||
|
||||
words.ForEach(word =>
|
||||
{
|
||||
var token = Regex.IsMatch(word, periods) || Regex.IsMatch(word, joshi);
|
||||
|
||||
if (Regex.IsMatch(word, bracketsBegin))
|
||||
{
|
||||
prevType = "braketBegin";
|
||||
prevWord = word;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Regex.IsMatch(word, bracketsEnd))
|
||||
{
|
||||
result[result.Count - 1] += word;
|
||||
prevType = "braketEnd";
|
||||
prevWord = word;
|
||||
return;
|
||||
}
|
||||
|
||||
if (prevType == "braketBegin")
|
||||
{
|
||||
word = prevWord + word;
|
||||
prevWord = string.Empty;
|
||||
prevType = string.Empty;
|
||||
}
|
||||
|
||||
// すでに文字が入っている上で助詞が続く場合は結合する
|
||||
if (result.Count > 0 && token && prevType == string.Empty)
|
||||
{
|
||||
result[result.Count - 1] += word;
|
||||
prevType = "keyword";
|
||||
prevWord = word;
|
||||
return;
|
||||
}
|
||||
|
||||
// 単語のあとの文字がひらがななら結合する
|
||||
if (result.Count > 1 && token || (prevType == "keyword" && Regex.IsMatch(word, @"[ぁ-んゝ]+")))
|
||||
{
|
||||
result[result.Count - 1] += word;
|
||||
prevType = string.Empty;
|
||||
prevWord = word;
|
||||
return;
|
||||
}
|
||||
|
||||
result.Add(word);
|
||||
prevType = "keyword";
|
||||
prevWord = word;
|
||||
});
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static List<string> SplitLines(string text, SKPaint paint, float maxWidth)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text)) return null;
|
||||
|
||||
var spaceWidth = paint.MeasureText(" ");
|
||||
var lines = text.Split('\n', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
var ret = new List<string>(lines.Length);
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line)) continue;
|
||||
|
||||
float width = 0;
|
||||
var isCJK = false;
|
||||
var words = line.Split(' ', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (words.Length <= 1 && UserSettings.Default.AssetLanguage is ELanguage.Japanese or ELanguage.Korean or ELanguage.Chinese or ELanguage.TraditionalChinese)
|
||||
{
|
||||
words = SplitCKJText(line);
|
||||
isCJK = true;
|
||||
}
|
||||
|
||||
var lineResult = new StringBuilder();
|
||||
foreach (var word in words)
|
||||
{
|
||||
var wordWidth = paint.MeasureText(word);
|
||||
var wordWithSpaceWidth = wordWidth + spaceWidth;
|
||||
var wordWithSpace = isCJK ? word : word + " ";
|
||||
|
||||
if (width + wordWidth > maxWidth)
|
||||
{
|
||||
ret.Add(lineResult.ToString());
|
||||
lineResult = new StringBuilder(wordWithSpace);
|
||||
width = wordWithSpaceWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
lineResult.Append(wordWithSpace);
|
||||
width += wordWithSpaceWidth;
|
||||
}
|
||||
}
|
||||
|
||||
ret.Add(lineResult.ToString());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
public static class JsonExtensions
|
||||
{
|
||||
public static List<JToken> FindTokens(this JToken containerToken, string name)
|
||||
{
|
||||
List<JToken> matches = new List<JToken>();
|
||||
FindTokens(containerToken, name, matches);
|
||||
return matches;
|
||||
}
|
||||
|
||||
private static void FindTokens(JToken containerToken, string name, List<JToken> matches)
|
||||
{
|
||||
if (containerToken.Type == JTokenType.Object)
|
||||
{
|
||||
foreach (JProperty child in containerToken.Children<JProperty>())
|
||||
{
|
||||
if (string.Equals(child.Name, name, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
matches.Add(child.Value);
|
||||
}
|
||||
FindTokens(child.Value, name, matches);
|
||||
}
|
||||
}
|
||||
else if (containerToken.Type == JTokenType.Array)
|
||||
{
|
||||
foreach (JToken child in containerToken.Children())
|
||||
{
|
||||
FindTokens(child, name, matches);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
public class TypeAssistant
|
||||
{
|
||||
public event EventHandler Idled = delegate { };
|
||||
public int WaitingMilliSeconds { get; set; }
|
||||
Timer _waitingTimer;
|
||||
|
||||
public TypeAssistant(int waitingMilliSeconds = 600)
|
||||
{
|
||||
WaitingMilliSeconds = waitingMilliSeconds;
|
||||
_waitingTimer = new Timer(p =>
|
||||
{
|
||||
Idled(this, EventArgs.Empty);
|
||||
});
|
||||
}
|
||||
public void TextChanged()
|
||||
{
|
||||
_waitingTimer.Change(WaitingMilliSeconds, Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
116
FModel/Enums.cs
Normal file
116
FModel/Enums.cs
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace FModel;
|
||||
|
||||
public enum EBuildKind
|
||||
{
|
||||
Debug,
|
||||
Release,
|
||||
Unknown
|
||||
}
|
||||
|
||||
public enum EErrorKind
|
||||
{
|
||||
Ignore,
|
||||
Restart,
|
||||
ResetSettings
|
||||
}
|
||||
|
||||
public enum SettingsOut
|
||||
{
|
||||
ReloadLocres,
|
||||
ReloadMappings
|
||||
}
|
||||
|
||||
public enum EStatusKind
|
||||
{
|
||||
Ready, // ready
|
||||
Loading, // doing stuff
|
||||
Stopping, // trying to stop
|
||||
Stopped, // stopped
|
||||
Failed, // crashed
|
||||
Completed // worked
|
||||
}
|
||||
|
||||
public enum EAesReload
|
||||
{
|
||||
[Description("Always")]
|
||||
Always,
|
||||
[Description("Never")]
|
||||
Never,
|
||||
[Description("Once Per Day")]
|
||||
OncePerDay
|
||||
}
|
||||
|
||||
public enum EDiscordRpc
|
||||
{
|
||||
[Description("Always")]
|
||||
Always,
|
||||
[Description("Never")]
|
||||
Never
|
||||
}
|
||||
|
||||
public enum ELoadingMode
|
||||
{
|
||||
[Description("Multiple")]
|
||||
Multiple,
|
||||
[Description("All")]
|
||||
All,
|
||||
[Description("All (New)")]
|
||||
AllButNew,
|
||||
[Description("All (Modified)")]
|
||||
AllButModified
|
||||
}
|
||||
|
||||
// public enum EUpdateMode
|
||||
// {
|
||||
// [Description("Stable")]
|
||||
// Stable,
|
||||
// [Description("Beta")]
|
||||
// Beta,
|
||||
// [Description("QA Testing")]
|
||||
// Qa
|
||||
// }
|
||||
|
||||
public enum ECompressedAudio
|
||||
{
|
||||
[Description("Play the decompressed data")]
|
||||
PlayDecompressed,
|
||||
[Description("Play the compressed data (might not always be a valid audio data)")]
|
||||
PlayCompressed
|
||||
}
|
||||
|
||||
public enum EIconStyle
|
||||
{
|
||||
[Description("Default")]
|
||||
Default,
|
||||
[Description("No Background")]
|
||||
NoBackground,
|
||||
[Description("No Text")]
|
||||
NoText,
|
||||
[Description("Flat")]
|
||||
Flat,
|
||||
[Description("Cataba")]
|
||||
Cataba,
|
||||
// [Description("Community")]
|
||||
// CommunityMade
|
||||
}
|
||||
|
||||
public enum EEndpointType
|
||||
{
|
||||
Aes,
|
||||
Mapping
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum EBulkType
|
||||
{
|
||||
None = 0,
|
||||
Auto = 1 << 0,
|
||||
Properties = 1 << 1,
|
||||
Textures = 1 << 2,
|
||||
Meshes = 1 << 3,
|
||||
Skeletons = 1 << 4,
|
||||
Animations = 1 << 5
|
||||
}
|
||||
54
FModel/Extensions/AvalonExtensions.cs
Normal file
54
FModel/Extensions/AvalonExtensions.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Xml;
|
||||
using ICSharpCode.AvalonEdit.Highlighting;
|
||||
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
|
||||
|
||||
namespace FModel.Extensions;
|
||||
|
||||
public static class AvalonExtensions
|
||||
{
|
||||
private static readonly IHighlightingDefinition _jsonHighlighter = LoadHighlighter("Json.xshd");
|
||||
private static readonly IHighlightingDefinition _iniHighlighter = LoadHighlighter("Ini.xshd");
|
||||
private static readonly IHighlightingDefinition _xmlHighlighter = LoadHighlighter("Xml.xshd");
|
||||
private static readonly IHighlightingDefinition _cppHighlighter = LoadHighlighter("Cpp.xshd");
|
||||
private static readonly IHighlightingDefinition _changelogHighlighter = LoadHighlighter("Changelog.xshd");
|
||||
private static readonly IHighlightingDefinition _verseHighlighter = LoadHighlighter("Verse.xshd");
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static IHighlightingDefinition LoadHighlighter(string resourceName)
|
||||
{
|
||||
var executingAssembly = Assembly.GetExecutingAssembly();
|
||||
using var stream = executingAssembly.GetManifestResourceStream($"{executingAssembly.GetName().Name}.Resources.{resourceName}");
|
||||
using var reader = new XmlTextReader(stream);
|
||||
return HighlightingLoader.Load(reader, HighlightingManager.Instance);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static IHighlightingDefinition HighlighterSelector(string ext)
|
||||
{
|
||||
switch (ext)
|
||||
{
|
||||
case "ini":
|
||||
case "csv":
|
||||
return _iniHighlighter;
|
||||
case "xml":
|
||||
case "tps":
|
||||
return _xmlHighlighter;
|
||||
case "h":
|
||||
case "cpp":
|
||||
return _cppHighlighter;
|
||||
case "changelog":
|
||||
return _changelogHighlighter;
|
||||
case "verse":
|
||||
return _verseHighlighter;
|
||||
case "bat":
|
||||
case "txt":
|
||||
case "pem":
|
||||
case "po":
|
||||
return null;
|
||||
default:
|
||||
return _jsonHighlighter;
|
||||
}
|
||||
}
|
||||
}
|
||||
198
FModel/Extensions/ClipboardExtensions.cs
Normal file
198
FModel/Extensions/ClipboardExtensions.cs
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
using SkiaSharp;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace FModel.Extensions;
|
||||
|
||||
public static class ClipboardExtensions
|
||||
{
|
||||
public static void SetImage(byte[] pngBytes, string fileName = null)
|
||||
{
|
||||
Clipboard.Clear();
|
||||
var data = new DataObject();
|
||||
using var pngMs = new MemoryStream(pngBytes);
|
||||
using var image = Image.FromStream(pngMs);
|
||||
// As standard bitmap, without transparency support
|
||||
data.SetData(DataFormats.Bitmap, image, true);
|
||||
// As PNG. Gimp will prefer this over the other two
|
||||
data.SetData("PNG", pngMs, false);
|
||||
// As DIB. This is (wrongly) accepted as ARGB by many applications
|
||||
using var dibMemStream = new MemoryStream(ConvertToDib(image));
|
||||
data.SetData(DataFormats.Dib, dibMemStream, false);
|
||||
// Optional fileName
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
var htmlFragment = GenerateHTMLFragment($"<img src=\"{fileName}\"/>");
|
||||
data.SetData(DataFormats.Html, htmlFragment);
|
||||
}
|
||||
// The 'copy=true' argument means the MemoryStreams can be safely disposed after the operation
|
||||
Clipboard.SetDataObject(data, true);
|
||||
}
|
||||
|
||||
public static byte[] ConvertToDib(Image image)
|
||||
{
|
||||
byte[] bm32bData;
|
||||
var width = image.Width;
|
||||
var height = image.Height;
|
||||
|
||||
// Ensure image is 32bppARGB by painting it on a new 32bppARGB image.
|
||||
using (var bm32b = new Bitmap(width, height, PixelFormat.Format32bppPArgb))
|
||||
{
|
||||
using (var gr = Graphics.FromImage(bm32b))
|
||||
{
|
||||
gr.DrawImage(image, new Rectangle(0, 0, width, height));
|
||||
}
|
||||
|
||||
// Bitmap format has its lines reversed.
|
||||
bm32b.RotateFlip(RotateFlipType.Rotate180FlipX);
|
||||
bm32bData = GetRawBytes(bm32b);
|
||||
}
|
||||
|
||||
// BITMAPINFOHEADER struct for DIB.
|
||||
const int hdrSize = 0x28;
|
||||
var fullImage = new byte[hdrSize + 12 + bm32bData.Length];
|
||||
//Int32 biSize;
|
||||
WriteIntToByteArray(fullImage, 0x00, 4, true, hdrSize);
|
||||
//Int32 biWidth;
|
||||
WriteIntToByteArray(fullImage, 0x04, 4, true, (uint) width);
|
||||
//Int32 biHeight;
|
||||
WriteIntToByteArray(fullImage, 0x08, 4, true, (uint) height);
|
||||
//Int16 biPlanes;
|
||||
WriteIntToByteArray(fullImage, 0x0C, 2, true, 1);
|
||||
//Int16 biBitCount;
|
||||
WriteIntToByteArray(fullImage, 0x0E, 2, true, 32);
|
||||
//BITMAPCOMPRESSION biCompression = BITMAPCOMPRESSION.BITFIELDS;
|
||||
WriteIntToByteArray(fullImage, 0x10, 4, true, 3);
|
||||
//Int32 biSizeImage;
|
||||
WriteIntToByteArray(fullImage, 0x14, 4, true, (uint) bm32bData.Length);
|
||||
// These are all 0. Since .net clears new arrays, don't bother writing them.
|
||||
//Int32 biXPelsPerMeter = 0;
|
||||
//Int32 biYPelsPerMeter = 0;
|
||||
//Int32 biClrUsed = 0;
|
||||
//Int32 biClrImportant = 0;
|
||||
|
||||
// The aforementioned "BITFIELDS": colour masks applied to the Int32 pixel value to get the R, G and B values.
|
||||
WriteIntToByteArray(fullImage, hdrSize + 0, 4, true, 0x00FF0000);
|
||||
WriteIntToByteArray(fullImage, hdrSize + 4, 4, true, 0x0000FF00);
|
||||
WriteIntToByteArray(fullImage, hdrSize + 8, 4, true, 0x000000FF);
|
||||
|
||||
Unsafe.CopyBlockUnaligned(ref fullImage[hdrSize + 12], ref bm32bData[0], (uint) bm32bData.Length);
|
||||
return fullImage;
|
||||
}
|
||||
|
||||
private static byte[] ConvertToDib(byte[] pngBytes = null)
|
||||
{
|
||||
byte[] bm32bData;
|
||||
int width, height;
|
||||
|
||||
using (var skBmp = SKBitmap.Decode(pngBytes))
|
||||
{
|
||||
width = skBmp.Width;
|
||||
height = skBmp.Height;
|
||||
using var rotated = new SKBitmap(new SKImageInfo(width, height, skBmp.ColorType));
|
||||
using var canvas = new SKCanvas(rotated);
|
||||
canvas.Scale(1, -1, 0, height / 2.0f);
|
||||
canvas.DrawBitmap(skBmp, SKPoint.Empty);
|
||||
canvas.Flush();
|
||||
bm32bData = rotated.Bytes;
|
||||
}
|
||||
|
||||
// BITMAPINFOHEADER struct for DIB.
|
||||
const int hdrSize = 0x28;
|
||||
var fullImage = new byte[hdrSize + 12 + bm32bData.Length];
|
||||
//Int32 biSize;
|
||||
WriteIntToByteArray(fullImage, 0x00, 4, true, hdrSize);
|
||||
//Int32 biWidth;
|
||||
WriteIntToByteArray(fullImage, 0x04, 4, true, (uint) width);
|
||||
//Int32 biHeight;
|
||||
WriteIntToByteArray(fullImage, 0x08, 4, true, (uint) height);
|
||||
//Int16 biPlanes;
|
||||
WriteIntToByteArray(fullImage, 0x0C, 2, true, 1);
|
||||
//Int16 biBitCount;
|
||||
WriteIntToByteArray(fullImage, 0x0E, 2, true, 32);
|
||||
//BITMAPCOMPRESSION biCompression = BITMAPCOMPRESSION.BITFIELDS;
|
||||
WriteIntToByteArray(fullImage, 0x10, 4, true, 3);
|
||||
//Int32 biSizeImage;
|
||||
WriteIntToByteArray(fullImage, 0x14, 4, true, (uint) bm32bData.Length);
|
||||
// These are all 0. Since .net clears new arrays, don't bother writing them.
|
||||
//Int32 biXPelsPerMeter = 0;
|
||||
//Int32 biYPelsPerMeter = 0;
|
||||
//Int32 biClrUsed = 0;
|
||||
//Int32 biClrImportant = 0;
|
||||
|
||||
// The aforementioned "BITFIELDS": colour masks applied to the Int32 pixel value to get the R, G and B values.
|
||||
WriteIntToByteArray(fullImage, hdrSize + 0, 4, true, 0x00FF0000);
|
||||
WriteIntToByteArray(fullImage, hdrSize + 4, 4, true, 0x0000FF00);
|
||||
WriteIntToByteArray(fullImage, hdrSize + 8, 4, true, 0x000000FF);
|
||||
|
||||
Unsafe.CopyBlockUnaligned(ref fullImage[hdrSize + 12], ref bm32bData[0], (uint) bm32bData.Length);
|
||||
return fullImage;
|
||||
}
|
||||
|
||||
public static unsafe byte[] GetRawBytes(Bitmap bmp)
|
||||
{
|
||||
var rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
||||
var bmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, bmp.PixelFormat);
|
||||
var bytes = (uint) (Math.Abs(bmpData.Stride) * bmp.Height);
|
||||
var buffer = new byte[bytes];
|
||||
fixed (byte* pBuffer = buffer)
|
||||
{
|
||||
Unsafe.CopyBlockUnaligned(pBuffer, bmpData.Scan0.ToPointer(), bytes);
|
||||
}
|
||||
|
||||
bmp.UnlockBits(bmpData);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
private static void WriteIntToByteArray(byte[] data, int startIndex, int bytes, bool littleEndian, uint value)
|
||||
{
|
||||
var lastByte = bytes - 1;
|
||||
|
||||
if (data.Length < startIndex + bytes)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(startIndex), "Data array is too small to write a " + bytes + "-byte value at offset " + startIndex + ".");
|
||||
}
|
||||
|
||||
for (var index = 0; index < bytes; index++)
|
||||
{
|
||||
var offs = startIndex + (littleEndian ? index : lastByte - index);
|
||||
data[offs] = (byte) (value >> 8 * index & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
private static string GenerateHTMLFragment(string html)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
const string header = "Version:0.9\r\nStartHTML:<<<<<<<<<1\r\nEndHTML:<<<<<<<<<2\r\nStartFragment:<<<<<<<<<3\r\nEndFragment:<<<<<<<<<4\r\n";
|
||||
const string startHTML = "<html>\r\n<body>\r\n";
|
||||
const string startFragment = "<!--StartFragment-->";
|
||||
const string endFragment = "<!--EndFragment-->";
|
||||
const string endHTML = "\r\n</body>\r\n</html>";
|
||||
|
||||
sb.Append(header);
|
||||
|
||||
var startHTMLLength = header.Length;
|
||||
var startFragmentLength = startHTMLLength + startHTML.Length + startFragment.Length;
|
||||
var endFragmentLength = startFragmentLength + Encoding.UTF8.GetByteCount(html);
|
||||
var endHTMLLength = endFragmentLength + endFragment.Length + endHTML.Length;
|
||||
|
||||
sb.Replace("<<<<<<<<<1", startHTMLLength.ToString("D10"));
|
||||
sb.Replace("<<<<<<<<<2", endHTMLLength.ToString("D10"));
|
||||
sb.Replace("<<<<<<<<<3", startFragmentLength.ToString("D10"));
|
||||
sb.Replace("<<<<<<<<<4", endFragmentLength.ToString("D10"));
|
||||
|
||||
sb.Append(startHTML);
|
||||
sb.Append(startFragment);
|
||||
sb.Append(html);
|
||||
sb.Append(endFragment);
|
||||
sb.Append(endHTML);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
36
FModel/Extensions/CollectionExtensions.cs
Normal file
36
FModel/Extensions/CollectionExtensions.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace FModel.Extensions;
|
||||
|
||||
public static class CollectionExtensions
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Next<T>(this IList<T> collection, T value)
|
||||
{
|
||||
var i = collection.IndexOf(value) + 1;
|
||||
return i >= collection.Count ? collection.First() : collection[i];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Next<T>(this IList<T> collection, int index)
|
||||
{
|
||||
var i = index + 1;
|
||||
return i >= collection.Count ? collection.First() : collection[i];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Previous<T>(this IList<T> collection, T value)
|
||||
{
|
||||
var i = collection.IndexOf(value) - 1;
|
||||
return i < 0 ? collection.Last() : collection[i];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Previous<T>(this IList<T> collection, int index)
|
||||
{
|
||||
var i = index - 1;
|
||||
return i < 0 ? collection.Last() : collection[i];
|
||||
}
|
||||
}
|
||||
59
FModel/Extensions/EnumExtensions.cs
Normal file
59
FModel/Extensions/EnumExtensions.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace FModel.Extensions;
|
||||
|
||||
public static class EnumExtensions
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string GetDescription(this Enum value)
|
||||
{
|
||||
var fi = value.GetType().GetField(value.ToString());
|
||||
if (fi == null) return $"{value} ({value:D})";
|
||||
|
||||
var attributes = (DescriptionAttribute[]) fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
if (attributes.Length > 0) return attributes[0].Description;
|
||||
|
||||
|
||||
var suffix = $"{value:D}";
|
||||
var current = Convert.ToInt32(suffix);
|
||||
var target = current & ~0xF;
|
||||
if (current != target)
|
||||
{
|
||||
var values = Enum.GetValues(value.GetType());
|
||||
var index = Array.IndexOf(values, value);
|
||||
suffix = values.GetValue(index - (current - target))?.ToString();
|
||||
}
|
||||
return $"{value} ({suffix})";
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T ToEnum<T>(this string value, T defaultValue) where T : struct => !Enum.TryParse(value, true, out T ret) ? defaultValue : ret;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool HasAnyFlags<T>(this T flags, T contains) where T : Enum, IConvertible => (flags.ToInt32(null) & contains.ToInt32(null)) != 0;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static int GetIndex(this Enum value)
|
||||
{
|
||||
var values = Enum.GetValues(value.GetType());
|
||||
return Array.IndexOf(values, value);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Next<T>(this Enum value)
|
||||
{
|
||||
var values = Enum.GetValues(value.GetType());
|
||||
var i = Array.IndexOf(values, value) + 1;
|
||||
return i == values.Length ? (T) values.GetValue(0) : (T) values.GetValue(i);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Previous<T>(this Enum value)
|
||||
{
|
||||
var values = Enum.GetValues(value.GetType());
|
||||
var i = Array.IndexOf(values, value) - 1;
|
||||
return i == -1 ? (T) values.GetValue(values.Length - 1) : (T) values.GetValue(i);
|
||||
}
|
||||
}
|
||||
30
FModel/Extensions/StreamExtensions.cs
Normal file
30
FModel/Extensions/StreamExtensions.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace FModel.Extensions;
|
||||
|
||||
public enum Endianness
|
||||
{
|
||||
LittleEndian,
|
||||
BigEndian
|
||||
}
|
||||
|
||||
public static class StreamExtensions
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static uint ReadUInt32(this Stream s, Endianness endian = Endianness.LittleEndian)
|
||||
{
|
||||
var b1 = s.ReadByte();
|
||||
var b2 = s.ReadByte();
|
||||
var b3 = s.ReadByte();
|
||||
var b4 = s.ReadByte();
|
||||
|
||||
return endian switch
|
||||
{
|
||||
Endianness.LittleEndian => (uint) (b4 << 24 | b3 << 16 | b2 << 8 | b1),
|
||||
Endianness.BigEndian => (uint) (b1 << 24 | b2 << 16 | b3 << 8 | b4),
|
||||
_ => throw new Exception("unknown endianness")
|
||||
};
|
||||
}
|
||||
}
|
||||
185
FModel/Extensions/StringExtensions.cs
Normal file
185
FModel/Extensions/StringExtensions.cs
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using ICSharpCode.AvalonEdit.Document;
|
||||
|
||||
namespace FModel.Extensions;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string GetReadableSize(double size)
|
||||
{
|
||||
if (size == 0) return "0 B";
|
||||
|
||||
string[] sizes = { "B", "KB", "MB", "GB", "TB" };
|
||||
var order = 0;
|
||||
while (size >= 1024 && order < sizes.Length - 1)
|
||||
{
|
||||
order++;
|
||||
size /= 1024;
|
||||
}
|
||||
|
||||
return $"{size:# ###.##} {sizes[order]}".TrimStart();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringBefore(this string s, char delimiter)
|
||||
{
|
||||
var index = s.IndexOf(delimiter);
|
||||
return index == -1 ? s : s[..index];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringBefore(this string s, string delimiter, StringComparison comparisonType = StringComparison.Ordinal)
|
||||
{
|
||||
var index = s.IndexOf(delimiter, comparisonType);
|
||||
return index == -1 ? s : s[..index];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringAfter(this string s, char delimiter)
|
||||
{
|
||||
var index = s.IndexOf(delimiter);
|
||||
return index == -1 ? s : s.Substring(index + 1, s.Length - index - 1);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringAfter(this string s, string delimiter, StringComparison comparisonType = StringComparison.Ordinal)
|
||||
{
|
||||
var index = s.IndexOf(delimiter, comparisonType);
|
||||
return index == -1 ? s : s.Substring(index + delimiter.Length, s.Length - index - delimiter.Length);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringBeforeLast(this string s, char delimiter)
|
||||
{
|
||||
var index = s.LastIndexOf(delimiter);
|
||||
return index == -1 ? s : s[..index];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringBeforeLast(this string s, string delimiter, StringComparison comparisonType = StringComparison.Ordinal)
|
||||
{
|
||||
var index = s.LastIndexOf(delimiter, comparisonType);
|
||||
return index == -1 ? s : s[..index];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringBeforeWithLast(this string s, char delimiter)
|
||||
{
|
||||
var index = s.LastIndexOf(delimiter);
|
||||
return index == -1 ? s : s[..(index + 1)];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringBeforeWithLast(this string s, string delimiter, StringComparison comparisonType = StringComparison.Ordinal)
|
||||
{
|
||||
var index = s.LastIndexOf(delimiter, comparisonType);
|
||||
return index == -1 ? s : s[..(index + 1)];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringAfterLast(this string s, char delimiter)
|
||||
{
|
||||
var index = s.LastIndexOf(delimiter);
|
||||
return index == -1 ? s : s.Substring(index + 1, s.Length - index - 1);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string SubstringAfterLast(this string s, string delimiter, StringComparison comparisonType = StringComparison.Ordinal)
|
||||
{
|
||||
var index = s.LastIndexOf(delimiter, comparisonType);
|
||||
return index == -1 ? s : s.Substring(index + delimiter.Length, s.Length - index - delimiter.Length);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static int GetNameLineNumber(this string s, string lineToFind)
|
||||
{
|
||||
if (int.TryParse(lineToFind, out var index))
|
||||
return s.GetLineNumber(index);
|
||||
|
||||
lineToFind = $" \"Name\": \"{lineToFind}\",";
|
||||
using var reader = new StringReader(s);
|
||||
var lineNum = 0;
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
lineNum++;
|
||||
if (line.Equals(lineToFind, StringComparison.OrdinalIgnoreCase))
|
||||
return lineNum;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string GetParentExportType(this TextDocument doc, int startOffset)
|
||||
{
|
||||
var line = doc.GetLineByOffset(startOffset);
|
||||
var lineNumber = line.LineNumber - 1;
|
||||
|
||||
while (doc.GetText(line.Offset, line.Length) is { } content)
|
||||
{
|
||||
if (content.StartsWith(" \"Type\": \"", StringComparison.OrdinalIgnoreCase))
|
||||
return content.Split("\"")[3];
|
||||
|
||||
lineNumber--;
|
||||
if (lineNumber < 1) break;
|
||||
line = doc.GetLineByNumber(lineNumber);
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static int GetKismetLineNumber(this string s, string input)
|
||||
{
|
||||
var match = Regex.Match(input, @"^(.+)\[(\d+)\]$");
|
||||
var name = match.Groups[1].Value;
|
||||
int index = int.Parse(match.Groups[2].Value);
|
||||
var lineToFind = $" \"Name\": \"{name}\",";
|
||||
var offset = $"\"StatementIndex\": {index}";
|
||||
using var reader = new StringReader(s);
|
||||
var lineNum = 0;
|
||||
string line;
|
||||
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
lineNum++;
|
||||
if (line.Equals(lineToFind, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var objectLine = lineNum;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
lineNum++;
|
||||
if (line.Contains(offset, StringComparison.OrdinalIgnoreCase))
|
||||
return lineNum;
|
||||
}
|
||||
return objectLine;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static int GetLineNumber(this string s, int index)
|
||||
{
|
||||
using var reader = new StringReader(s);
|
||||
var lineNum = 0;
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
lineNum++;
|
||||
if (line.Equals(" {"))
|
||||
index--;
|
||||
|
||||
if (index == -1)
|
||||
return lineNum + 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,321 +1,275 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8FABCD3A-9D55-4B54-B237-B259D815DEB8}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>FModel</RootNamespace>
|
||||
<AssemblyName>FModel</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ApplicationIcon>FModel.ico</ApplicationIcon>
|
||||
<Version>4.4.4.0</Version>
|
||||
<AssemblyVersion>4.4.4.0</AssemblyVersion>
|
||||
<FileVersion>4.4.4.0</FileVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsPublishable>true</IsPublishable>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishSingleFile Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">true</PublishSingleFile>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<StartupObject>FModel.App</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>FModel.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<NoWarn>1701;1702;NU1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoUpdater.NET, Version=1.5.3.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autoupdater.NET.Official.1.5.3\lib\net40\AutoUpdater.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="csharp-wick, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>DLLs\csharp-wick.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Hammock.ClientProfile, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c148cfba29ed1a4d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\TweetMoaSharp.6.0.0\lib\4.5\Hammock.ClientProfile.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.11.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.11.9\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=106.6.10.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.6.10\lib\net452\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ScintillaNET FindReplaceDialog, Version=1.4.0.17540, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>DLLs\ScintillaNET FindReplaceDialog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ScintillaNET, Version=3.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Messaging" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TweetSharp, Version=6.0.0.0, Culture=neutral, PublicKeyToken=c148cfba29ed1a4d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\TweetMoaSharp.6.0.0\lib\4.5\TweetSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<None Remove="Resources\android.png" />
|
||||
<None Remove="Resources\apple.png" />
|
||||
<None Remove="Resources\battlebreakers.png" />
|
||||
<None Remove="Resources\blueprint.png" />
|
||||
<None Remove="Resources\borderlands.png" />
|
||||
<None Remove="Resources\empty_folder.png" />
|
||||
<None Remove="Resources\engine.png" />
|
||||
<None Remove="Resources\fallenorder.png" />
|
||||
<None Remove="Resources\FModel.ico" />
|
||||
<None Remove="Resources\folder.png" />
|
||||
<None Remove="Resources\label.png" />
|
||||
<None Remove="Resources\fortnite.png" />
|
||||
<None Remove="Resources\fortnitebr.png" />
|
||||
<None Remove="Resources\gear.png" />
|
||||
<None Remove="Resources\localization.png" />
|
||||
<None Remove="Resources\materialicon.png" />
|
||||
<None Remove="Resources\square.png" />
|
||||
<None Remove="Resources\square_off.png" />
|
||||
<None Remove="Resources\cube.png" />
|
||||
<None Remove="Resources\cube_off.png" />
|
||||
<None Remove="Resources\light.png" />
|
||||
<None Remove="Resources\light_off.png" />
|
||||
<None Remove="Resources\pc.png" />
|
||||
<None Remove="Resources\puzzle.png" />
|
||||
<None Remove="Resources\roguecompany.png" />
|
||||
<None Remove="Resources\sound.png" />
|
||||
<None Remove="Resources\creative.png" />
|
||||
<None Remove="Resources\spellbreak.png" />
|
||||
<None Remove="Resources\texture.png" />
|
||||
<None Remove="Resources\thecycle.png" />
|
||||
<None Remove="Resources\ui.png" />
|
||||
<None Remove="Resources\valorant.png" />
|
||||
<None Remove="Resources\weapon.png" />
|
||||
<None Remove="Resources\windows.png" />
|
||||
<None Remove="Resources\cinematics.png" />
|
||||
<None Remove="Resources\archive.png" />
|
||||
<None Remove="Resources\archive_enabled.png" />
|
||||
<None Remove="Resources\archive_disabled.png" />
|
||||
<None Remove="Resources\unknown_asset.png" />
|
||||
<None Remove="Resources\asset.png" />
|
||||
<None Remove="Resources\asset_ini.png" />
|
||||
<None Remove="Resources\asset_psd.png" />
|
||||
<None Remove="Resources\asset_png.png" />
|
||||
<None Remove="Resources\athena.png" />
|
||||
<None Remove="Resources\Json.xshd" />
|
||||
<None Remove="Resources\Ini.xshd" />
|
||||
<None Remove="Resources\Verse.xshd" />
|
||||
<None Remove="Resources\Xml.xshd" />
|
||||
<None Remove="Resources\Cpp.xshd" />
|
||||
<None Remove="Resources\Changelog.xshd" />
|
||||
<None Remove="Resources\unix.png" />
|
||||
<None Remove="Resources\linux.png" />
|
||||
<None Remove="Resources\stateofdecay2.png" />
|
||||
<None Remove="Resources\T_Placeholder_Item_Image.png" />
|
||||
<None Remove="Resources\checker.png" />
|
||||
<None Remove="Resources\T_ClipSize_Weapon_Stats.png" />
|
||||
<None Remove="Resources\T_DamagePerBullet_Weapon_Stats.png" />
|
||||
<None Remove="Resources\T_ReloadTime_Weapon_Stats.png" />
|
||||
<None Remove="Resources\T-Icon-Pets-64.png" />
|
||||
<None Remove="Resources\T-Icon-Quests-64.png" />
|
||||
<None Remove="Resources\Default.png" />
|
||||
<None Remove="Resources\NoBackground.png" />
|
||||
<None Remove="Resources\NoText.png" />
|
||||
<None Remove="Resources\Flat.png" />
|
||||
<None Remove="Resources\Cataba.png" />
|
||||
<None Remove="Resources\BurbankBigCondensed-Bold.ttf" />
|
||||
<None Remove="Resources\add_directory.png" />
|
||||
<None Remove="Resources\delete.png" />
|
||||
<None Remove="Resources\edit.png" />
|
||||
<None Remove="Resources\go_to_directory.png" />
|
||||
<None Remove="Resources\npcleftside.png" />
|
||||
<None Remove="Resources\default.frag" />
|
||||
<None Remove="Resources\default.vert" />
|
||||
<None Remove="Resources\grid.frag" />
|
||||
<None Remove="Resources\grid.vert" />
|
||||
<None Remove="Resources\skybox.frag" />
|
||||
<None Remove="Resources\skybox.vert" />
|
||||
<None Remove="Resources\framebuffer.frag" />
|
||||
<None Remove="Resources\framebuffer.vert" />
|
||||
<None Remove="Resources\outline.frag" />
|
||||
<None Remove="Resources\outline.vert" />
|
||||
<None Remove="Resources\picking.frag" />
|
||||
<None Remove="Resources\picking.vert" />
|
||||
<None Remove="Resources\light.frag" />
|
||||
<None Remove="Resources\light.vert" />
|
||||
<None Remove="Resources\bone.frag" />
|
||||
<None Remove="Resources\bone.vert" />
|
||||
<None Remove="Resources\collision.vert" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Methods\Converter\UnrealEngineDataToOGG.cs" />
|
||||
<Compile Include="Custom\JsonExtensions.cs" />
|
||||
<Compile Include="Custom\TypeAssistant.cs" />
|
||||
<Compile Include="Forms\AESManager.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AESManager.Designer.cs">
|
||||
<DependentUpon>AESManager.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\TweetForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\TweetForm.Designer.cs">
|
||||
<DependentUpon>TweetForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Methods\AESManager\DynamicKeysManager.cs" />
|
||||
<Compile Include="Methods\DynamicKeys\AddToUI.cs" />
|
||||
<Compile Include="Methods\DynamicKeys\Keychain.cs" />
|
||||
<Compile Include="Methods\DynamicKeys\Parser\AccessCodeParser.cs" />
|
||||
<Compile Include="Methods\DynamicKeys\Parser\AESKeyParser.cs" />
|
||||
<Compile Include="Methods\DynamicKeys\Parser\TokenParser.cs" />
|
||||
<Compile Include="Methods\ChallengeGenerator\BundleDesign.cs" />
|
||||
<Compile Include="Methods\ChallengeGenerator\BundleInfos.cs" />
|
||||
<Compile Include="Methods\ChallengeGenerator\DrawingRewards.cs" />
|
||||
<Compile Include="Methods\DLLImport.cs" />
|
||||
<Compile Include="Methods\IconGenerator\DrawText.cs" />
|
||||
<Compile Include="Methods\IconGenerator\Translations\LoadLocRes.cs" />
|
||||
<Compile Include="Methods\IconGenerator\Translations\SearchResource.cs" />
|
||||
<Compile Include="Methods\ImagesMerger\ImagesMerger.cs" />
|
||||
<Compile Include="Methods\Serializer\AssetReader.cs" />
|
||||
<Compile Include="Methods\Serializer\LocRes\LocResSerializer.cs" />
|
||||
<Compile Include="Methods\Scintilla\MyScintilla.cs" />
|
||||
<Compile Include="Methods\Utilities\FontUtilities.cs" />
|
||||
<Compile Include="Methods\IconGenerator\ItemIcon.cs" />
|
||||
<Compile Include="Methods\IconGenerator\Rarity.cs" />
|
||||
<Compile Include="Forms\About.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SearchFiles.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SearchFiles.Designer.cs">
|
||||
<DependentUpon>SearchFiles.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\IconGeneratorAssets.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\IconGeneratorAssets.Designer.cs">
|
||||
<DependentUpon>IconGeneratorAssets.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Settings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Settings.Designer.cs">
|
||||
<DependentUpon>Settings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\UpdateModeSettings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\UpdateModeSettings.Designer.cs">
|
||||
<DependentUpon>UpdateModeSettings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.Designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Methods\Utilities\ImageUtilities.cs" />
|
||||
<Compile Include="Methods\JohnWick\JohnWick.cs" />
|
||||
<Compile Include="Methods\Utilities\Utilities.cs" />
|
||||
<Compile Include="Methods\VarApp.cs" />
|
||||
<Compile Include="Parser\Banners\BannersParser.cs" />
|
||||
<Compile Include="Parser\Challenges\ChallengeBundleIdParser.cs" />
|
||||
<Compile Include="Parser\Featured\FeaturedParser.cs" />
|
||||
<Compile Include="Parser\Items\CosmeticSetsParser.cs" />
|
||||
<Compile Include="Parser\Items\ItemIDParser.cs" />
|
||||
<Compile Include="Parser\LocRes\LocResParser.cs" />
|
||||
<Compile Include="Parser\Meshes\MeshesParser.cs" />
|
||||
<Compile Include="Parser\Quests\QuestParser.cs" />
|
||||
<Compile Include="Parser\RenderMat\RenderSwitchMaterial.cs" />
|
||||
<Compile Include="Parser\Weapons\WeaponStatParser.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Forms\About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\AESManager.resx">
|
||||
<DependentUpon>AESManager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SearchFiles.resx">
|
||||
<DependentUpon>SearchFiles.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\IconGeneratorAssets.resx">
|
||||
<DependentUpon>IconGeneratorAssets.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Settings.resx">
|
||||
<DependentUpon>Settings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\TweetForm.resx">
|
||||
<DependentUpon>TweetForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\UpdateModeSettings.resx">
|
||||
<DependentUpon>UpdateModeSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainWindow.resx">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<EmbeddedResource Include="Resources\Json.xshd" />
|
||||
<EmbeddedResource Include="Resources\Ini.xshd" />
|
||||
<EmbeddedResource Include="Resources\Verse.xshd" />
|
||||
<EmbeddedResource Include="Resources\Xml.xshd" />
|
||||
<EmbeddedResource Include="Resources\Cpp.xshd" />
|
||||
<EmbeddedResource Include="Resources\Changelog.xshd" />
|
||||
<EmbeddedResource Include="Resources\default.frag" />
|
||||
<EmbeddedResource Include="Resources\default.vert" />
|
||||
<EmbeddedResource Include="Resources\grid.frag" />
|
||||
<EmbeddedResource Include="Resources\grid.vert" />
|
||||
<EmbeddedResource Include="Resources\skybox.frag" />
|
||||
<EmbeddedResource Include="Resources\skybox.vert" />
|
||||
<EmbeddedResource Include="Resources\framebuffer.frag" />
|
||||
<EmbeddedResource Include="Resources\framebuffer.vert" />
|
||||
<EmbeddedResource Include="Resources\outline.frag" />
|
||||
<EmbeddedResource Include="Resources\outline.vert" />
|
||||
<EmbeddedResource Include="Resources\picking.frag" />
|
||||
<EmbeddedResource Include="Resources\picking.vert" />
|
||||
<EmbeddedResource Include="Resources\light.frag" />
|
||||
<EmbeddedResource Include="Resources\light.vert" />
|
||||
<EmbeddedResource Include="Resources\bone.frag" />
|
||||
<EmbeddedResource Include="Resources\bone.vert" />
|
||||
<EmbeddedResource Include="Resources\collision.vert" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AdonisUI" Version="1.17.1" />
|
||||
<PackageReference Include="AdonisUI.ClassicTheme" Version="1.17.1" />
|
||||
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
|
||||
<PackageReference Include="AvalonEdit" Version="6.3.0.90" />
|
||||
<PackageReference Include="CSCore" Version="1.2.1.2" />
|
||||
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
|
||||
<PackageReference Include="EpicManifestParser" Version="2.3.3" />
|
||||
<PackageReference Include="ImGui.NET" Version="1.91.0.1" />
|
||||
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.3.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NVorbis" Version="0.10.5" />
|
||||
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
|
||||
<PackageReference Include="OpenTK" Version="4.8.2" />
|
||||
<PackageReference Include="RestSharp" Version="112.1.0" />
|
||||
<PackageReference Include="Serilog" Version="4.0.2" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
|
||||
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.8" />
|
||||
<PackageReference Include="SkiaSharp.Svg" Version="1.60.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CUE4Parse\CUE4Parse-Conversion\CUE4Parse-Conversion.csproj" />
|
||||
<ProjectReference Include="..\CUE4Parse\CUE4Parse\CUE4Parse.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\android.png" />
|
||||
<Resource Include="Resources\apple.png" />
|
||||
<Resource Include="Resources\battlebreakers.png" />
|
||||
<Resource Include="Resources\blueprint.png" />
|
||||
<Resource Include="Resources\borderlands.png" />
|
||||
<Resource Include="Resources\fallenorder.png" />
|
||||
<Resource Include="Resources\FModel.ico" />
|
||||
<Resource Include="Resources\folder.png" />
|
||||
<Resource Include="Resources\label.png" />
|
||||
<Resource Include="Resources\fortnite.png" />
|
||||
<Resource Include="Resources\fortnitebr.png" />
|
||||
<Resource Include="Resources\empty_folder.png" />
|
||||
<Resource Include="Resources\engine.png" />
|
||||
<Resource Include="Resources\gear.png" />
|
||||
<Resource Include="Resources\localization.png" />
|
||||
<Resource Include="Resources\materialicon.png" />
|
||||
<Resource Include="Resources\square.png" />
|
||||
<Resource Include="Resources\square_off.png" />
|
||||
<Resource Include="Resources\cube.png" />
|
||||
<Resource Include="Resources\cube_off.png" />
|
||||
<Resource Include="Resources\light.png" />
|
||||
<Resource Include="Resources\light_off.png" />
|
||||
<Resource Include="Resources\pc.png" />
|
||||
<Resource Include="Resources\puzzle.png" />
|
||||
<Resource Include="Resources\roguecompany.png" />
|
||||
<Resource Include="Resources\spellbreak.png" />
|
||||
<Resource Include="Resources\sound.png" />
|
||||
<Resource Include="Resources\creative.png" />
|
||||
<Resource Include="Resources\texture.png" />
|
||||
<Resource Include="Resources\thecycle.png" />
|
||||
<Resource Include="Resources\valorant.png" />
|
||||
<Resource Include="Resources\ui.png" />
|
||||
<Resource Include="Resources\weapon.png" />
|
||||
<Resource Include="Resources\windows.png" />
|
||||
<Resource Include="Resources\cinematics.png" />
|
||||
<Resource Include="Resources\archive.png" />
|
||||
<Resource Include="Resources\archive_enabled.png" />
|
||||
<Resource Include="Resources\archive_disabled.png" />
|
||||
<Resource Include="Resources\unknown_asset.png" />
|
||||
<Resource Include="Resources\asset.png" />
|
||||
<Resource Include="Resources\asset_ini.png" />
|
||||
<Resource Include="Resources\asset_psd.png" />
|
||||
<Resource Include="Resources\asset_png.png" />
|
||||
<Resource Include="Resources\athena.png" />
|
||||
<Resource Include="Resources\unix.png" />
|
||||
<Resource Include="Resources\linux.png" />
|
||||
<Resource Include="Resources\stateofdecay2.png" />
|
||||
<Resource Include="Resources\T_Placeholder_Item_Image.png" />
|
||||
<Resource Include="Resources\checker.png" />
|
||||
<Resource Include="Resources\T_ClipSize_Weapon_Stats.png" />
|
||||
<Resource Include="Resources\T_DamagePerBullet_Weapon_Stats.png" />
|
||||
<Resource Include="Resources\T_ReloadTime_Weapon_Stats.png" />
|
||||
<Resource Include="Resources\T-Icon-Pets-64.png" />
|
||||
<Resource Include="Resources\T-Icon-Quests-64.png" />
|
||||
<Resource Include="Resources\Default.png" />
|
||||
<Resource Include="Resources\NoBackground.png" />
|
||||
<Resource Include="Resources\NoText.png" />
|
||||
<Resource Include="Resources\Flat.png" />
|
||||
<Resource Include="Resources\Cataba.png" />
|
||||
<Resource Include="Resources\BurbankBigCondensed-Bold.ttf" />
|
||||
<Resource Include="Resources\add_directory.png" />
|
||||
<Resource Include="Resources\delete.png" />
|
||||
<Resource Include="Resources\edit.png" />
|
||||
<Resource Include="Resources\go_to_directory.png" />
|
||||
<Resource Include="Resources\npcleftside.png" />
|
||||
<Resource Include="Resources\nx.png" />
|
||||
<Resource Include="Resources\ny.png" />
|
||||
<Resource Include="Resources\nz.png" />
|
||||
<Resource Include="Resources\px.png" />
|
||||
<Resource Include="Resources\py.png" />
|
||||
<Resource Include="Resources\pz.png" />
|
||||
<Resource Include="Resources\pointlight.png" />
|
||||
<Resource Include="Resources\spotlight.png" />
|
||||
<Resource Include="Resources\link_on.png" />
|
||||
<Resource Include="Resources\link_off.png" />
|
||||
<Resource Include="Resources\link_has.png" />
|
||||
<Resource Include="Resources\tl_play.png" />
|
||||
<Resource Include="Resources\tl_pause.png" />
|
||||
<Resource Include="Resources\tl_rewind.png" />
|
||||
<Resource Include="Resources\tl_forward.png" />
|
||||
<Resource Include="Resources\tl_previous.png" />
|
||||
<Resource Include="Resources\tl_next.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="csharp_wick.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="DLLs\csharp-wick.dll" />
|
||||
<Content Include="DLLs\ScintillaNET FindReplaceDialog.dll" />
|
||||
<Content Include="FModel.ico" />
|
||||
<None Include="Resources\FModel%281%29.ico" />
|
||||
<None Include="Resources\FModel.ico" />
|
||||
<None Include="Resources\FModel_Logo.png" />
|
||||
<None Include="Resources\wTemplateF.png" />
|
||||
<None Include="Resources\wTemplate.png" />
|
||||
<None Include="Resources\T512.png" />
|
||||
<None Include="Resources\U512.png" />
|
||||
<None Include="Resources\R512.png" />
|
||||
<None Include="Resources\Marvel512.png" />
|
||||
<None Include="Resources\M512.png" />
|
||||
<None Include="Resources\L512.png" />
|
||||
<None Include="Resources\E512.png" />
|
||||
<None Include="Resources\C512.png" />
|
||||
<None Include="Resources\twitter.ico" />
|
||||
<None Include="Resources\BurbankBigCondensed-Black-vJapanese.otf" />
|
||||
<None Include="Resources\reload64.png" />
|
||||
<None Include="Resources\clipSize64.png" />
|
||||
<None Include="Resources\LBolt64.png" />
|
||||
<None Include="Resources\dmg64.png" />
|
||||
<None Include="Resources\Challenges_Slider.png" />
|
||||
<None Include="Resources\T-Items-MTX-L.png" />
|
||||
<None Include="Resources\T-FNBR-SeasonalXP-L.png" />
|
||||
<None Include="Resources\T-FNBR-BattlePoints-L.png" />
|
||||
<None Include="Resources\BurbankBigCondensed-Black.ttf" />
|
||||
<None Include="Resources\BurbankBigCondensed-Bold.ttf" />
|
||||
<None Include="Resources\T-Icon-Pets-64.png" />
|
||||
<None Include="Resources\T-Icon-Quests-64.png" />
|
||||
<None Include="Resources\T-Icon-Variant-64.png" />
|
||||
<None Include="Resources\T-Icon-Traversal-64.png" />
|
||||
<None Include="Resources\T-Icon-Animated-64.png" />
|
||||
<None Include="Resources\T-Icon-Adaptive-64.png" />
|
||||
<None Include="Resources\unknown512.png" />
|
||||
<None Include="Resources\properties_16xLG.png" />
|
||||
<None Include="Resources\StatusAnnotations_Information_16xLG_color.png" />
|
||||
<None Include="Resources\folder_Closed_16xLG.png" />
|
||||
<None Include="Resources\folder_16x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="AfterResolveReferences">
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll'">
|
||||
<LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 47 KiB |
37
FModel/FModel.sln
Normal file
37
FModel/FModel.sln
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31912.275
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FModel", "FModel.csproj", "{B1F494EA-90A6-4C24-800E-2F724A1884CA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUE4Parse", "..\CUE4Parse\CUE4Parse\CUE4Parse.csproj", "{C4620341-BBB7-4384-AC7D-5082D3E0386E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUE4Parse-Conversion", "..\CUE4Parse\CUE4Parse-Conversion\CUE4Parse-Conversion.csproj", "{D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B1F494EA-90A6-4C24-800E-2F724A1884CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B1F494EA-90A6-4C24-800E-2F724A1884CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B1F494EA-90A6-4C24-800E-2F724A1884CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B1F494EA-90A6-4C24-800E-2F724A1884CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C4620341-BBB7-4384-AC7D-5082D3E0386E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C4620341-BBB7-4384-AC7D-5082D3E0386E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C4620341-BBB7-4384-AC7D-5082D3E0386E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C4620341-BBB7-4384-AC7D-5082D3E0386E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {53DB7A15-4E15-4575-9402-0110BDF2794E}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
155
FModel/Forms/AESManager.Designer.cs
generated
155
FModel/Forms/AESManager.Designer.cs
generated
|
|
@ -1,155 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class AESManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AESManager));
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox3.Controls.Add(this.textBox2);
|
||||
this.groupBox3.Controls.Add(this.label3);
|
||||
this.groupBox3.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(565, 49);
|
||||
this.groupBox3.TabIndex = 14;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Static Key:";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(74, 19);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(485, 20);
|
||||
this.textBox2.TabIndex = 2;
|
||||
this.textBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 22);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(62, 13);
|
||||
this.label3.TabIndex = 3;
|
||||
this.label3.Text = "Main PAKs:";
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OKButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.OKButton.Location = new System.Drawing.Point(480, 292);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(97, 21);
|
||||
this.OKButton.TabIndex = 16;
|
||||
this.OKButton.Text = "OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.panel1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 67);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(565, 219);
|
||||
this.groupBox1.TabIndex = 17;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Dynamic Keys:";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.AutoScroll = true;
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 16);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(559, 200);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(12, 296);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(124, 13);
|
||||
this.linkLabel1.TabIndex = 18;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "Latest Fortnite AES Keys";
|
||||
this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel1_LinkClicked);
|
||||
//
|
||||
// AESManager
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(589, 325);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(605, 364);
|
||||
this.Name = "AESManager";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "AES Manager";
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class AESManager : Form
|
||||
{
|
||||
public static bool isClosed { get; set; }
|
||||
|
||||
public AESManager()
|
||||
{
|
||||
InitializeComponent();
|
||||
isClosed = false;
|
||||
|
||||
textBox2.Text = @"0x" + Properties.Settings.Default.AESKey;
|
||||
|
||||
for (int i = 0; i < ThePak.dynamicPaksList.Count; i++)
|
||||
{
|
||||
string dCurrentUsedPak = ThePak.dynamicPaksList[i].thePak; //SET CURRENT DYNAMIC PAK
|
||||
int pFrom = dCurrentUsedPak.IndexOf("pakchunk") + "pakchunk".Length;
|
||||
int pTo = dCurrentUsedPak.LastIndexOf("WindowsClient.pak");
|
||||
|
||||
TextBox txtBox = new TextBox();
|
||||
txtBox.Location = new Point(164, 3 + (26 * i));
|
||||
txtBox.Size = new Size(372, 20);
|
||||
txtBox.Name = "txtBox_" + dCurrentUsedPak.Substring(pFrom, pTo - pFrom - 1);
|
||||
txtBox.Parent = panel1;
|
||||
|
||||
Label lbl = new Label();
|
||||
lbl.AutoSize = true;
|
||||
lbl.Location = new Point(3, 6 + (26 * i));
|
||||
lbl.Size = new Size(155, 13);
|
||||
lbl.Text = dCurrentUsedPak.Substring(0, dCurrentUsedPak.LastIndexOf("."));
|
||||
lbl.Parent = panel1;
|
||||
|
||||
if (DynamicKeysManager.AESEntries != null)
|
||||
{
|
||||
foreach (AESEntry s in DynamicKeysManager.AESEntries)
|
||||
{
|
||||
if (s.thePak == dCurrentUsedPak) { txtBox.Text = @"0x" + s.theKey; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(textBox2.Text))
|
||||
{
|
||||
Properties.Settings.Default.AESKey = textBox2.Text.Substring(2).ToUpper();
|
||||
}
|
||||
else { Properties.Settings.Default.AESKey = ""; }
|
||||
|
||||
DynamicKeysManager.AESEntries = new List<AESEntry>();
|
||||
for (int i = 0; i < ThePak.dynamicPaksList.Count; i++)
|
||||
{
|
||||
string dCurrentUsedPak = ThePak.dynamicPaksList[i].thePak; //SET CURRENT DYNAMIC PAK
|
||||
int pFrom = dCurrentUsedPak.IndexOf("pakchunk") + "pakchunk".Length;
|
||||
int pTo = dCurrentUsedPak.LastIndexOf("WindowsClient.pak");
|
||||
|
||||
Control[] controls = this.Controls.Find("txtBox_" + dCurrentUsedPak.Substring(pFrom, pTo - pFrom - 1), true);
|
||||
if (controls.Length > 0)
|
||||
{
|
||||
TextBox txtBox = controls[0] as TextBox;
|
||||
if (txtBox != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(txtBox.Text))
|
||||
{
|
||||
DynamicKeysManager.serialize(txtBox.Text.Substring(2).ToUpper(), dCurrentUsedPak);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
isClosed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://benbotfn.tk:8080/api/aes");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
167
FModel/Forms/About.Designer.cs
generated
167
FModel/Forms/About.Designer.cs
generated
|
|
@ -1,167 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class About
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About));
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.linkLabel3 = new System.Windows.Forms.LinkLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::FModel.Properties.Resources.FModel_Logo;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(90, 90);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(138, 98);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(69, 13);
|
||||
this.linkLabel1.TabIndex = 1;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "GitHub Repo";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// linkLabel2
|
||||
//
|
||||
this.linkLabel2.AutoSize = true;
|
||||
this.linkLabel2.Location = new System.Drawing.Point(381, 98);
|
||||
this.linkLabel2.Name = "linkLabel2";
|
||||
this.linkLabel2.Size = new System.Drawing.Size(43, 13);
|
||||
this.linkLabel2.TabIndex = 2;
|
||||
this.linkLabel2.TabStop = true;
|
||||
this.linkLabel2.Text = "Discord";
|
||||
this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(108, 47);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(360, 40);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "FModel is a Fortnite .PAK file explorer built in C#\r\nIf you find this project use" +
|
||||
"ful, feel free to give it a star on GitHub\r\n⊂(◕‿◕)つ";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(108, 8);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(360, 39);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "FModel";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point(12, 123);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(42, 13);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Credits:";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.Location = new System.Drawing.Point(53, 124);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(241, 13);
|
||||
this.label4.TabIndex = 11;
|
||||
this.label4.Text = "• Waddlesworth • Maiky M • AyeTSG • FireMonkey";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// linkLabel3
|
||||
//
|
||||
this.linkLabel3.AutoSize = true;
|
||||
this.linkLabel3.Location = new System.Drawing.Point(260, 98);
|
||||
this.linkLabel3.Name = "linkLabel3";
|
||||
this.linkLabel3.Size = new System.Drawing.Size(67, 13);
|
||||
this.linkLabel3.TabIndex = 12;
|
||||
this.linkLabel3.TabStop = true;
|
||||
this.linkLabel3.Text = "How To Use";
|
||||
this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);
|
||||
//
|
||||
// About
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(467, 145);
|
||||
this.Controls.Add(this.linkLabel3);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.linkLabel2);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "About";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "About FModel";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.LinkLabel linkLabel3;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class About : Form
|
||||
{
|
||||
public About()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
label2.Text += @" " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 5);
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/iAmAsval/FModel");
|
||||
}
|
||||
|
||||
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://discordapp.com/invite/JmWvXKb");
|
||||
}
|
||||
|
||||
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/iAmAsval/FModel#how-to-use");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
90
FModel/Forms/IconGeneratorAssets.Designer.cs
generated
90
FModel/Forms/IconGeneratorAssets.Designer.cs
generated
|
|
@ -1,90 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class IconGeneratorAssets
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IconGeneratorAssets));
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.checkedAssets = new System.Windows.Forms.CheckedListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OKButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.OKButton.Location = new System.Drawing.Point(222, 300);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(97, 21);
|
||||
this.OKButton.TabIndex = 15;
|
||||
this.OKButton.Text = "OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// checkedAssets
|
||||
//
|
||||
this.checkedAssets.CheckOnClick = true;
|
||||
this.checkedAssets.FormattingEnabled = true;
|
||||
this.checkedAssets.Items.AddRange(new object[] {
|
||||
"Challenges",
|
||||
"Consumables & Weapons",
|
||||
"Cosmetics",
|
||||
"Traps",
|
||||
"Variants",
|
||||
"Ammo",
|
||||
"STW Heroes",
|
||||
"STW Defenders",
|
||||
"STW Card Packs",
|
||||
"Creative Galleries"});
|
||||
this.checkedAssets.Location = new System.Drawing.Point(12, 12);
|
||||
this.checkedAssets.Name = "checkedAssets";
|
||||
this.checkedAssets.Size = new System.Drawing.Size(307, 274);
|
||||
this.checkedAssets.TabIndex = 16;
|
||||
//
|
||||
// IconGeneratorAssets
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(331, 333);
|
||||
this.Controls.Add(this.checkedAssets);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "IconGeneratorAssets";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "FModel Settings - Icon Assets";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.CheckedListBox checkedAssets;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class IconGeneratorAssets : Form
|
||||
{
|
||||
public IconGeneratorAssets()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//ICON CREATION
|
||||
checkedAssets.SetItemChecked(0, Properties.Settings.Default.createIconForChallenges);
|
||||
checkedAssets.SetItemChecked(1, Properties.Settings.Default.createIconForConsumablesWeapons);
|
||||
checkedAssets.SetItemChecked(2, Properties.Settings.Default.createIconForCosmetics);
|
||||
checkedAssets.SetItemChecked(3, Properties.Settings.Default.createIconForTraps);
|
||||
checkedAssets.SetItemChecked(4, Properties.Settings.Default.createIconForVariants);
|
||||
checkedAssets.SetItemChecked(5, Properties.Settings.Default.createIconForAmmo);
|
||||
checkedAssets.SetItemChecked(6, Properties.Settings.Default.createIconForSTWHeroes);
|
||||
checkedAssets.SetItemChecked(7, Properties.Settings.Default.createIconForSTWDefenders);
|
||||
checkedAssets.SetItemChecked(8, Properties.Settings.Default.createIconForSTWCardPacks);
|
||||
checkedAssets.SetItemChecked(9, Properties.Settings.Default.createIconForCreativeGalleries);
|
||||
}
|
||||
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
//ICON CREATION
|
||||
Properties.Settings.Default.createIconForChallenges = checkedAssets.GetItemChecked(0);
|
||||
Properties.Settings.Default.createIconForConsumablesWeapons = checkedAssets.GetItemChecked(1);
|
||||
Properties.Settings.Default.createIconForCosmetics = checkedAssets.GetItemChecked(2);
|
||||
Properties.Settings.Default.createIconForTraps = checkedAssets.GetItemChecked(3);
|
||||
Properties.Settings.Default.createIconForVariants = checkedAssets.GetItemChecked(4);
|
||||
Properties.Settings.Default.createIconForAmmo = checkedAssets.GetItemChecked(5);
|
||||
Properties.Settings.Default.createIconForSTWHeroes = checkedAssets.GetItemChecked(6);
|
||||
Properties.Settings.Default.createIconForSTWDefenders = checkedAssets.GetItemChecked(7);
|
||||
Properties.Settings.Default.createIconForSTWCardPacks = checkedAssets.GetItemChecked(8);
|
||||
Properties.Settings.Default.createIconForCreativeGalleries = checkedAssets.GetItemChecked(9);
|
||||
|
||||
Properties.Settings.Default.Save(); //SAVE
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
172
FModel/Forms/SearchFiles.Designer.cs
generated
172
FModel/Forms/SearchFiles.Designer.cs
generated
|
|
@ -1,172 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class SearchFiles
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SearchFiles));
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.listView1, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.545769F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 94.45423F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(798, 652);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2});
|
||||
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listView1.FullRowSelect = true;
|
||||
this.listView1.Location = new System.Drawing.Point(3, 39);
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.Size = new System.Drawing.Size(792, 610);
|
||||
this.listView1.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||
this.listView1.TabIndex = 0;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.View = System.Windows.Forms.View.Details;
|
||||
this.listView1.VirtualMode = true;
|
||||
this.listView1.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.listView1_RetrieveVirtualItem);
|
||||
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "Files";
|
||||
this.columnHeader1.Width = 569;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "PAKs";
|
||||
this.columnHeader2.Width = 219;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.button2);
|
||||
this.panel1.Controls.Add(this.button1);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Controls.Add(this.textBox1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(792, 30);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button2.Enabled = false;
|
||||
this.button2.Location = new System.Drawing.Point(708, 4);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||
this.button2.TabIndex = 3;
|
||||
this.button2.Text = "Extract";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.Button2_Click);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.Enabled = false;
|
||||
this.button1.Location = new System.Drawing.Point(627, 4);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Go To";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(44, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Search:";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(59, 6);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(438, 20);
|
||||
this.textBox1.TabIndex = 0;
|
||||
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
|
||||
//
|
||||
// SearchFiles
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(798, 652);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MinimumSize = new System.Drawing.Size(814, 691);
|
||||
this.Name = "SearchFiles";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Search Files";
|
||||
this.Load += new System.EventHandler(this.SearchFiles_Load);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.ListView listView1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,258 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
//todo: refactor this shit + search with multiple word separated by spaces
|
||||
public partial class SearchFiles : Form
|
||||
{
|
||||
TypeAssistant _assistant;
|
||||
List<FileInfo> _myInfos = new List<FileInfo>();
|
||||
List<FileInfoFilter> _myFilteredInfos;
|
||||
private static string _fileName;
|
||||
private static Dictionary<string, string> _myInfosDict;
|
||||
private static Dictionary<string, string> _myFilteredInfosDict;
|
||||
public static string SfPath;
|
||||
public static bool IsClosed;
|
||||
public static bool FilesToSearch;
|
||||
public static string[] myItems;
|
||||
|
||||
public SearchFiles()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_assistant = new TypeAssistant();
|
||||
_assistant.Idled += assistant_Idled;
|
||||
}
|
||||
|
||||
private async void SearchFiles_Load(object sender, EventArgs e)
|
||||
{
|
||||
IsClosed = false;
|
||||
FilesToSearch = false;
|
||||
_myInfosDict = new Dictionary<string, string>();
|
||||
|
||||
if (MainWindow.PakAsTxt != null)
|
||||
{
|
||||
for (int i = 0; i < MainWindow.PakAsTxt.Length; i++)
|
||||
{
|
||||
if (MainWindow.PakAsTxt[i].Contains(".uasset") || MainWindow.PakAsTxt[i].Contains(".uexp") || MainWindow.PakAsTxt[i].Contains(".ubulk"))
|
||||
{
|
||||
if (!_myInfosDict.ContainsKey(MainWindow.PakAsTxt[i].Substring(0, MainWindow.PakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal))))
|
||||
{
|
||||
_myInfosDict.Add(MainWindow.PakAsTxt[i].Substring(0, MainWindow.PakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal)), ThePak.AllpaksDictionary[Path.GetFileNameWithoutExtension(MainWindow.PakAsTxt[i])]);
|
||||
|
||||
_fileName = MainWindow.PakAsTxt[i].Substring(0, MainWindow.PakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal));
|
||||
_myInfos.Add(new FileInfo
|
||||
{
|
||||
FileName = _fileName,
|
||||
PakFile = ThePak.AllpaksDictionary[Path.GetFileNameWithoutExtension(MainWindow.PakAsTxt[i])],
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_myInfosDict.ContainsKey(MainWindow.PakAsTxt[i]))
|
||||
{
|
||||
_myInfosDict.Add(MainWindow.PakAsTxt[i], ThePak.AllpaksDictionary[Path.GetFileName(MainWindow.PakAsTxt[i])]);
|
||||
|
||||
_fileName = MainWindow.PakAsTxt[i];
|
||||
_myInfos.Add(new FileInfo
|
||||
{
|
||||
FileName = _fileName,
|
||||
PakFile = ThePak.AllpaksDictionary[Path.GetFileName(MainWindow.PakAsTxt[i])],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
ShowItemsVirtual(_myInfos);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
|
||||
{
|
||||
if (_myFilteredInfos == null || _myFilteredInfos.Count == 0)
|
||||
{
|
||||
var acc = _myInfos[e.ItemIndex];
|
||||
e.Item = new ListViewItem(
|
||||
new[]
|
||||
{ acc.FileName, acc.PakFile });
|
||||
}
|
||||
else
|
||||
{
|
||||
var acc2 = _myFilteredInfos[e.ItemIndex];
|
||||
e.Item = new ListViewItem(
|
||||
new[]
|
||||
{ acc2.FileName, acc2.PakFile });
|
||||
}
|
||||
}
|
||||
private void ShowItemsVirtual(List<FileInfo> infos)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
listView1.VirtualListSize = infos.Count;
|
||||
}));
|
||||
}
|
||||
private void ShowItemsVirtualFiltered(List<FileInfoFilter> infos)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
listView1.VirtualListSize = infos.Count;
|
||||
}));
|
||||
}
|
||||
|
||||
private void FilterListView()
|
||||
{
|
||||
if (listView1.InvokeRequired)
|
||||
{
|
||||
listView1.Invoke(new Action(FilterListView));
|
||||
return;
|
||||
}
|
||||
|
||||
_myFilteredInfos = new List<FileInfoFilter>();
|
||||
_myFilteredInfosDict = new Dictionary<string, string>();
|
||||
listView1.BeginUpdate();
|
||||
listView1.VirtualListSize = 0;
|
||||
listView1.Invalidate();
|
||||
|
||||
if (MainWindow.PakAsTxt != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(textBox1.Text) && textBox1.Text.Length > 2)
|
||||
{
|
||||
for (int i = 0; i < _myInfos.Count; i++)
|
||||
{
|
||||
bool checkSearch = false;
|
||||
string[] searchTextMultiple = textBox1.Text.Trim().Split(' ');
|
||||
if (searchTextMultiple.Length > 1)
|
||||
{
|
||||
for (int s = 0; s < searchTextMultiple.Length; ++s)
|
||||
{
|
||||
checkSearch = Utilities.CaseInsensitiveContains(_myInfos[i].FileName, searchTextMultiple[s]);
|
||||
if (!checkSearch)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
checkSearch = Utilities.CaseInsensitiveContains(_myInfos[i].FileName, textBox1.Text);
|
||||
|
||||
if (checkSearch)
|
||||
{
|
||||
if (_myInfos[i].FileName.Contains(".uasset") || _myInfos[i].FileName.Contains(".uexp") || _myInfos[i].FileName.Contains(".ubulk"))
|
||||
{
|
||||
if (!_myFilteredInfosDict.ContainsKey(_myInfos[i].FileName.Substring(0, _myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal))))
|
||||
{
|
||||
_myFilteredInfosDict.Add(_myInfos[i].FileName.Substring(0, _myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal)), ThePak.AllpaksDictionary[Path.GetFileNameWithoutExtension(_myInfos[i].FileName)]);
|
||||
|
||||
_fileName = _myInfos[i].FileName.Substring(0, _myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal));
|
||||
_myFilteredInfos.Add(new FileInfoFilter
|
||||
{
|
||||
FileName = _fileName,
|
||||
PakFile = ThePak.AllpaksDictionary[Path.GetFileNameWithoutExtension(_myInfos[i].FileName)],
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_myFilteredInfosDict.ContainsKey(_myInfos[i].FileName))
|
||||
{
|
||||
_myFilteredInfosDict.Add(_myInfos[i].FileName, ThePak.AllpaksDictionary[Path.GetFileName(_myInfos[i].FileName)]);
|
||||
|
||||
_fileName = _myInfos[i].FileName;
|
||||
_myFilteredInfos.Add(new FileInfoFilter
|
||||
{
|
||||
FileName = _fileName,
|
||||
PakFile = ThePak.AllpaksDictionary[Path.GetFileName(_myInfos[i].FileName)],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ShowItemsVirtualFiltered(_myFilteredInfos);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowItemsVirtual(_myInfos);
|
||||
}
|
||||
}
|
||||
|
||||
listView1.EndUpdate();
|
||||
}
|
||||
void assistant_Idled(object sender, EventArgs e)
|
||||
{
|
||||
Invoke(
|
||||
new MethodInvoker(() =>
|
||||
{
|
||||
FilterListView();
|
||||
}));
|
||||
}
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_assistant.TextChanged();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListView.SelectedIndexCollection col = listView1.SelectedIndices;
|
||||
SfPath = listView1.Items[col[0]].Text;
|
||||
|
||||
IsClosed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
button2.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void Button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListView.SelectedIndexCollection col = listView1.SelectedIndices;
|
||||
myItems = new string[col.Count];
|
||||
for (int i = 0; i < col.Count; i++) //ADD SELECTED ITEM TO ARRAY
|
||||
{
|
||||
myItems[i] = listView1.Items[col[i]].Text.Substring(listView1.Items[col[i]].Text.LastIndexOf("/") + 1);
|
||||
}
|
||||
|
||||
FilesToSearch = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
class FileInfo
|
||||
{
|
||||
public string FileName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string PakFile
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
class FileInfoFilter
|
||||
{
|
||||
public string FileName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string PakFile
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
575
FModel/Forms/Settings.Designer.cs
generated
575
FModel/Forms/Settings.Designer.cs
generated
|
|
@ -1,575 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings));
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox_tryToOpen = new System.Windows.Forms.CheckBox();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.filenameLabel = new System.Windows.Forms.Label();
|
||||
this.trackBar1 = new System.Windows.Forms.TrackBar();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.trackBar2 = new System.Windows.Forms.TrackBar();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.wPictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxSaveAsMergeImages = new System.Windows.Forms.CheckBox();
|
||||
this.imgsPerRow = new System.Windows.Forms.NumericUpDown();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.wPictureBox)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imgsPerRow)).BeginInit();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.groupBox6.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.groupBox3.Controls.Add(this.textBox2);
|
||||
this.groupBox3.Controls.Add(this.label3);
|
||||
this.groupBox3.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(560, 49);
|
||||
this.groupBox3.TabIndex = 13;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = ".PAK files";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(46, 19);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(508, 20);
|
||||
this.textBox2.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 22);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(34, 13);
|
||||
this.label3.TabIndex = 3;
|
||||
this.label3.Text = "Input:";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.groupBox2.Controls.Add(this.checkBox_tryToOpen);
|
||||
this.groupBox2.Controls.Add(this.textBox1);
|
||||
this.groupBox2.Controls.Add(this.label1);
|
||||
this.groupBox2.Location = new System.Drawing.Point(12, 67);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(560, 49);
|
||||
this.groupBox2.TabIndex = 14;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Extraction";
|
||||
//
|
||||
// checkBox_tryToOpen
|
||||
//
|
||||
this.checkBox_tryToOpen.AutoSize = true;
|
||||
this.checkBox_tryToOpen.Location = new System.Drawing.Point(397, 22);
|
||||
this.checkBox_tryToOpen.Name = "checkBox_tryToOpen";
|
||||
this.checkBox_tryToOpen.Size = new System.Drawing.Size(157, 17);
|
||||
this.checkBox_tryToOpen.TabIndex = 8;
|
||||
this.checkBox_tryToOpen.Text = "Try to open Extracted Asset";
|
||||
this.checkBox_tryToOpen.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(54, 19);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(337, 20);
|
||||
this.textBox1.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 22);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Output:";
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OKButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.OKButton.Location = new System.Drawing.Point(475, 532);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(97, 21);
|
||||
this.OKButton.TabIndex = 15;
|
||||
this.OKButton.Text = "OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.comboBox1);
|
||||
this.groupBox4.Controls.Add(this.label10);
|
||||
this.groupBox4.Controls.Add(this.button2);
|
||||
this.groupBox4.Controls.Add(this.checkBox8);
|
||||
this.groupBox4.Controls.Add(this.checkBox7);
|
||||
this.groupBox4.Controls.Add(this.filenameLabel);
|
||||
this.groupBox4.Controls.Add(this.trackBar1);
|
||||
this.groupBox4.Controls.Add(this.label9);
|
||||
this.groupBox4.Controls.Add(this.trackBar2);
|
||||
this.groupBox4.Controls.Add(this.label8);
|
||||
this.groupBox4.Controls.Add(this.button1);
|
||||
this.groupBox4.Controls.Add(this.wPictureBox);
|
||||
this.groupBox4.Location = new System.Drawing.Point(12, 220);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(560, 195);
|
||||
this.groupBox4.TabIndex = 16;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Icon Creation";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Items.AddRange(new object[] {
|
||||
"English",
|
||||
"French",
|
||||
"German",
|
||||
"Italian",
|
||||
"Spanish",
|
||||
"Spanish (LA)",
|
||||
"Arabic",
|
||||
"Japanese",
|
||||
"Korean",
|
||||
"Polish",
|
||||
"Portuguese (Brazil)",
|
||||
"Russian",
|
||||
"Turkish",
|
||||
"Chinese (S)",
|
||||
"Traditional Chinese"});
|
||||
this.comboBox1.Location = new System.Drawing.Point(70, 161);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(309, 21);
|
||||
this.comboBox1.TabIndex = 29;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(6, 164);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(58, 13);
|
||||
this.label10.TabIndex = 28;
|
||||
this.label10.Text = "Language:";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(6, 19);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(377, 22);
|
||||
this.button2.TabIndex = 27;
|
||||
this.button2.Text = "Manage Assets";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
this.checkBox8.AutoSize = true;
|
||||
this.checkBox8.Location = new System.Drawing.Point(6, 47);
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.Size = new System.Drawing.Size(177, 17);
|
||||
this.checkBox8.TabIndex = 26;
|
||||
this.checkBox8.Text = "Use Featured Image If Available";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged);
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
this.checkBox7.AutoSize = true;
|
||||
this.checkBox7.Location = new System.Drawing.Point(6, 75);
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.Size = new System.Drawing.Size(15, 14);
|
||||
this.checkBox7.TabIndex = 25;
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
this.checkBox7.CheckedChanged += new System.EventHandler(this.checkBox7_CheckedChanged);
|
||||
//
|
||||
// filenameLabel
|
||||
//
|
||||
this.filenameLabel.AutoEllipsis = true;
|
||||
this.filenameLabel.AutoSize = true;
|
||||
this.filenameLabel.Location = new System.Drawing.Point(115, 76);
|
||||
this.filenameLabel.MaximumSize = new System.Drawing.Size(260, 13);
|
||||
this.filenameLabel.Name = "filenameLabel";
|
||||
this.filenameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.filenameLabel.TabIndex = 24;
|
||||
this.filenameLabel.Text = "File Name: ";
|
||||
//
|
||||
// trackBar1
|
||||
//
|
||||
this.trackBar1.Location = new System.Drawing.Point(54, 128);
|
||||
this.trackBar1.Maximum = 100;
|
||||
this.trackBar1.Name = "trackBar1";
|
||||
this.trackBar1.Size = new System.Drawing.Size(325, 45);
|
||||
this.trackBar1.TabIndex = 20;
|
||||
this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||
this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(18, 99);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(30, 13);
|
||||
this.label9.TabIndex = 23;
|
||||
this.label9.Text = "Size:";
|
||||
//
|
||||
// trackBar2
|
||||
//
|
||||
this.trackBar2.Location = new System.Drawing.Point(54, 99);
|
||||
this.trackBar2.Maximum = 1000;
|
||||
this.trackBar2.Minimum = 1;
|
||||
this.trackBar2.Name = "trackBar2";
|
||||
this.trackBar2.Size = new System.Drawing.Size(325, 45);
|
||||
this.trackBar2.TabIndex = 22;
|
||||
this.trackBar2.TickFrequency = 25;
|
||||
this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||
this.trackBar2.Value = 1;
|
||||
this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_ValueChanged);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(2, 131);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(46, 13);
|
||||
this.label8.TabIndex = 21;
|
||||
this.label8.Text = "Opacity:";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(27, 69);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(82, 24);
|
||||
this.button1.TabIndex = 19;
|
||||
this.button1.Text = "Watermark";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// wPictureBox
|
||||
//
|
||||
this.wPictureBox.Image = global::FModel.Properties.Resources.wTemplate;
|
||||
this.wPictureBox.Location = new System.Drawing.Point(389, 19);
|
||||
this.wPictureBox.Name = "wPictureBox";
|
||||
this.wPictureBox.Size = new System.Drawing.Size(165, 165);
|
||||
this.wPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.wPictureBox.TabIndex = 18;
|
||||
this.wPictureBox.TabStop = false;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.checkBoxSaveAsMergeImages);
|
||||
this.groupBox1.Controls.Add(this.imgsPerRow);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.textBox3);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 473);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(560, 49);
|
||||
this.groupBox1.TabIndex = 17;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Merger";
|
||||
//
|
||||
// checkBoxSaveAsMergeImages
|
||||
//
|
||||
this.checkBoxSaveAsMergeImages.AutoSize = true;
|
||||
this.checkBoxSaveAsMergeImages.Checked = true;
|
||||
this.checkBoxSaveAsMergeImages.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxSaveAsMergeImages.Location = new System.Drawing.Point(434, 21);
|
||||
this.checkBoxSaveAsMergeImages.Name = "checkBoxSaveAsMergeImages";
|
||||
this.checkBoxSaveAsMergeImages.Size = new System.Drawing.Size(120, 17);
|
||||
this.checkBoxSaveAsMergeImages.TabIndex = 13;
|
||||
this.checkBoxSaveAsMergeImages.Text = "Enable \"Save as...\"";
|
||||
this.checkBoxSaveAsMergeImages.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// imgsPerRow
|
||||
//
|
||||
this.imgsPerRow.Location = new System.Drawing.Point(375, 19);
|
||||
this.imgsPerRow.Maximum = new decimal(new int[] {
|
||||
20,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.imgsPerRow.Name = "imgsPerRow";
|
||||
this.imgsPerRow.ReadOnly = true;
|
||||
this.imgsPerRow.Size = new System.Drawing.Size(44, 20);
|
||||
this.imgsPerRow.TabIndex = 12;
|
||||
this.imgsPerRow.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.imgsPerRow.ThousandsSeparator = true;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(281, 22);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(88, 13);
|
||||
this.label5.TabIndex = 10;
|
||||
this.label5.Text = "Images Per Row:";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(69, 19);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(206, 20);
|
||||
this.textBox3.TabIndex = 8;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(6, 22);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(57, 13);
|
||||
this.label4.TabIndex = 9;
|
||||
this.label4.Text = "File Name:";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.groupBox5.Controls.Add(this.checkBox1);
|
||||
this.groupBox5.Controls.Add(this.label7);
|
||||
this.groupBox5.Controls.Add(this.textBox5);
|
||||
this.groupBox5.Controls.Add(this.label6);
|
||||
this.groupBox5.Controls.Add(this.textBox4);
|
||||
this.groupBox5.Controls.Add(this.label2);
|
||||
this.groupBox5.Location = new System.Drawing.Point(12, 122);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(560, 92);
|
||||
this.groupBox5.TabIndex = 18;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "Optional - Automatic Key Detection for Dynamic PAKs";
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(499, 71);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(60, 17);
|
||||
this.checkBox1.TabIndex = 7;
|
||||
this.checkBox1.Text = "Reveal";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1_CheckedChanged);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.ForeColor = System.Drawing.Color.Red;
|
||||
this.label7.Location = new System.Drawing.Point(137, 72);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(355, 13);
|
||||
this.label7.TabIndex = 6;
|
||||
this.label7.Text = "2FA must be disabled to make it work or use another account without 2FA";
|
||||
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(95, 45);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(459, 20);
|
||||
this.textBox5.TabIndex = 4;
|
||||
this.textBox5.UseSystemPasswordChar = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(6, 48);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(83, 13);
|
||||
this.label6.TabIndex = 5;
|
||||
this.label6.Text = "EPIC Password:";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(74, 19);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(480, 20);
|
||||
this.textBox4.TabIndex = 2;
|
||||
this.textBox4.UseSystemPasswordChar = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 22);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(62, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "EPIC Email:";
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.checkBox2);
|
||||
this.groupBox6.Controls.Add(this.textBox6);
|
||||
this.groupBox6.Controls.Add(this.label12);
|
||||
this.groupBox6.Location = new System.Drawing.Point(12, 421);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(560, 46);
|
||||
this.groupBox6.TabIndex = 19;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "Challenges";
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(448, 21);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(105, 17);
|
||||
this.checkBox2.TabIndex = 27;
|
||||
this.checkBox2.Text = "Draw Reward ID";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(74, 19);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(359, 20);
|
||||
this.textBox6.TabIndex = 8;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(6, 22);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(62, 13);
|
||||
this.label12.TabIndex = 9;
|
||||
this.label12.Text = "Watermark:";
|
||||
//
|
||||
// Settings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(584, 565);
|
||||
this.Controls.Add(this.groupBox6);
|
||||
this.Controls.Add(this.groupBox5);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.groupBox4);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Settings";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "FModel Settings";
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox4.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.wPictureBox)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imgsPerRow)).EndInit();
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.groupBox5.PerformLayout();
|
||||
this.groupBox6.ResumeLayout(false);
|
||||
this.groupBox6.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.Label filenameLabel;
|
||||
private System.Windows.Forms.TrackBar trackBar1;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TrackBar trackBar2;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.PictureBox wPictureBox;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.NumericUpDown imgsPerRow;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.TextBox textBox6;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.CheckBox checkBox_tryToOpen;
|
||||
private System.Windows.Forms.CheckBox checkBoxSaveAsMergeImages;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using FModel.Properties;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class Settings : Form
|
||||
{
|
||||
private static string _paKsPathBefore;
|
||||
private static string _outputPathBefore;
|
||||
private static string _oldLanguage;
|
||||
|
||||
public Settings()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
textBox2.Text = Properties.Settings.Default.PAKsPath;
|
||||
textBox1.Text = Properties.Settings.Default.ExtractOutput;
|
||||
|
||||
textBox4.Text = Properties.Settings.Default.eEmail;
|
||||
textBox5.Text = Properties.Settings.Default.ePassword;
|
||||
|
||||
textBox6.Text = Properties.Settings.Default.challengesWatermark;
|
||||
checkBox2.Checked = Properties.Settings.Default.challengesDebug;
|
||||
if (string.IsNullOrWhiteSpace(textBox6.Text))
|
||||
{
|
||||
textBox6.Text = "{Bundle_Name} Generated using FModel & JohnWickParse - {Date}";
|
||||
}
|
||||
else { textBox6.Text = Properties.Settings.Default.challengesWatermark; }
|
||||
|
||||
checkBox_tryToOpen.Checked = Properties.Settings.Default.tryToOpenAssets;
|
||||
|
||||
//MERGER
|
||||
textBox3.Text = Properties.Settings.Default.mergerFileName;
|
||||
checkBoxSaveAsMergeImages.Checked = Properties.Settings.Default.mergerImagesSaveAs;
|
||||
imgsPerRow.Value = Properties.Settings.Default.mergerImagesRow;
|
||||
|
||||
//WATERMARK
|
||||
button1.Enabled = Properties.Settings.Default.isWatermark;
|
||||
checkBox7.Checked = Properties.Settings.Default.isWatermark;
|
||||
trackBar1.Enabled = Properties.Settings.Default.isWatermark;
|
||||
trackBar2.Enabled = Properties.Settings.Default.isWatermark;
|
||||
trackBar1.Value = Properties.Settings.Default.wOpacity;
|
||||
trackBar2.Value = Properties.Settings.Default.wSize;
|
||||
|
||||
//FEATURED
|
||||
checkBox8.Checked = Properties.Settings.Default.loadFeaturedImage;
|
||||
if (File.Exists(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.wOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize), (522 - Properties.Settings.Default.wSize) / 2, (522 - Properties.Settings.Default.wSize) / 2, Properties.Settings.Default.wSize, Properties.Settings.Default.wSize);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
_oldLanguage = Properties.Settings.Default.IconLanguage;
|
||||
comboBox1.SelectedIndex = comboBox1.FindStringExact(Properties.Settings.Default.IconLanguage);
|
||||
|
||||
_paKsPathBefore = Properties.Settings.Default.PAKsPath;
|
||||
_outputPathBefore = Properties.Settings.Default.ExtractOutput;
|
||||
}
|
||||
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
//INPUT
|
||||
Properties.Settings.Default.PAKsPath = textBox2.Text; //SET
|
||||
string paKsPathAfter = Properties.Settings.Default.PAKsPath;
|
||||
if (_paKsPathBefore != paKsPathAfter)
|
||||
{
|
||||
MessageBox.Show(@"Please, restart FModel to apply your new input path", @"Fortnite .PAK Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
//OUTPUT
|
||||
Properties.Settings.Default.ExtractOutput = textBox1.Text; //SET
|
||||
if (!Directory.Exists(Properties.Settings.Default.ExtractOutput))
|
||||
Directory.CreateDirectory(Properties.Settings.Default.ExtractOutput);
|
||||
string outputPathAfter = Properties.Settings.Default.ExtractOutput;
|
||||
if (_outputPathBefore != outputPathAfter)
|
||||
{
|
||||
MessageBox.Show(@"Please, restart FModel to apply your new output path", @"FModel Output Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
Properties.Settings.Default.eEmail = textBox4.Text;
|
||||
Properties.Settings.Default.ePassword = textBox5.Text;
|
||||
|
||||
Properties.Settings.Default.challengesDebug = checkBox2.Checked;
|
||||
Properties.Settings.Default.challengesWatermark = textBox6.Text;
|
||||
|
||||
Properties.Settings.Default.tryToOpenAssets = checkBox_tryToOpen.Checked;
|
||||
|
||||
//MERGER
|
||||
Properties.Settings.Default.mergerFileName = textBox3.Text;
|
||||
Properties.Settings.Default.mergerImagesSaveAs = checkBoxSaveAsMergeImages.Checked;
|
||||
Properties.Settings.Default.mergerImagesRow = Decimal.ToInt32(imgsPerRow.Value);
|
||||
|
||||
//WATERMARK
|
||||
Properties.Settings.Default.isWatermark = checkBox7.Checked;
|
||||
Properties.Settings.Default.wSize = trackBar2.Value;
|
||||
Properties.Settings.Default.wOpacity = trackBar1.Value;
|
||||
|
||||
//FEATURED
|
||||
Properties.Settings.Default.loadFeaturedImage = checkBox8.Checked;
|
||||
|
||||
//LOCRES
|
||||
Properties.Settings.Default.IconLanguage = comboBox1.SelectedItem.ToString();
|
||||
if (comboBox1.SelectedItem.ToString() != _oldLanguage)
|
||||
{
|
||||
LoadLocRes.LoadMySelectedLocRes(Properties.Settings.Default.IconLanguage);
|
||||
}
|
||||
|
||||
Properties.Settings.Default.Save(); //SAVE
|
||||
Close();
|
||||
}
|
||||
|
||||
#region SELECT WATERMARK
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog theDialog = new OpenFileDialog();
|
||||
theDialog.Title = @"Choose your watermark";
|
||||
theDialog.Multiselect = false;
|
||||
theDialog.Filter = @"PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|DDS Files (*.dds)|*.dds|All Files (*.*)|*.*";
|
||||
|
||||
if (theDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.wFilename = theDialog.FileName;
|
||||
Properties.Settings.Default.Save();
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RESIZE WATERMARK
|
||||
private void trackBar2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
private void trackBar1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void checkBox7_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
button1.Enabled = checkBox7.Checked;
|
||||
trackBar1.Enabled = checkBox7.Checked;
|
||||
trackBar2.Enabled = checkBox7.Checked;
|
||||
}
|
||||
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!checkBox8.Checked)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (File.Exists(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (File.Exists(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
var assetsForm = new IconGeneratorAssets();
|
||||
if (Application.OpenForms[assetsForm.Name] == null)
|
||||
{
|
||||
assetsForm.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.OpenForms[assetsForm.Name].Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
textBox4.UseSystemPasswordChar = !checkBox1.Checked;
|
||||
textBox5.UseSystemPasswordChar = !checkBox1.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
193
FModel/Forms/TweetForm.Designer.cs
generated
193
FModel/Forms/TweetForm.Designer.cs
generated
|
|
@ -1,193 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class TweetForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TweetForm));
|
||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.richTextBox1.Location = new System.Drawing.Point(12, 66);
|
||||
this.richTextBox1.MaxLength = 280;
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.richTextBox1.Size = new System.Drawing.Size(386, 178);
|
||||
this.richTextBox1.TabIndex = 0;
|
||||
this.richTextBox1.Text = "";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.checkBox1);
|
||||
this.groupBox1.Controls.Add(this.textBox5);
|
||||
this.groupBox1.Controls.Add(this.comboBox1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(570, 48);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Settings";
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(504, 21);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(60, 17);
|
||||
this.checkBox1.TabIndex = 8;
|
||||
this.checkBox1.Text = "Reveal";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1_CheckedChanged);
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(149, 19);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(349, 20);
|
||||
this.textBox5.TabIndex = 7;
|
||||
this.textBox5.UseSystemPasswordChar = true;
|
||||
this.textBox5.TextChanged += new System.EventHandler(this.TextBox5_TextChanged);
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Items.AddRange(new object[] {
|
||||
"Consumer API Key",
|
||||
"Consumer API Secret",
|
||||
"Access Token",
|
||||
"Access Token Secret"});
|
||||
this.comboBox1.Location = new System.Drawing.Point(6, 19);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(137, 21);
|
||||
this.comboBox1.TabIndex = 6;
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1_SelectedIndexChanged);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(404, 66);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(178, 178);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(101)))), ((int)(((byte)(214)))));
|
||||
this.button1.Location = new System.Drawing.Point(507, 250);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 3;
|
||||
this.button1.Text = "Tweet";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.Button1_Click);
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(404, 250);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||
this.button2.TabIndex = 4;
|
||||
this.button2.Text = "Add Image";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.Button2_Click);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(12, 255);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(40, 13);
|
||||
this.label5.TabIndex = 5;
|
||||
this.label5.Text = "Status:";
|
||||
//
|
||||
// backgroundWorker1
|
||||
//
|
||||
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.BackgroundWorker1_DoWork);
|
||||
this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.BackgroundWorker1_RunWorkerCompleted);
|
||||
//
|
||||
// TweetForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(594, 282);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.richTextBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "TweetForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Twitter";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.ComponentModel.BackgroundWorker backgroundWorker1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using TweetSharp;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class TweetForm : Form
|
||||
{
|
||||
private static string ImagePath { get; set; }
|
||||
private static TwitterService service { get; set; }
|
||||
|
||||
public TweetForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
ImagePath = null;
|
||||
pictureBox1.Image = null;
|
||||
|
||||
OpenFileDialog theDialog = new OpenFileDialog();
|
||||
theDialog.InitialDirectory = App.DefaultOutputPath + "\\Icons\\";
|
||||
theDialog.Title = @"Choose your image";
|
||||
theDialog.Filter = @"PNG Files (*.png)|*.png|JPEG Files (*.jpg)|*.jpg|BMP Files (*.bmp)|*.bmp|All Files (*.*)|*.*";
|
||||
|
||||
if (theDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ImagePath = theDialog.FileName;
|
||||
pictureBox1.Image = Image.FromFile(ImagePath);
|
||||
}
|
||||
}
|
||||
|
||||
private void Button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (backgroundWorker1.IsBusy != true && !string.IsNullOrEmpty(richTextBox1.Text))
|
||||
{
|
||||
backgroundWorker1.RunWorkerAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private void BackgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
label5.ForeColor = Color.FromArgb(255, 0, 0, 0);
|
||||
string tweetText = "";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
tweetText = richTextBox1.Text;
|
||||
}));
|
||||
|
||||
if (service == null)
|
||||
{
|
||||
service = new TwitterService(Properties.Settings.Default.tConsKey, Properties.Settings.Default.tConsSecret);
|
||||
service.AuthenticateWith(Properties.Settings.Default.tToken, Properties.Settings.Default.tTokenSecret);
|
||||
UpdateStatus("Authentication to Twitter");
|
||||
}
|
||||
|
||||
Dictionary<string, Stream> myDict = new Dictionary<string, Stream>();
|
||||
if (pictureBox1.Image != null)
|
||||
{
|
||||
if (new System.IO.FileInfo(ImagePath).Length < 5000000)
|
||||
{
|
||||
myDict.Add(Path.GetFileNameWithoutExtension(ImagePath), new FileStream(ImagePath, FileMode.Open, FileAccess.Read, FileShare.Read));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("File size can't be larger than 5mb.");
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable CS0618
|
||||
if (pictureBox1.Image != null)
|
||||
{
|
||||
UpdateStatus("Tweeting with " + Path.GetFileNameWithoutExtension(ImagePath));
|
||||
TwitterStatus response = service.SendTweetWithMedia(new SendTweetWithMediaOptions
|
||||
{
|
||||
Status = tweetText,
|
||||
Images = myDict
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateStatus("Tweeting without image");
|
||||
TwitterStatus response = service.SendTweet(new SendTweetOptions
|
||||
{
|
||||
Status = tweetText
|
||||
});
|
||||
}
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
|
||||
private void BackgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (e.Error != null)
|
||||
{
|
||||
label5.ForeColor = Color.FromArgb(255, 244, 66, 66);
|
||||
label5.Text = "Status: " + e.Error.Message;
|
||||
}
|
||||
else
|
||||
{
|
||||
label5.ForeColor = Color.FromArgb(255, 43, 135, 28);
|
||||
label5.Text = "Status: Tweeted";
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateStatus(string text)
|
||||
{
|
||||
if (label5.InvokeRequired)
|
||||
{
|
||||
BeginInvoke(new Action<string>(UpdateStatus), new object[] { text });
|
||||
return;
|
||||
}
|
||||
|
||||
label5.Text = "Status: " + text;
|
||||
}
|
||||
|
||||
private void ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (comboBox1.SelectedIndex == 0)
|
||||
{
|
||||
textBox5.Text = Properties.Settings.Default.tConsKey;
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 1)
|
||||
{
|
||||
textBox5.Text = Properties.Settings.Default.tConsSecret;
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 2)
|
||||
{
|
||||
textBox5.Text = Properties.Settings.Default.tToken;
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 3)
|
||||
{
|
||||
textBox5.Text = Properties.Settings.Default.tTokenSecret;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
textBox5.UseSystemPasswordChar = !checkBox1.Checked;
|
||||
}
|
||||
|
||||
private void TextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (comboBox1.SelectedIndex == 0)
|
||||
{
|
||||
Properties.Settings.Default.tConsKey = textBox5.Text;
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 1)
|
||||
{
|
||||
Properties.Settings.Default.tConsSecret = textBox5.Text;
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 2)
|
||||
{
|
||||
Properties.Settings.Default.tToken = textBox5.Text;
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 3)
|
||||
{
|
||||
Properties.Settings.Default.tTokenSecret = textBox5.Text;
|
||||
}
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAAAAAAAEAIADDGQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAGYpJ
|
||||
REFUeNrtnXmUXFW1xn+d7gxkIAmZCCQQIyAIAdRoIqhB8AUZnPApzoKIE+ADl7PykIf6fCL6HJ4DIoMI
|
||||
ouIYRSAkiBBRlIQwhkEgIRDI3CF0OkN3vz++U+amUt3p6q5bde6932+tu9Kp7k7qnjr7u/vss/c+YIwx
|
||||
xhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wx
|
||||
xhhjjDHGGGOMMcYYY4wxxphd0eQhMI3m6FvaUvl3588a6sG1AJgMGXwLMAQYDAwF9gAmAOOB3YAuoDNx
|
||||
tQHPAE8DG4D28NpWC4IFwMRv9IOCke8PvAR4ITAxGP04YFgQg8FAc/idrsSfHcHo24G1QQiWAXcDi4GH
|
||||
wuubLAYWABOH0Y8FXhAM/sXAi4DJwKgazscu5BE8BdwHLAJuAu4HNloMLACmvoY/GDgIOB44ETgQGAkM
|
||||
qOPbWg38HfhjEIN/AluyIASVhLRW79UCYNKcqBOAVwJvBI4C9o7gbXYCTwLzgSuBBWgJEZ0QVBjPg1Cc
|
||||
5B4LgInZ8J8PnBwM/xAUwIuR9cgjuBS4LSkEjRaBsjEdCrwV+BBwHnCDBcDEaPgTwkQ9HZiWoVtZD8wB
|
||||
vo2WCTRKCCqM6cHAJ4C3AQ8DrwGeyZQAlN+UI7C5M/4RwAnAh4GXAwMzeltPAN8FLkExg7rN1wqGvyfw
|
||||
buADwH7htW8BZwNdmRGA7vZ8LQK5MPwWtLY/A5iNXNWs0wncCHwJLQtSna8V7GN3FCw9C5jJ9kDpJuA9
|
||||
wLW1fD/1FICZQCvwgEUgF8Y/LkzSD4Wv88ZTwIXAD4Hnaj1nKxj+GODYYOSvZGcxfQg4BlieGQFI3ORw
|
||||
4CrkKn4AeMQikGnjn46CUcexPUEnj2wGfgR8AVhVizlbwfAnAq9D7v50lAlZiYuRp7WtljbTUqeBfBlS
|
||||
tdHA/wIfQRlbHH1Lm0UgO8bfgoJR/4my9/LOYBTX2Av4JArCVT1nu1kGTwFOAt4BHLYLW2xFrv+2Wt9g
|
||||
PQSgBUWGR4e/nwBcBHwUWGERyIThJ43hPJS1VxSa0HbmGBSAW9ibOduN0Y8CDgVeC7wBJUT1JhnqVuD2
|
||||
tG4u7clzCPAHYJ/Et7vQkuBj1Mi1Mql+hkPDZ/UptJwrKn9HInhnpTnbjdEPC4Y+Oxj+oVQnoO3A+4Cf
|
||||
pmEj9fAAjkW53kmakOvTjlyrdaUBtAhEZ/zDgM+jp9+Qgg/LS1GuwOmoxqA7ox8R5vwxweino4rGvrAI
|
||||
mJvWDaUtACPDAFTyNAYAp6B1zedQ1ZZFIC7jH4Se/OegJYBRnsM3gggsDa8NREVOhwWROBIlQu1J/+od
|
||||
NpPISUjDLlIRgMQEOhRVfPX0/58eBOKzFoGojL8JCfTHbfw78W/A11BAu2T0M1Gtw4ga/j9/IOz7p0Xa
|
||||
HsCxqN67J5qB94cJ9xmLQBTGDwpSnY8SU8zOnIRc/LSqGpejPIQNkF58LM1yzDHA0b382WbgNOAr4fcq
|
||||
TUhTPw4HvoxcWNO97YxOyYY6gO8Bf63HTdSUhNEeEK7e0oyinRaBBpAY51EoJnOQR6VhXINqEoB0d8fS
|
||||
9ABmsmv3v5IInAp8HWVIWQTqa/xNaDn2eo9Kw7gJLYXXp238aQrAbiha2pc8g2aUFvkd4HkWgbryCrTd
|
||||
N8hD0RDuREHXJ+r1H6YVBByPer31lSYUZBmOtqDuL4mAA4O1JSGsI4Lxx9C1p4jcjrJjF5de6M1c72+1
|
||||
bU0FIPFm9qfviQ9JZqMiiLOBf1gEUuVElLNh6s884D8IyUW7MuBujH4c8tyerOY/TmsJcCC1Sxk9EpVk
|
||||
ztrFAJgqSYzjROBM8lHPnyW6gF+guMsujf/oW9rK5/4glGr/aeAn4euqSGMJMIDeFzn0lsODCHwK+C3Q
|
||||
aU+gppwMzPAw1JV25N2eT8h9qWT83TzsxqPq2jegrfa9gcuAP8cgACNQ3/dasz/wfVSaeQmwuTQ4FoLq
|
||||
SUysvYB3ku+6/thoRXkW30EnGe0wj3uoL5iGlmnHoV6BpWarDwBfJRyAUo09pCEAQ9mx8q+WjEd5AnuH
|
||||
G15fGjCLQJ85AaWzmvqwErnsVxLq++fPGlrJvQelYD8fpR4fjw5TGVP2M5tQWvKSvryZmpYDhxs4ELiZ
|
||||
dLPItqFy4nNJbJlYBKr6nAiT6Zck4ismdeM/C/h5Dz+zO3qAvgK5+a9CD7zubPUSFEBs64sNpOEBTCD9
|
||||
stEW4L0oePVJwtaJPYGqmYUKWUx9jP/shPEPRIHywciznQ5MRQl0B6Oo/q6WZQuAC/pq/GkKQL2qx2YH
|
||||
Efg88HtCcLCvg1EwBqJedB6o+rACxcbODWM/Gbn3E1D69Wiqa6f+FGrNtqw/byoNARhFffvCT0M7BBei
|
||||
IOFGsDfQHQn3fyp2/evJYdQu1tKG2pbPL73Q17meRh7AIOp76CPIhfoiqs/et8JkNzvzGtIL1pr06ESV
|
||||
gpf11/jzJACgZcdpwBXAEUkRsBDsxNAgAN76yx4/Q0//qrf86ikAjWQW2mI5jcShlBaBHcZgH7SlZLLF
|
||||
TSgZbl0tjD8tAYiBqcA3Ue+2qRaBnZiBgk8mO/wN9WesaaVgGgKwEeU4N5phwAeBq1ESRXNJBAouBC2o
|
||||
vsIlv9lhMaoUvKf0Qq0C3GkIwLPA1ogGbwZwOdoqHFt6scAiMArVVphssAQlD91Ra+NPSwA2ksIRRv1k
|
||||
XBCAy9HTr6kkAgUUgvHsfE6DiZMH0HmAt6Zh/GkJwFri8gBKtKC895+hFuT/WgMXQQjKejWOyPXN5oM7
|
||||
Ucv8fu/111sAlpM4TjlC9kYlmFejtuUtFYwkzxyA4iMmXm4Lxr8gTeNPSwDWAU9HPsDNqI76J2hPdYfk
|
||||
oRwLwUDSKdU2tePGYPyL0jb+tASgje1HJsXOWOATqEDjXSRc45wKwXALQNT8Fu1cLamH8acpAI9kaNCb
|
||||
gJcBP0BZhK8mUcuQMxEYS8LbMVFxDTp5+PF6GX9aAgBwFzrYMEsMBd6EgoQXoZLMf4lAToRgEg4AxsYW
|
||||
VMR2JqoYrJvxpy0AazL6gYxD+66/QsuDSTkSglHUt1LT9Ewr8F9hnq2pt/FDjTsClYwEHZj4a+ROZ5kO
|
||||
lIV1Beqcs0PL5SyVG4fP5d2og4yzABvPCnQC0FUkWoPVm7Q8gFbqcLBhHWhGx5tfBPwGJWXslTSqLHgE
|
||||
ZYd/tET/hvPP/WyvXG2Y8ZPyZLgJBTVG5eADa0Etmw4H3oMyCn9H8AiSIhC5VzCC/BaAZYWbkct/Zwxz
|
||||
Js3JsAi4O2cfXgvaMfgmMAedonswibr6yL0CBwAby+/Q4bdRGH8qApC4oXUoqSGPDERnH16AehF+C/Uh
|
||||
GFYuBJGJwfCY3kzB2BYEYGksxp+KAJTxR6o8qyxjNAFTgI+gIOGPgbejnYOmcjGIgBhrNIrCABLNcmNZ
|
||||
KqYiAImbuwe4riAf8Bh0ovGl4Z4vBI5B3V53EIIGikGr7bDxAhBTnCjtiPBWVHTzZmCPgnzQQ1Cn4mko
|
||||
0ntXEIS5wMOEQqlyEajTpFiPmrU0RTJWRSO6HIx6RITvQDsCRWQUcBTwP0EErkE93Y6k7IinNL2DhLi0
|
||||
4mVAI4luCza1N1Q67wzVBlyKzjcbXdAPvgkdYHJiuNaigo8FqNnDXcBqQqfXSiJQIw9hfRAAJwI1hui6
|
||||
MNdLkf6EgmTv9xwAtBw6IlwfQYHSe1HW4WJ0VvxKYEPpF7rzDKoUhuVIkN0PoDFEt/RK/Q0lJu5Lggi4
|
||||
Gq1nnkN54Q8GMVgCPIq2j9aH7/e10GoscD1uCd4o/hO4oEhBwCQLUerjuTgI1RPDwrUPWjZtC0a/AXkK
|
||||
jwKPhWtFEIs1qBfjliAOW1AdQ2fZv70aeWMWgMbQEdsbSl0AErGALuBiFBR7ledCVZ/RyHBNRqfHEoRh
|
||||
UzD2LUEg1gQjXxtEIykIW8PPjw+/65oAC0B9JkFCBJ5ELbgODBPR9O+zS6b2Tuzl73kbsHHE1i27IYUh
|
||||
89DhhtGpYUGw8TeGLiLcgq2bACQCHx3Ad8lvnYAxlehES7FiCkCZCKxEB3Xc53lhCsJWIkzFbmRt+EJU
|
||||
TrvSc8MUgE3U+GDPTApA2R7oHOArQLvnhymAAERXGVuzXYBqilsSuwKdqB33JHT6qbemTF5pJ8JO2bX2
|
||||
AHbqjNOLFNY21FjjcnZOXDEmL8R2anYqAvBa4BzgIMoO19hFldt6FA/4heeJySkrKYAH8ALUCOM6dNjB
|
||||
G1Cf/R2EoCQGZcuElahZ4u89V0wOWYa83aio9Zq7dINTgPcBJ6OuQDeE617kCnXnETyBDuXoCOJhTF54
|
||||
iggzAWstAO1oHV+KBQxDueszUU/9f6BqtHmouu3ZCv/G4+iYpHbgLbiNtckHm2J8U2l4ANuo3PpoLIoR
|
||||
zEZqeB/b69/vQVskbShbajmKJXQAb7MImIzTSUgCiu3ciFoLwNpgwLv18DMD0LbfJOBYFBhZh8pcl4Wv
|
||||
NwYRGR7+vSGeQybDbCTSE7NrLQDPUH2kczCwZ7iO8FwxOWQDavASHbV2rdcitTPGbGcloRt03gVgE/IC
|
||||
jDHbuY9Ef8c8C0AbiuIbY7bzMBGWAqchAO1EutYxpkFsQ7teUZLG9tqDuLrPmBKthFOyYzw6vmYCkLi5
|
||||
B6mc4GNMUQUg2gNy0/AAlqE9fWOM0tujqwFIUwDWAX/z524MoEzXaE9lTkMAOoMARFf6aEyd6URL4q4i
|
||||
CQCo6Mf5AKborCFyb7imApAIBC4D/uLP3xSc5ajqNcodgJoLQIJ21BQkyuQHY+rEX1FMLFrSLLP9M/BP
|
||||
zwFTUDpRA5yoT8CquQAkXJ0nUPMPY4rIGuQBRE2aHkAn8HPgac8FU0CWo1hYtOv/tAUAdPrPdZ4LpoBE
|
||||
v/5PTQASircFuBK5Q8YUhU7U5i76E7Dr0WvvduA3nhOmQKwiI9vgqQlAwgvYjI4Df9zzwhSERYQdsJjX
|
||||
/6kKQIUBuYyIUyKNqSHzyEhrvFQFIKF+XcClwALPDZNzVgE3Z+XNpu4BJERgOToE1DUCJs8sRi3Aonf/
|
||||
6yIAZdwEfJsIj0gypkbMI9IGoA0TgIQSdgLfw7sCJp+sIUPuf90EoEwE1gKfxfEAkz/uAZaUzXcLQAUe
|
||||
RkeBu4OwyRPziLj7T8MFoEwVbw8isMzzxuSA1SjGlSnq7gGUicAc4KOEpgnGZJjbiLj9dzQCUGGAfguc
|
||||
BTzmOWQyyhbg10Tc/TcqAaggAnOA01HGoDFZYwkZdP8bKgAVRGAecApwg+eTyRhzCMd/Zcn9b7gAVBiw
|
||||
u4H3AxeTQXfKFJKVaBmbSRouABVEYDlwDnA28Ijnl4mcW9D+f+ae/tEIQIXBawN+CLwdZQ36kBETI5tR
|
||||
8C+zh+E2xfimjr5lB+9/FPBW4ExgmueciYiFwPGEAjd7ADWibCDXo5jAm4GLiPisdVMoulDT28waP0Tq
|
||||
ASQp8wZagBcD7wXeCOzleWgaxBLgRDLS+SezAlBBBJJC8K7wIexLpN6MyS1fAM7PsvFnRgB2IQT7AScA
|
||||
bwIOB4Z5bpqU+WeYcw9aAGps1L0ZzApCADAWOBKYDcwCplgMTEr8N/A5oCvLxh+lAFSiu0Hu4XenII/g
|
||||
TGCq56upIUvRsvPenuZmVmiJ5H1MRi7VI8itWkMiE7A3IgEMB8YB04GjgFcAe3q+mhpzLXB/How/JgHo
|
||||
BD6I1vMrkLouQQeMPgU8ibZbtiCvZQCwOzARmAQcBBwW/twT2M3z1KTAk8BVYb7mglgE4GnUIuxwYP9w
|
||||
lYRhU7g2hj+bgIFofT8EGAoM8tw0deCXZLDmPwsC0AHMRdWAycDdgPD3YSjIZ0yjeBS4hAyc91cNMe2d
|
||||
L8D9AEycdAE/IsNFP9EKQGIwV6PCitysr0xu+AdwRR5vLLbsuTm4U7CJi3bgOygAmKunfzQCkBjUh4Ef
|
||||
Yy/AxMNccnyQTYz58z8lRFqNaTBr0VF2GyB/T/+oBCAxuEvR8WGZbbJgcsO1wJ/yfIOxVtBdA/zB8880
|
||||
kMeA7wJbIZ9P/+gEIDHIG4AL8YEhpjFsQ67/4rzfaMw19HcAX0PZf8bUkz8Cl5f+ktenf5QCkBjsLuAy
|
||||
4ErPR1NHlgNfAdbl3fijFICyQX8O+BI5D8SYaOhArv9finLDWWijtQz4OAVYj5mGcyNK+QXy//SPWgDK
|
||||
Bv9O4GOoIMOYNFiBXP81RTH+qAWgwocwP4jAMs9VU2M60ZbfrUW78eiXABWOEj8TewKmtswFvo8Cz4V5
|
||||
+kOGugKXtQV7LfAN4EDPXdNPHgXeAfytaMYPGeqlX/bBXA+8D7jN89f0g2eB80rGX0QydZhGmQjcjjoI
|
||||
XYMyt4yphi7gB+h4r0rzqxBk6mCQEmXLgT2As4AzUFdgY3rDdegBsqqoxp9ZAaggAs3AscC5wEzPbbML
|
||||
HkJHzy8ssvFnWgC6EYLnIW/g3biJqKlMK2pB/7PSCxaAfInAQHQwyDnAMbhluNlOJ0r2OY8QNyqy8edG
|
||||
ACqIACg28BbgNOBFxNMC3TSOq1EeSSEKfQolAD0Iwd7AScB70elBFoJiMhdtHS+38edYAHoQgkno/ME3
|
||||
AzPQ0WKmGCxCEf9/9Zq0AORcAHoQgpFop+Ak4NXAPsBgT4XcshQ9+efb+AsoAD0IQQs6lfgI4DXAkWi5
|
||||
4NmRH9YAHwZ+YeMvuAD0IASgnYNJKEbwknAdjAKJw4o4TjngOeAz6FCPwhX5WAD6LgYAI9Ax4wegk4r3
|
||||
C3/ui5YQg9H24qAgHiYutqF+kucT2svb+C0A/RGEAcBw5A3sDoxBSUdnAC/3yEVn/N8HPkeOD/SwADRW
|
||||
EMYCnwZOx7sJMdEBXIxc/1YbvwUgDSE4FPgi2lLMVDVlzukELgE+aeO3AKRh+M3A8cAFKFho4jL+S4FP
|
||||
AOtt/L3HWXG9M/4JaL3/YVxkFBtdwBXoyb/ew1Ed9gB6Nvwm4JXA51FhkV3++PgxKvxaW3rBT//eYw+g
|
||||
suGDmoucAnwU5QiYuOhg+5Pfxt9H7AHsbPyDUGbgOcAsvM8fI5uA/0PB2FYbvwWgFoYPyv47A3gbMNrT
|
||||
I0pagS+jI7w22fgtALUw/CmoRdQpKPvPxMlK4LPI9XdDDwtAv4wetLZ/SzD8Q3CQL2aWopOhflV6wcZv
|
||||
AeiL4TcBU4HXAe9E3YKaPRWi5h4Uk5ln47cA9MXoQQU8hwL/DrweFffY8ONnLkrtvdPGbwGo1uibgL3Q
|
||||
Xv6JwNHARH/smaAdrfXPRyf32vgtAL0y+mZUxz8NOA6YjQJ7Q/xxZ4ZngC8BPwLabPwWgJ4MHlSqOxmY
|
||||
jtp9zUA1/CP9EWeORSjSf33yRRt/gQSgB0MvMRjV5B8SDH4meuKPx+cAZJVO4Nco7XqJDT/HAtALA0++
|
||||
v+GoQ8/ebO/OcwCqyNs3fM9km3XA94CLcFpvNgSgCiPeFS3oiT4kXKORO79f4no+qsIbjjv45o070Hr/
|
||||
OhKnPNv4IxKAXhp7CwrAtZR93Yzc8mFsb6k1DrnrpWtC+HMceqLvFozdtQr5pRVF+b+Oknxs+A2gmmrA
|
||||
oWg7bUz4umTQya+7u4YkxGAgeooPtoEXloUon38OsMXGnw0BaEJFMm8PhtxsAzZV8izwE9Sx91EbfrYE
|
||||
4DngC8g9f6uN31TJQuCrwG+AzTb+7AkAaK12BvA48AFcMmt2zXLgMtSwc1nyGzb+xtPrp3hZIHAgyrD7
|
||||
OPAqXEVnduZZtK//bZTH32XDz7AAdCME44FTkTcw1cNp0FbercA3gRsIJ/PY8HMiABVEANRJ51TgZNw/
|
||||
r8g8gE7luRpYnfyGjT9HAtCNEAxA2XmnopJbV90Vgy6UuvvTcD1iwy+IAHQjBM3Ai9F24evR0sA7Bvmj
|
||||
E7gfuAr4OYltPRt+wQSgGyEYgNJ434iWBtNwh9080AHcC1wJXEsii8+GX3AB6EYIQEdtH4fyB2bg7cMs
|
||||
shm4GyXy/Apt79nwLQBVCcEI4HB0sOZxwAtwcU/srAb+BPwSmI8689rwLQD9EgJQkPAo1KprFmrd5VhB
|
||||
HGwDHgZ+j572i0n04LfhWwBqKQaDUazgGNSz76VoyeDkovqzAliAuvHMBZ4gkcBjw7cApCkEoMrCKcgz
|
||||
OAp1+pmIzzBMkzWoDdf1wI1oG89PewtAw8VgCLAPSjU+Ang5Wibs7o+tX3Sidfy9aG1/c/h6Q/kP2vAt
|
||||
ALGIwUDUEegQ1PhzBurxPwF5DaZnNiH3/g7k4v8ZFXTZ6C0A8dJDJ6KhQRCmo+zDlwIHoWYl7hGoLbtV
|
||||
KEPvr8BdwN/Rk7/dRm8yIQBVCMIIlFvwQlSXMDWIw17ojIA8z/AOYD1qrLkErecfQE/7VVR4ytvoTSYF
|
||||
oApBGBAEYSTyEPZDRUqHoYajpU7Du2XsltuDQa8HHkJr98fQNt0T4XsbbfCmEAJQhSCU7nUk8gb2QEuG
|
||||
yUEo9kNewx5BFIaGa1Adx6gzGHhb+HMzapy5FO3Jr0UNNe5FyTnPdmfsNnhTSAHogyiUGIKalw4K12S0
|
||||
HTk68fruKD9hFPIgSs1OSw1Pk+PZFAy6dHWEaxtqgtkaDHoV2oZrQ0/vp4ORrwS2hquNxPFYNnZjAaiv
|
||||
OCQZjHYkkq3PB5QZfpKuCldnMOwt6CnfWc0bsLEbC0DcItEnbNjGGGOMMcYYY4wxxhhjjDHGGGOMMcYY
|
||||
Y4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDFZ4P8B/XGV
|
||||
UwXmhiUAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
523
FModel/Forms/UpdateModeSettings.Designer.cs
generated
523
FModel/Forms/UpdateModeSettings.Designer.cs
generated
|
|
@ -1,523 +0,0 @@
|
|||
namespace FModel.Forms
|
||||
{
|
||||
partial class UpdateModeSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateModeSettings));
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxUMCTGalleries = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox15 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox13 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox12 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox11 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox10 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox14 = new System.Windows.Forms.CheckBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.filenameLabel = new System.Windows.Forms.Label();
|
||||
this.trackBar1 = new System.Windows.Forms.TrackBar();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.trackBar2 = new System.Windows.Forms.TrackBar();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.wPictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.optionsOKButton = new System.Windows.Forms.Button();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.wPictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(215)))), ((int)(((byte)(243)))));
|
||||
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel2.Controls.Add(this.label4);
|
||||
this.panel2.Location = new System.Drawing.Point(12, 296);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(253, 22);
|
||||
this.panel2.TabIndex = 24;
|
||||
this.panel2.Visible = false;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.Location = new System.Drawing.Point(3, 3);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(245, 13);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "- Include Sprays, Banners, Emojis, Musics, Toys";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(215)))), ((int)(((byte)(243)))));
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Location = new System.Drawing.Point(12, 310);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(232, 22);
|
||||
this.panel1.TabIndex = 23;
|
||||
this.panel1.Visible = false;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.Location = new System.Drawing.Point(3, 3);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(224, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "- Include All New Creative Devices Textures";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.checkBoxUMCTGalleries);
|
||||
this.groupBox1.Controls.Add(this.checkBox15);
|
||||
this.groupBox1.Controls.Add(this.checkBox13);
|
||||
this.groupBox1.Controls.Add(this.checkBox12);
|
||||
this.groupBox1.Controls.Add(this.checkBox11);
|
||||
this.groupBox1.Controls.Add(this.checkBox10);
|
||||
this.groupBox1.Controls.Add(this.checkBox9);
|
||||
this.groupBox1.Controls.Add(this.checkBox1);
|
||||
this.groupBox1.Controls.Add(this.checkBox14);
|
||||
this.groupBox1.Controls.Add(this.label7);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 231);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(633, 68);
|
||||
this.groupBox1.TabIndex = 22;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Texture Extraction";
|
||||
//
|
||||
// checkBoxUMCTGalleries
|
||||
//
|
||||
this.checkBoxUMCTGalleries.AutoSize = true;
|
||||
this.checkBoxUMCTGalleries.Location = new System.Drawing.Point(438, 42);
|
||||
this.checkBoxUMCTGalleries.Name = "checkBoxUMCTGalleries";
|
||||
this.checkBoxUMCTGalleries.Size = new System.Drawing.Size(108, 17);
|
||||
this.checkBoxUMCTGalleries.TabIndex = 9;
|
||||
this.checkBoxUMCTGalleries.Text = "Creative Galleries";
|
||||
this.checkBoxUMCTGalleries.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox15
|
||||
//
|
||||
this.checkBox15.AutoSize = true;
|
||||
this.checkBox15.Location = new System.Drawing.Point(360, 42);
|
||||
this.checkBox15.Name = "checkBox15";
|
||||
this.checkBox15.Size = new System.Drawing.Size(66, 17);
|
||||
this.checkBox15.TabIndex = 8;
|
||||
this.checkBox15.Text = "Vehicles";
|
||||
this.checkBox15.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox13
|
||||
//
|
||||
this.checkBox13.AutoSize = true;
|
||||
this.checkBox13.Location = new System.Drawing.Point(438, 19);
|
||||
this.checkBox13.Name = "checkBox13";
|
||||
this.checkBox13.Size = new System.Drawing.Size(107, 17);
|
||||
this.checkBox13.TabIndex = 7;
|
||||
this.checkBox13.Text = "Creative Devices";
|
||||
this.checkBox13.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox12
|
||||
//
|
||||
this.checkBox12.AutoSize = true;
|
||||
this.checkBox12.Location = new System.Drawing.Point(248, 42);
|
||||
this.checkBox12.Name = "checkBox12";
|
||||
this.checkBox12.Size = new System.Drawing.Size(60, 17);
|
||||
this.checkBox12.TabIndex = 6;
|
||||
this.checkBox12.Text = "Athena";
|
||||
this.checkBox12.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox11
|
||||
//
|
||||
this.checkBox11.AutoSize = true;
|
||||
this.checkBox11.Location = new System.Drawing.Point(108, 42);
|
||||
this.checkBox11.Name = "checkBox11";
|
||||
this.checkBox11.Size = new System.Drawing.Size(105, 17);
|
||||
this.checkBox11.TabIndex = 5;
|
||||
this.checkBox11.Text = "Featured Images";
|
||||
this.checkBox11.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox10
|
||||
//
|
||||
this.checkBox10.AutoSize = true;
|
||||
this.checkBox10.Location = new System.Drawing.Point(551, 19);
|
||||
this.checkBox10.Name = "checkBox10";
|
||||
this.checkBox10.Size = new System.Drawing.Size(72, 17);
|
||||
this.checkBox10.TabIndex = 4;
|
||||
this.checkBox10.Text = "2d Assets";
|
||||
this.checkBox10.UseVisualStyleBackColor = true;
|
||||
this.checkBox10.MouseEnter += new System.EventHandler(this.checkBox10_MouseEnter);
|
||||
this.checkBox10.MouseLeave += new System.EventHandler(this.checkBox10_MouseLeave);
|
||||
this.checkBox10.MouseMove += new System.Windows.Forms.MouseEventHandler(this.checkBox10_MouseMove);
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
this.checkBox9.AutoSize = true;
|
||||
this.checkBox9.Location = new System.Drawing.Point(108, 19);
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.Size = new System.Drawing.Size(124, 17);
|
||||
this.checkBox9.TabIndex = 3;
|
||||
this.checkBox9.Text = "Cosmetics && Variants";
|
||||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(360, 20);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(72, 17);
|
||||
this.checkBox1.TabIndex = 2;
|
||||
this.checkBox1.Text = "Weapons";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox14
|
||||
//
|
||||
this.checkBox14.AutoSize = true;
|
||||
this.checkBox14.Location = new System.Drawing.Point(248, 20);
|
||||
this.checkBox14.Name = "checkBox14";
|
||||
this.checkBox14.Size = new System.Drawing.Size(106, 17);
|
||||
this.checkBox14.TabIndex = 1;
|
||||
this.checkBox14.Text = "Loading Screens";
|
||||
this.checkBox14.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(6, 20);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(96, 13);
|
||||
this.label7.TabIndex = 0;
|
||||
this.label7.Text = "Supported Folders:";
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.checkBox8);
|
||||
this.groupBox4.Controls.Add(this.checkBox7);
|
||||
this.groupBox4.Controls.Add(this.filenameLabel);
|
||||
this.groupBox4.Controls.Add(this.trackBar1);
|
||||
this.groupBox4.Controls.Add(this.label9);
|
||||
this.groupBox4.Controls.Add(this.trackBar2);
|
||||
this.groupBox4.Controls.Add(this.label8);
|
||||
this.groupBox4.Controls.Add(this.button1);
|
||||
this.groupBox4.Controls.Add(this.wPictureBox);
|
||||
this.groupBox4.Controls.Add(this.checkBox6);
|
||||
this.groupBox4.Controls.Add(this.checkBox5);
|
||||
this.groupBox4.Controls.Add(this.checkBox4);
|
||||
this.groupBox4.Controls.Add(this.checkBox3);
|
||||
this.groupBox4.Controls.Add(this.checkBox2);
|
||||
this.groupBox4.Controls.Add(this.label6);
|
||||
this.groupBox4.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(633, 213);
|
||||
this.groupBox4.TabIndex = 21;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Icon Creation";
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
this.checkBox8.AutoSize = true;
|
||||
this.checkBox8.Location = new System.Drawing.Point(6, 57);
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.Size = new System.Drawing.Size(177, 17);
|
||||
this.checkBox8.TabIndex = 26;
|
||||
this.checkBox8.Text = "Use Featured Image If Available";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged);
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
this.checkBox7.AutoSize = true;
|
||||
this.checkBox7.Location = new System.Drawing.Point(6, 105);
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.Size = new System.Drawing.Size(15, 14);
|
||||
this.checkBox7.TabIndex = 25;
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
this.checkBox7.CheckedChanged += new System.EventHandler(this.checkBox7_CheckedChanged);
|
||||
//
|
||||
// filenameLabel
|
||||
//
|
||||
this.filenameLabel.AutoSize = true;
|
||||
this.filenameLabel.Location = new System.Drawing.Point(115, 106);
|
||||
this.filenameLabel.Name = "filenameLabel";
|
||||
this.filenameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.filenameLabel.TabIndex = 24;
|
||||
this.filenameLabel.Text = "File Name: ";
|
||||
//
|
||||
// trackBar1
|
||||
//
|
||||
this.trackBar1.Location = new System.Drawing.Point(58, 158);
|
||||
this.trackBar1.Maximum = 100;
|
||||
this.trackBar1.Name = "trackBar1";
|
||||
this.trackBar1.Size = new System.Drawing.Size(398, 45);
|
||||
this.trackBar1.TabIndex = 20;
|
||||
this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||
this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(22, 129);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(30, 13);
|
||||
this.label9.TabIndex = 23;
|
||||
this.label9.Text = "Size:";
|
||||
//
|
||||
// trackBar2
|
||||
//
|
||||
this.trackBar2.Location = new System.Drawing.Point(58, 129);
|
||||
this.trackBar2.Maximum = 1000;
|
||||
this.trackBar2.Minimum = 1;
|
||||
this.trackBar2.Name = "trackBar2";
|
||||
this.trackBar2.Size = new System.Drawing.Size(398, 45);
|
||||
this.trackBar2.TabIndex = 22;
|
||||
this.trackBar2.TickFrequency = 25;
|
||||
this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||
this.trackBar2.Value = 1;
|
||||
this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_ValueChanged);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(6, 161);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(46, 13);
|
||||
this.label8.TabIndex = 21;
|
||||
this.label8.Text = "Opacity:";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(27, 99);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(82, 24);
|
||||
this.button1.TabIndex = 19;
|
||||
this.button1.Text = "Watermark";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// wPictureBox
|
||||
//
|
||||
this.wPictureBox.Image = global::FModel.Properties.Resources.wTemplate;
|
||||
this.wPictureBox.Location = new System.Drawing.Point(462, 42);
|
||||
this.wPictureBox.Name = "wPictureBox";
|
||||
this.wPictureBox.Size = new System.Drawing.Size(165, 165);
|
||||
this.wPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.wPictureBox.TabIndex = 18;
|
||||
this.wPictureBox.TabStop = false;
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
this.checkBox6.AutoSize = true;
|
||||
this.checkBox6.Location = new System.Drawing.Point(476, 19);
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.Size = new System.Drawing.Size(78, 17);
|
||||
this.checkBox6.TabIndex = 14;
|
||||
this.checkBox6.Text = "Challenges";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
this.checkBox5.AutoSize = true;
|
||||
this.checkBox5.Location = new System.Drawing.Point(189, 19);
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.Size = new System.Drawing.Size(64, 17);
|
||||
this.checkBox5.TabIndex = 4;
|
||||
this.checkBox5.Text = "Variants";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(415, 19);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(53, 17);
|
||||
this.checkBox4.TabIndex = 3;
|
||||
this.checkBox4.Text = "Traps";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Location = new System.Drawing.Point(261, 19);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(147, 17);
|
||||
this.checkBox3.TabIndex = 2;
|
||||
this.checkBox3.Text = "Consumables && Weapons";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.checkBox3.MouseEnter += new System.EventHandler(this.checkBox3_MouseEnter);
|
||||
this.checkBox3.MouseLeave += new System.EventHandler(this.checkBox3_MouseLeave);
|
||||
this.checkBox3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.checkBox3_MouseMove);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(108, 19);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(74, 17);
|
||||
this.checkBox2.TabIndex = 1;
|
||||
this.checkBox2.Text = "Cosmetics";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(6, 20);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(96, 13);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Supported Folders:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.ForeColor = System.Drawing.Color.Red;
|
||||
this.label2.Location = new System.Drawing.Point(184, 315);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(320, 13);
|
||||
this.label2.TabIndex = 20;
|
||||
this.label2.Text = "The more Assets you choose, the more time it will take to complete";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.Red;
|
||||
this.label1.Location = new System.Drawing.Point(168, 314);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(19, 13);
|
||||
this.label1.TabIndex = 19;
|
||||
this.label1.Text = "⚠️";
|
||||
//
|
||||
// optionsOKButton
|
||||
//
|
||||
this.optionsOKButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.optionsOKButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.optionsOKButton.Location = new System.Drawing.Point(512, 311);
|
||||
this.optionsOKButton.Name = "optionsOKButton";
|
||||
this.optionsOKButton.Size = new System.Drawing.Size(97, 21);
|
||||
this.optionsOKButton.TabIndex = 18;
|
||||
this.optionsOKButton.Text = "OK";
|
||||
this.optionsOKButton.UseVisualStyleBackColor = true;
|
||||
this.optionsOKButton.Click += new System.EventHandler(this.optionsOKButton_Click);
|
||||
//
|
||||
// UpdateModeSettings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(657, 344);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.groupBox4);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.optionsOKButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "UpdateModeSettings";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Update Mode Settings";
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox4.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.wPictureBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox15;
|
||||
private System.Windows.Forms.CheckBox checkBox13;
|
||||
private System.Windows.Forms.CheckBox checkBox12;
|
||||
private System.Windows.Forms.CheckBox checkBox11;
|
||||
private System.Windows.Forms.CheckBox checkBox10;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox14;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.Label filenameLabel;
|
||||
private System.Windows.Forms.TrackBar trackBar1;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TrackBar trackBar2;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.PictureBox wPictureBox;
|
||||
private System.Windows.Forms.CheckBox checkBox6;
|
||||
private System.Windows.Forms.CheckBox checkBox5;
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
private System.Windows.Forms.CheckBox checkBox3;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button optionsOKButton;
|
||||
private System.Windows.Forms.CheckBox checkBoxUMCTGalleries;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using FModel.Properties;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class UpdateModeSettings : Form
|
||||
{
|
||||
public UpdateModeSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//ICON CREATION
|
||||
checkBox2.Checked = Properties.Settings.Default.UMCosmetics;
|
||||
checkBox5.Checked = Properties.Settings.Default.UMVariants;
|
||||
checkBox3.Checked = Properties.Settings.Default.UMConsumablesWeapons;
|
||||
checkBox4.Checked = Properties.Settings.Default.UMTraps;
|
||||
checkBox6.Checked = Properties.Settings.Default.UMChallenges;
|
||||
|
||||
//FEATURED
|
||||
checkBox8.Checked = Properties.Settings.Default.UMFeatured;
|
||||
if (File.Exists(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)Properties.Settings.Default.UMOpacity / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize), (522 - Properties.Settings.Default.UMSize) / 2, (522 - Properties.Settings.Default.UMSize) / 2, Properties.Settings.Default.UMSize, Properties.Settings.Default.UMSize);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
//WATERMARK
|
||||
button1.Enabled = Properties.Settings.Default.UMWatermark;
|
||||
trackBar1.Enabled = Properties.Settings.Default.UMWatermark;
|
||||
trackBar2.Enabled = Properties.Settings.Default.UMWatermark;
|
||||
trackBar2.Value = Properties.Settings.Default.UMSize;
|
||||
trackBar1.Value = Properties.Settings.Default.UMOpacity;
|
||||
checkBox7.Checked = Properties.Settings.Default.UMWatermark;
|
||||
|
||||
//TEXTURES
|
||||
checkBox9.Checked = Properties.Settings.Default.UMTCosmeticsVariants;
|
||||
checkBox14.Checked = Properties.Settings.Default.UMTLoading;
|
||||
checkBox1.Checked = Properties.Settings.Default.UMTWeapons;
|
||||
checkBox10.Checked = Properties.Settings.Default.UMTBanners;
|
||||
checkBox11.Checked = Properties.Settings.Default.UMTFeaturedIMGs;
|
||||
checkBox12.Checked = Properties.Settings.Default.UMTAthena;
|
||||
checkBox13.Checked = Properties.Settings.Default.UMTDevices;
|
||||
checkBox15.Checked = Properties.Settings.Default.UMTVehicles;
|
||||
checkBoxUMCTGalleries.Checked = Properties.Settings.Default.UMCTGalleries;
|
||||
}
|
||||
|
||||
private void optionsOKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.UMCosmetics = checkBox2.Checked;
|
||||
Properties.Settings.Default.UMVariants = checkBox5.Checked;
|
||||
Properties.Settings.Default.UMConsumablesWeapons = checkBox3.Checked;
|
||||
Properties.Settings.Default.UMTraps = checkBox4.Checked;
|
||||
Properties.Settings.Default.UMChallenges = checkBox6.Checked;
|
||||
Properties.Settings.Default.UMFeatured = checkBox8.Checked;
|
||||
Properties.Settings.Default.UMWatermark = checkBox7.Checked;
|
||||
Properties.Settings.Default.UMTCosmeticsVariants = checkBox9.Checked;
|
||||
Properties.Settings.Default.UMTLoading = checkBox14.Checked;
|
||||
Properties.Settings.Default.UMTWeapons = checkBox1.Checked;
|
||||
Properties.Settings.Default.UMTBanners = checkBox10.Checked;
|
||||
Properties.Settings.Default.UMTFeaturedIMGs = checkBox11.Checked;
|
||||
Properties.Settings.Default.UMTAthena = checkBox12.Checked;
|
||||
Properties.Settings.Default.UMTDevices = checkBox13.Checked;
|
||||
Properties.Settings.Default.UMTVehicles = checkBox15.Checked;
|
||||
Properties.Settings.Default.UMCTGalleries = checkBoxUMCTGalleries.Checked;
|
||||
|
||||
Properties.Settings.Default.UMSize = trackBar2.Value;
|
||||
Properties.Settings.Default.UMOpacity = trackBar1.Value;
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
Close();
|
||||
}
|
||||
|
||||
#region SELECT WATERMARK
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog theDialog = new OpenFileDialog();
|
||||
theDialog.Title = @"Choose your watermark";
|
||||
theDialog.Multiselect = false;
|
||||
theDialog.Filter = @"PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|DDS Files (*.dds)|*.dds|All Files (*.*)|*.*";
|
||||
|
||||
if (theDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.UMFilename = theDialog.FileName;
|
||||
Properties.Settings.Default.Save();
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RESIZE WATERMARK
|
||||
private void trackBar2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
private void trackBar1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void checkBox7_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
button1.Enabled = checkBox7.Checked;
|
||||
trackBar1.Enabled = checkBox7.Checked;
|
||||
trackBar2.Enabled = checkBox7.Checked;
|
||||
}
|
||||
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(checkBox8.Checked ? Resources.wTemplateF : Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
|
||||
g.DrawImage(ImageUtilities.ResizeImage(opacityImage, trackBar2.Value, trackBar2.Value), (522 - trackBar2.Value) / 2, (522 - trackBar2.Value) / 2, trackBar2.Value, trackBar2.Value);
|
||||
}
|
||||
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
|
||||
#region MOVE PANEL
|
||||
//CONSUMABLES & WEAPONS
|
||||
private void checkBox3_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
panel1.Visible = true;
|
||||
}
|
||||
private void checkBox3_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
panel1.Visible = false;
|
||||
}
|
||||
private void checkBox3_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
panel1.Left = e.X + 40;
|
||||
panel1.Top = e.Y + 5;
|
||||
}
|
||||
|
||||
//2D ASSETS
|
||||
private void checkBox10_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
panel2.Visible = true;
|
||||
}
|
||||
private void checkBox10_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
panel2.Visible = false;
|
||||
}
|
||||
private void checkBox10_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
panel2.Left = e.X + 225;
|
||||
panel2.Top = e.Y + 225;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
32
FModel/Framework/AsyncQueue.cs
Normal file
32
FModel/Framework/AsyncQueue.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks.Dataflow;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class AsyncQueue<T> : IAsyncEnumerable<T>
|
||||
{
|
||||
private readonly SemaphoreSlim _semaphore = new(1);
|
||||
private readonly BufferBlock<T> _buffer = new();
|
||||
|
||||
public int Count => _buffer.Count;
|
||||
|
||||
public void Enqueue(T item) => _buffer.Post(item);
|
||||
|
||||
public async IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken token = default)
|
||||
{
|
||||
await _semaphore.WaitAsync(token);
|
||||
try
|
||||
{
|
||||
while (Count > 0)
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
yield return await _buffer.ReceiveAsync(token);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_semaphore.Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
18
FModel/Framework/Command.cs
Normal file
18
FModel/Framework/Command.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public abstract class Command : ICommand
|
||||
{
|
||||
public abstract void Execute(object parameter);
|
||||
|
||||
public abstract bool CanExecute(object parameter);
|
||||
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public event EventHandler CanExecuteChanged;
|
||||
}
|
||||
90
FModel/Framework/CustomSKShaper.cs
Normal file
90
FModel/Framework/CustomSKShaper.cs
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
using System;
|
||||
using HarfBuzzSharp;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
using Buffer = HarfBuzzSharp.Buffer;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class CustomSKShaper : SKShaper
|
||||
{
|
||||
private const int _FONT_SIZE_SCALE = 512;
|
||||
private readonly Font _font;
|
||||
|
||||
public CustomSKShaper(SKTypeface typeface) : base(typeface)
|
||||
{
|
||||
using var blob = Typeface.OpenStream(out var index).ToHarfBuzzBlob();
|
||||
using var face = new Face(blob, index);
|
||||
face.Index = index;
|
||||
face.UnitsPerEm = Typeface.UnitsPerEm;
|
||||
|
||||
_font = new Font(face);
|
||||
_font.SetScale(_FONT_SIZE_SCALE, _FONT_SIZE_SCALE);
|
||||
_font.SetFunctionsOpenType();
|
||||
}
|
||||
|
||||
public new Result Shape(Buffer buffer, float xOffset, float yOffset, SKPaint paint)
|
||||
{
|
||||
if (buffer == null)
|
||||
throw new ArgumentNullException(nameof(buffer));
|
||||
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException(nameof(paint));
|
||||
|
||||
// do the shaping
|
||||
_font.Shape(buffer);
|
||||
|
||||
// get the shaping results
|
||||
var len = buffer.Length;
|
||||
var info = buffer.GlyphInfos;
|
||||
var pos = buffer.GlyphPositions;
|
||||
|
||||
// get the sizes
|
||||
var textSizeY = paint.TextSize / _FONT_SIZE_SCALE;
|
||||
var textSizeX = textSizeY * paint.TextScaleX;
|
||||
|
||||
var points = new SKPoint[len];
|
||||
var clusters = new uint[len];
|
||||
var codepoints = new uint[len];
|
||||
|
||||
for (var i = 0; i < len; i++)
|
||||
{
|
||||
// move the cursor
|
||||
xOffset += pos[i].XAdvance * textSizeX;
|
||||
yOffset += pos[i].YAdvance * textSizeY;
|
||||
|
||||
codepoints[i] = info[i].Codepoint;
|
||||
clusters[i] = info[i].Cluster;
|
||||
points[i] = new SKPoint(xOffset + pos[i].XOffset * textSizeX, yOffset - pos[i].YOffset * textSizeY);
|
||||
}
|
||||
|
||||
return new Result(codepoints, clusters, points, points[^1].X);
|
||||
}
|
||||
|
||||
public new Result Shape(string text, SKPaint paint) => Shape(text, 0, 0, paint);
|
||||
|
||||
public new Result Shape(string text, float xOffset, float yOffset, SKPaint paint)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text))
|
||||
return new Result();
|
||||
|
||||
using var buffer = new Buffer();
|
||||
switch (paint.TextEncoding)
|
||||
{
|
||||
case SKTextEncoding.Utf8:
|
||||
buffer.AddUtf8(text);
|
||||
break;
|
||||
case SKTextEncoding.Utf16:
|
||||
buffer.AddUtf16(text);
|
||||
break;
|
||||
case SKTextEncoding.Utf32:
|
||||
buffer.AddUtf32(text);
|
||||
break;
|
||||
default:
|
||||
throw new NotSupportedException("TextEncoding of type GlyphId is not supported.");
|
||||
}
|
||||
|
||||
buffer.GuessSegmentProperties();
|
||||
return Shape(buffer, xOffset, yOffset, paint);
|
||||
}
|
||||
}
|
||||
19
FModel/Framework/FRestRequest.cs
Normal file
19
FModel/Framework/FRestRequest.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using RestSharp;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class FRestRequest : RestRequest
|
||||
{
|
||||
private const int TimeoutSeconds = 5;
|
||||
|
||||
public FRestRequest(string url, Method method = Method.Get) : base(url, method)
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(TimeoutSeconds);
|
||||
}
|
||||
|
||||
public FRestRequest(Uri uri, Method method = Method.Get) : base(uri, method)
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(TimeoutSeconds);
|
||||
}
|
||||
}
|
||||
45
FModel/Framework/FStatus.cs
Normal file
45
FModel/Framework/FStatus.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
namespace FModel.Framework;
|
||||
|
||||
public class FStatus : ViewModel
|
||||
{
|
||||
private bool _isReady;
|
||||
public bool IsReady
|
||||
{
|
||||
get => _isReady;
|
||||
private set => SetProperty(ref _isReady, value);
|
||||
}
|
||||
|
||||
private EStatusKind _kind;
|
||||
public EStatusKind Kind
|
||||
{
|
||||
get => _kind;
|
||||
private set
|
||||
{
|
||||
SetProperty(ref _kind, value);
|
||||
IsReady = Kind != EStatusKind.Loading && Kind != EStatusKind.Stopping;
|
||||
}
|
||||
}
|
||||
|
||||
private string _label;
|
||||
public string Label
|
||||
{
|
||||
get => _label;
|
||||
private set => SetProperty(ref _label, value);
|
||||
}
|
||||
|
||||
public FStatus()
|
||||
{
|
||||
SetStatus(EStatusKind.Loading);
|
||||
}
|
||||
|
||||
public void SetStatus(EStatusKind kind, string label = "")
|
||||
{
|
||||
Kind = kind;
|
||||
UpdateStatusLabel(label);
|
||||
}
|
||||
|
||||
public void UpdateStatusLabel(string label, string prefix = null)
|
||||
{
|
||||
Label = Kind == EStatusKind.Loading ? $"{prefix ?? Kind.ToString()} {label}".Trim() : Kind.ToString();
|
||||
}
|
||||
}
|
||||
116
FModel/Framework/FullyObservableCollection.cs
Normal file
116
FModel/Framework/FullyObservableCollection.cs
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class FullyObservableCollection<T> : ObservableCollection<T> where T : INotifyPropertyChanged
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when a property is changed within an item.
|
||||
/// </summary>
|
||||
public event EventHandler<ItemPropertyChangedEventArgs> ItemPropertyChanged;
|
||||
|
||||
public FullyObservableCollection()
|
||||
{
|
||||
}
|
||||
|
||||
public FullyObservableCollection(List<T> list) : base(list)
|
||||
{
|
||||
ObserveAll();
|
||||
}
|
||||
|
||||
public FullyObservableCollection(IEnumerable<T> enumerable) : base(enumerable)
|
||||
{
|
||||
ObserveAll();
|
||||
}
|
||||
|
||||
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (e.Action is NotifyCollectionChangedAction.Remove or
|
||||
NotifyCollectionChangedAction.Replace)
|
||||
{
|
||||
foreach (T item in e.OldItems)
|
||||
item.PropertyChanged -= ChildPropertyChanged;
|
||||
}
|
||||
|
||||
if (e.Action is NotifyCollectionChangedAction.Add or
|
||||
NotifyCollectionChangedAction.Replace)
|
||||
{
|
||||
foreach (T item in e.NewItems)
|
||||
item.PropertyChanged += ChildPropertyChanged;
|
||||
}
|
||||
|
||||
base.OnCollectionChanged(e);
|
||||
}
|
||||
|
||||
protected void OnItemPropertyChanged(ItemPropertyChangedEventArgs e)
|
||||
{
|
||||
ItemPropertyChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
protected void OnItemPropertyChanged(int index, PropertyChangedEventArgs e)
|
||||
{
|
||||
OnItemPropertyChanged(new ItemPropertyChangedEventArgs(index, e));
|
||||
}
|
||||
|
||||
protected override void ClearItems()
|
||||
{
|
||||
foreach (T item in Items)
|
||||
item.PropertyChanged -= ChildPropertyChanged;
|
||||
|
||||
base.ClearItems();
|
||||
}
|
||||
|
||||
private void ObserveAll()
|
||||
{
|
||||
foreach (var item in Items)
|
||||
item.PropertyChanged += ChildPropertyChanged;
|
||||
}
|
||||
|
||||
private void ChildPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
var typedSender = (T) sender;
|
||||
var i = Items.IndexOf(typedSender);
|
||||
|
||||
if (i < 0)
|
||||
throw new ArgumentException("Received property notification from item not in collection");
|
||||
|
||||
OnItemPropertyChanged(i, e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides data for the <see cref="FullyObservableCollection{T}.ItemPropertyChanged"/> event.
|
||||
/// </summary>
|
||||
public class ItemPropertyChangedEventArgs : PropertyChangedEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the index in the collection for which the property change has occurred.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// Index in parent collection.
|
||||
/// </value>
|
||||
public int CollectionIndex { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ItemPropertyChangedEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="index">The index in the collection of changed item.</param>
|
||||
/// <param name="name">The name of the property that changed.</param>
|
||||
public ItemPropertyChangedEventArgs(int index, string name) : base(name)
|
||||
{
|
||||
CollectionIndex = index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ItemPropertyChangedEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="index">The index.</param>
|
||||
/// <param name="args">The <see cref="PropertyChangedEventArgs"/> instance containing the event data.</param>
|
||||
public ItemPropertyChangedEventArgs(int index, PropertyChangedEventArgs args) : this(index, args.PropertyName)
|
||||
{
|
||||
}
|
||||
}
|
||||
49
FModel/Framework/Hotkey.cs
Normal file
49
FModel/Framework/Hotkey.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System.Text;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class Hotkey : ViewModel
|
||||
{
|
||||
private Key _key;
|
||||
public Key Key
|
||||
{
|
||||
get => _key;
|
||||
set => SetProperty(ref _key, value);
|
||||
}
|
||||
|
||||
private ModifierKeys _modifiers;
|
||||
public ModifierKeys Modifiers
|
||||
{
|
||||
get => _modifiers;
|
||||
set => SetProperty(ref _modifiers, value);
|
||||
}
|
||||
|
||||
public Hotkey(Key key, ModifierKeys modifiers = ModifierKeys.None)
|
||||
{
|
||||
Key = key;
|
||||
Modifiers = modifiers;
|
||||
}
|
||||
|
||||
public bool IsTriggered(Key e)
|
||||
{
|
||||
return e == Key && Keyboard.Modifiers.HasFlag(Modifiers);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var str = new StringBuilder();
|
||||
|
||||
if (Modifiers.HasFlag(ModifierKeys.Control))
|
||||
str.Append("Ctrl + ");
|
||||
if (Modifiers.HasFlag(ModifierKeys.Shift))
|
||||
str.Append("Shift + ");
|
||||
if (Modifiers.HasFlag(ModifierKeys.Alt))
|
||||
str.Append("Alt + ");
|
||||
if (Modifiers.HasFlag(ModifierKeys.Windows))
|
||||
str.Append("Win + ");
|
||||
|
||||
str.Append(Key);
|
||||
return str.ToString();
|
||||
}
|
||||
}
|
||||
608
FModel/Framework/ImGuiController.cs
Normal file
608
FModel/Framework/ImGuiController.cs
Normal file
|
|
@ -0,0 +1,608 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using FModel.Settings;
|
||||
using ImGuiNET;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using OpenTK.Windowing.Desktop;
|
||||
using OpenTK.Windowing.GraphicsLibraryFramework;
|
||||
using ErrorCode = OpenTK.Graphics.OpenGL4.ErrorCode;
|
||||
using Keys = OpenTK.Windowing.GraphicsLibraryFramework.Keys;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class ImGuiController : IDisposable
|
||||
{
|
||||
private bool _frameBegun;
|
||||
|
||||
private int _vertexArray;
|
||||
private int _vertexBuffer;
|
||||
private int _vertexBufferSize;
|
||||
private int _indexBuffer;
|
||||
private int _indexBufferSize;
|
||||
|
||||
//private Texture _fontTexture;
|
||||
|
||||
private int _fontTexture;
|
||||
|
||||
private int _shader;
|
||||
private int _shaderFontTextureLocation;
|
||||
private int _shaderProjectionMatrixLocation;
|
||||
|
||||
private int _windowWidth;
|
||||
private int _windowHeight;
|
||||
|
||||
public ImFontPtr FontNormal;
|
||||
public ImFontPtr FontBold;
|
||||
public ImFontPtr FontSemiBold;
|
||||
|
||||
private readonly Vector2 _scaleFactor = Vector2.One;
|
||||
public readonly float DpiScale = GetDpiScale();
|
||||
|
||||
private static bool KHRDebugAvailable = false;
|
||||
|
||||
public ImGuiController(int width, int height)
|
||||
{
|
||||
_windowWidth = width;
|
||||
_windowHeight = height;
|
||||
|
||||
int major = GL.GetInteger(GetPName.MajorVersion);
|
||||
int minor = GL.GetInteger(GetPName.MinorVersion);
|
||||
|
||||
KHRDebugAvailable = (major == 4 && minor >= 3) || IsExtensionSupported("KHR_debug");
|
||||
|
||||
IntPtr context = ImGui.CreateContext();
|
||||
ImGui.SetCurrentContext(context);
|
||||
|
||||
var io = ImGui.GetIO();
|
||||
unsafe
|
||||
{
|
||||
var iniFileNamePtr = Marshal.StringToCoTaskMemUTF8(Path.Combine(UserSettings.Default.OutputDirectory, ".data", "imgui.ini"));
|
||||
io.NativePtr->IniFilename = (byte*)iniFileNamePtr;
|
||||
}
|
||||
FontNormal = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 16 * DpiScale);
|
||||
FontBold = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeuib.ttf", 16 * DpiScale);
|
||||
FontSemiBold = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\seguisb.ttf", 16 * DpiScale);
|
||||
|
||||
io.BackendFlags |= ImGuiBackendFlags.RendererHasVtxOffset;
|
||||
io.ConfigFlags |= ImGuiConfigFlags.NavEnableKeyboard;
|
||||
io.ConfigFlags |= ImGuiConfigFlags.DockingEnable;
|
||||
io.Fonts.Flags |= ImFontAtlasFlags.NoBakedLines;
|
||||
|
||||
CreateDeviceResources();
|
||||
|
||||
SetPerFrameImGuiData(1f / 60f);
|
||||
|
||||
ImGui.NewFrame();
|
||||
_frameBegun = true;
|
||||
}
|
||||
|
||||
public void Bold() => PushFont(FontBold);
|
||||
public void SemiBold() => PushFont(FontSemiBold);
|
||||
|
||||
public void PopFont()
|
||||
{
|
||||
ImGui.PopFont();
|
||||
PushFont(FontNormal);
|
||||
}
|
||||
|
||||
private void PushFont(ImFontPtr ptr) => ImGui.PushFont(ptr);
|
||||
|
||||
public void WindowResized(int width, int height)
|
||||
{
|
||||
_windowWidth = width;
|
||||
_windowHeight = height;
|
||||
}
|
||||
|
||||
public void DestroyDeviceObjects()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public void CreateDeviceResources()
|
||||
{
|
||||
_vertexBufferSize = 10000;
|
||||
_indexBufferSize = 2000;
|
||||
|
||||
int prevVAO = GL.GetInteger(GetPName.VertexArrayBinding);
|
||||
int prevArrayBuffer = GL.GetInteger(GetPName.ArrayBufferBinding);
|
||||
|
||||
_vertexArray = GL.GenVertexArray();
|
||||
GL.BindVertexArray(_vertexArray);
|
||||
LabelObject(ObjectLabelIdentifier.VertexArray, _vertexArray, "ImGui");
|
||||
|
||||
_vertexBuffer = GL.GenBuffer();
|
||||
GL.BindBuffer(BufferTarget.ArrayBuffer, _vertexBuffer);
|
||||
LabelObject(ObjectLabelIdentifier.Buffer, _vertexBuffer, "VBO: ImGui");
|
||||
GL.BufferData(BufferTarget.ArrayBuffer, _vertexBufferSize, IntPtr.Zero, BufferUsageHint.DynamicDraw);
|
||||
|
||||
_indexBuffer = GL.GenBuffer();
|
||||
GL.BindBuffer(BufferTarget.ElementArrayBuffer, _indexBuffer);
|
||||
LabelObject(ObjectLabelIdentifier.Buffer, _indexBuffer, "EBO: ImGui");
|
||||
GL.BufferData(BufferTarget.ElementArrayBuffer, _indexBufferSize, IntPtr.Zero, BufferUsageHint.DynamicDraw);
|
||||
|
||||
RecreateFontDeviceTexture();
|
||||
|
||||
string VertexSource = @"#version 460 core
|
||||
uniform mat4 projection_matrix;
|
||||
layout(location = 0) in vec2 in_position;
|
||||
layout(location = 1) in vec2 in_texCoord;
|
||||
layout(location = 2) in vec4 in_color;
|
||||
out vec4 color;
|
||||
out vec2 texCoord;
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection_matrix * vec4(in_position, 0, 1);
|
||||
color = in_color;
|
||||
texCoord = in_texCoord;
|
||||
}";
|
||||
string FragmentSource = @"#version 460 core
|
||||
uniform sampler2D in_fontTexture;
|
||||
in vec4 color;
|
||||
in vec2 texCoord;
|
||||
out vec4 outputColor;
|
||||
void main()
|
||||
{
|
||||
outputColor = color * texture(in_fontTexture, texCoord);
|
||||
}";
|
||||
|
||||
_shader = CreateProgram("ImGui", VertexSource, FragmentSource);
|
||||
_shaderProjectionMatrixLocation = GL.GetUniformLocation(_shader, "projection_matrix");
|
||||
_shaderFontTextureLocation = GL.GetUniformLocation(_shader, "in_fontTexture");
|
||||
|
||||
int stride = Unsafe.SizeOf<ImDrawVert>();
|
||||
GL.VertexAttribPointer(0, 2, VertexAttribPointerType.Float, false, stride, 0);
|
||||
GL.VertexAttribPointer(1, 2, VertexAttribPointerType.Float, false, stride, 8);
|
||||
GL.VertexAttribPointer(2, 4, VertexAttribPointerType.UnsignedByte, true, stride, 16);
|
||||
|
||||
GL.EnableVertexAttribArray(0);
|
||||
GL.EnableVertexAttribArray(1);
|
||||
GL.EnableVertexAttribArray(2);
|
||||
|
||||
GL.BindVertexArray(prevVAO);
|
||||
GL.BindBuffer(BufferTarget.ArrayBuffer, prevArrayBuffer);
|
||||
|
||||
CheckGLError("End of ImGui setup");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recreates the device texture used to render text.
|
||||
/// </summary>
|
||||
public void RecreateFontDeviceTexture()
|
||||
{
|
||||
ImGuiIOPtr io = ImGui.GetIO();
|
||||
io.Fonts.GetTexDataAsRGBA32(out IntPtr pixels, out int width, out int height, out int bytesPerPixel);
|
||||
|
||||
int mips = (int)Math.Floor(Math.Log(Math.Max(width, height), 2));
|
||||
|
||||
int prevActiveTexture = GL.GetInteger(GetPName.ActiveTexture);
|
||||
GL.ActiveTexture(TextureUnit.Texture0);
|
||||
int prevTexture2D = GL.GetInteger(GetPName.TextureBinding2D);
|
||||
|
||||
_fontTexture = GL.GenTexture();
|
||||
GL.BindTexture(TextureTarget.Texture2D, _fontTexture);
|
||||
GL.TexStorage2D(TextureTarget2d.Texture2D, mips, SizedInternalFormat.Rgba8, width, height);
|
||||
LabelObject(ObjectLabelIdentifier.Texture, _fontTexture, "ImGui Text Atlas");
|
||||
|
||||
GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, width, height, PixelFormat.Bgra, PixelType.UnsignedByte, pixels);
|
||||
|
||||
GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
|
||||
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat);
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat);
|
||||
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMaxLevel, mips - 1);
|
||||
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
|
||||
|
||||
// Restore state
|
||||
GL.BindTexture(TextureTarget.Texture2D, prevTexture2D);
|
||||
GL.ActiveTexture((TextureUnit)prevActiveTexture);
|
||||
|
||||
io.Fonts.SetTexID((IntPtr)_fontTexture);
|
||||
|
||||
io.Fonts.ClearTexData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Renders the ImGui draw list data.
|
||||
/// </summary>
|
||||
public void Render()
|
||||
{
|
||||
if (_frameBegun)
|
||||
{
|
||||
_frameBegun = false;
|
||||
ImGui.Render();
|
||||
RenderImDrawData(ImGui.GetDrawData());
|
||||
}
|
||||
CheckGLError("End of frame");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates ImGui input and IO configuration state.
|
||||
/// </summary>
|
||||
public void Update(GameWindow wnd, float deltaSeconds)
|
||||
{
|
||||
if (_frameBegun)
|
||||
{
|
||||
ImGui.Render();
|
||||
}
|
||||
|
||||
SetPerFrameImGuiData(deltaSeconds);
|
||||
UpdateImGuiInput(wnd);
|
||||
|
||||
_frameBegun = true;
|
||||
ImGui.NewFrame();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets per-frame data based on the associated window.
|
||||
/// This is called by Update(float).
|
||||
/// </summary>
|
||||
private void SetPerFrameImGuiData(float deltaSeconds)
|
||||
{
|
||||
ImGuiIOPtr io = ImGui.GetIO();
|
||||
// if (io.WantSaveIniSettings) ImGui.SaveIniSettingsToDisk(_iniPath);
|
||||
io.DisplaySize = new Vector2(
|
||||
_windowWidth / _scaleFactor.X,
|
||||
_windowHeight / _scaleFactor.Y);
|
||||
io.DisplayFramebufferScale = _scaleFactor;
|
||||
io.DeltaTime = deltaSeconds; // DeltaTime is in seconds.
|
||||
}
|
||||
|
||||
readonly List<char> PressedChars = new List<char>();
|
||||
|
||||
private void UpdateImGuiInput(GameWindow wnd)
|
||||
{
|
||||
ImGuiIOPtr io = ImGui.GetIO();
|
||||
var mState = wnd.MouseState;
|
||||
var kState = wnd.KeyboardState;
|
||||
|
||||
io.AddMousePosEvent(mState.X, mState.Y);
|
||||
io.AddMouseButtonEvent(0, mState[MouseButton.Left]);
|
||||
io.AddMouseButtonEvent(1, mState[MouseButton.Right]);
|
||||
io.AddMouseButtonEvent(2, mState[MouseButton.Middle]);
|
||||
io.AddMouseButtonEvent(3, mState[MouseButton.Button1]);
|
||||
io.AddMouseButtonEvent(4, mState[MouseButton.Button2]);
|
||||
io.AddMouseWheelEvent(mState.ScrollDelta.X, mState.ScrollDelta.Y);
|
||||
|
||||
foreach (Keys key in Enum.GetValues(typeof(Keys)))
|
||||
{
|
||||
if (key == Keys.Unknown) continue;
|
||||
io.AddKeyEvent(TranslateKey(key), kState.IsKeyDown(key));
|
||||
}
|
||||
|
||||
foreach (var c in PressedChars)
|
||||
{
|
||||
io.AddInputCharacter(c);
|
||||
}
|
||||
PressedChars.Clear();
|
||||
|
||||
io.KeyShift = kState.IsKeyDown(Keys.LeftShift) || kState.IsKeyDown(Keys.RightShift);
|
||||
io.KeyCtrl = kState.IsKeyDown(Keys.LeftControl) || kState.IsKeyDown(Keys.RightControl);
|
||||
io.KeyAlt = kState.IsKeyDown(Keys.LeftAlt) || kState.IsKeyDown(Keys.RightAlt);
|
||||
io.KeySuper = kState.IsKeyDown(Keys.LeftSuper) || kState.IsKeyDown(Keys.RightSuper);
|
||||
}
|
||||
|
||||
public void PressChar(char keyChar)
|
||||
{
|
||||
PressedChars.Add(keyChar);
|
||||
}
|
||||
|
||||
private void RenderImDrawData(ImDrawDataPtr draw_data)
|
||||
{
|
||||
if (draw_data.CmdListsCount == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get intial state.
|
||||
int prevVAO = GL.GetInteger(GetPName.VertexArrayBinding);
|
||||
int prevArrayBuffer = GL.GetInteger(GetPName.ArrayBufferBinding);
|
||||
int prevProgram = GL.GetInteger(GetPName.CurrentProgram);
|
||||
bool prevBlendEnabled = GL.GetBoolean(GetPName.Blend);
|
||||
bool prevScissorTestEnabled = GL.GetBoolean(GetPName.ScissorTest);
|
||||
int prevBlendEquationRgb = GL.GetInteger(GetPName.BlendEquationRgb);
|
||||
int prevBlendEquationAlpha = GL.GetInteger(GetPName.BlendEquationAlpha);
|
||||
int prevBlendFuncSrcRgb = GL.GetInteger(GetPName.BlendSrcRgb);
|
||||
int prevBlendFuncSrcAlpha = GL.GetInteger(GetPName.BlendSrcAlpha);
|
||||
int prevBlendFuncDstRgb = GL.GetInteger(GetPName.BlendDstRgb);
|
||||
int prevBlendFuncDstAlpha = GL.GetInteger(GetPName.BlendDstAlpha);
|
||||
bool prevCullFaceEnabled = GL.GetBoolean(GetPName.CullFace);
|
||||
bool prevDepthTestEnabled = GL.GetBoolean(GetPName.DepthTest);
|
||||
int prevActiveTexture = GL.GetInteger(GetPName.ActiveTexture);
|
||||
GL.ActiveTexture(TextureUnit.Texture0);
|
||||
int prevTexture2D = GL.GetInteger(GetPName.TextureBinding2D);
|
||||
Span<int> prevScissorBox = stackalloc int[4];
|
||||
unsafe
|
||||
{
|
||||
fixed (int* iptr = &prevScissorBox[0])
|
||||
{
|
||||
GL.GetInteger(GetPName.ScissorBox, iptr);
|
||||
}
|
||||
}
|
||||
|
||||
// Bind the element buffer (thru the VAO) so that we can resize it.
|
||||
GL.BindVertexArray(_vertexArray);
|
||||
// Bind the vertex buffer so that we can resize it.
|
||||
GL.BindBuffer(BufferTarget.ArrayBuffer, _vertexBuffer);
|
||||
for (int i = 0; i < draw_data.CmdListsCount; i++)
|
||||
{
|
||||
ImDrawListPtr cmd_list = draw_data.CmdLists[i];
|
||||
|
||||
int vertexSize = cmd_list.VtxBuffer.Size * Unsafe.SizeOf<ImDrawVert>();
|
||||
if (vertexSize > _vertexBufferSize)
|
||||
{
|
||||
int newSize = (int)Math.Max(_vertexBufferSize * 1.5f, vertexSize);
|
||||
|
||||
GL.BufferData(BufferTarget.ArrayBuffer, newSize, IntPtr.Zero, BufferUsageHint.DynamicDraw);
|
||||
_vertexBufferSize = newSize;
|
||||
}
|
||||
|
||||
int indexSize = cmd_list.IdxBuffer.Size * sizeof(ushort);
|
||||
if (indexSize > _indexBufferSize)
|
||||
{
|
||||
int newSize = (int)Math.Max(_indexBufferSize * 1.5f, indexSize);
|
||||
GL.BufferData(BufferTarget.ElementArrayBuffer, newSize, IntPtr.Zero, BufferUsageHint.DynamicDraw);
|
||||
_indexBufferSize = newSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Setup orthographic projection matrix into our constant buffer
|
||||
ImGuiIOPtr io = ImGui.GetIO();
|
||||
var mvp = OpenTK.Mathematics.Matrix4.CreateOrthographicOffCenter(
|
||||
0.0f,
|
||||
io.DisplaySize.X,
|
||||
io.DisplaySize.Y,
|
||||
0.0f,
|
||||
-1.0f,
|
||||
1.0f);
|
||||
|
||||
GL.UseProgram(_shader);
|
||||
GL.UniformMatrix4(_shaderProjectionMatrixLocation, false, ref mvp);
|
||||
GL.Uniform1(_shaderFontTextureLocation, 0);
|
||||
CheckGLError("Projection");
|
||||
|
||||
GL.BindVertexArray(_vertexArray);
|
||||
CheckGLError("VAO");
|
||||
|
||||
draw_data.ScaleClipRects(io.DisplayFramebufferScale);
|
||||
|
||||
GL.Enable(EnableCap.Blend);
|
||||
GL.Enable(EnableCap.ScissorTest);
|
||||
GL.BlendEquation(BlendEquationMode.FuncAdd);
|
||||
GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
|
||||
GL.Disable(EnableCap.CullFace);
|
||||
GL.Disable(EnableCap.DepthTest);
|
||||
|
||||
// Render command lists
|
||||
for (int n = 0; n < draw_data.CmdListsCount; n++)
|
||||
{
|
||||
ImDrawListPtr cmd_list = draw_data.CmdLists[n];
|
||||
|
||||
GL.BufferSubData(BufferTarget.ArrayBuffer, IntPtr.Zero, cmd_list.VtxBuffer.Size * Unsafe.SizeOf<ImDrawVert>(), cmd_list.VtxBuffer.Data);
|
||||
CheckGLError($"Data Vert {n}");
|
||||
|
||||
GL.BufferSubData(BufferTarget.ElementArrayBuffer, IntPtr.Zero, cmd_list.IdxBuffer.Size * sizeof(ushort), cmd_list.IdxBuffer.Data);
|
||||
CheckGLError($"Data Idx {n}");
|
||||
|
||||
for (int cmd_i = 0; cmd_i < cmd_list.CmdBuffer.Size; cmd_i++)
|
||||
{
|
||||
ImDrawCmdPtr pcmd = cmd_list.CmdBuffer[cmd_i];
|
||||
if (pcmd.UserCallback != IntPtr.Zero)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL.ActiveTexture(TextureUnit.Texture0);
|
||||
GL.BindTexture(TextureTarget.Texture2D, (int)pcmd.TextureId);
|
||||
CheckGLError("Texture");
|
||||
|
||||
// We do _windowHeight - (int)clip.W instead of (int)clip.Y because gl has flipped Y when it comes to these coordinates
|
||||
var clip = pcmd.ClipRect;
|
||||
GL.Scissor((int)clip.X, _windowHeight - (int)clip.W, (int)(clip.Z - clip.X), (int)(clip.W - clip.Y));
|
||||
CheckGLError("Scissor");
|
||||
|
||||
if ((io.BackendFlags & ImGuiBackendFlags.RendererHasVtxOffset) != 0)
|
||||
{
|
||||
GL.DrawElementsBaseVertex(PrimitiveType.Triangles, (int)pcmd.ElemCount, DrawElementsType.UnsignedShort, (IntPtr)(pcmd.IdxOffset * sizeof(ushort)), unchecked((int)pcmd.VtxOffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
GL.DrawElements(BeginMode.Triangles, (int)pcmd.ElemCount, DrawElementsType.UnsignedShort, (int)pcmd.IdxOffset * sizeof(ushort));
|
||||
}
|
||||
CheckGLError("Draw");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL.Disable(EnableCap.Blend);
|
||||
GL.Disable(EnableCap.ScissorTest);
|
||||
|
||||
// Reset state
|
||||
GL.BindTexture(TextureTarget.Texture2D, prevTexture2D);
|
||||
GL.ActiveTexture((TextureUnit)prevActiveTexture);
|
||||
GL.UseProgram(prevProgram);
|
||||
GL.BindVertexArray(prevVAO);
|
||||
GL.Scissor(prevScissorBox[0], prevScissorBox[1], prevScissorBox[2], prevScissorBox[3]);
|
||||
GL.BindBuffer(BufferTarget.ArrayBuffer, prevArrayBuffer);
|
||||
GL.BlendEquationSeparate((BlendEquationMode)prevBlendEquationRgb, (BlendEquationMode)prevBlendEquationAlpha);
|
||||
GL.BlendFuncSeparate(
|
||||
(BlendingFactorSrc)prevBlendFuncSrcRgb,
|
||||
(BlendingFactorDest)prevBlendFuncDstRgb,
|
||||
(BlendingFactorSrc)prevBlendFuncSrcAlpha,
|
||||
(BlendingFactorDest)prevBlendFuncDstAlpha);
|
||||
if (prevBlendEnabled) GL.Enable(EnableCap.Blend); else GL.Disable(EnableCap.Blend);
|
||||
if (prevDepthTestEnabled) GL.Enable(EnableCap.DepthTest); else GL.Disable(EnableCap.DepthTest);
|
||||
if (prevCullFaceEnabled) GL.Enable(EnableCap.CullFace); else GL.Disable(EnableCap.CullFace);
|
||||
if (prevScissorTestEnabled) GL.Enable(EnableCap.ScissorTest); else GL.Disable(EnableCap.ScissorTest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Frees all graphics resources used by the renderer.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
GL.DeleteVertexArray(_vertexArray);
|
||||
GL.DeleteBuffer(_vertexBuffer);
|
||||
GL.DeleteBuffer(_indexBuffer);
|
||||
|
||||
GL.DeleteTexture(_fontTexture);
|
||||
GL.DeleteProgram(_shader);
|
||||
}
|
||||
|
||||
public static void LabelObject(ObjectLabelIdentifier objLabelIdent, int glObject, string name)
|
||||
{
|
||||
if (KHRDebugAvailable)
|
||||
GL.ObjectLabel(objLabelIdent, glObject, name.Length, name);
|
||||
}
|
||||
|
||||
static bool IsExtensionSupported(string name)
|
||||
{
|
||||
int n = GL.GetInteger(GetPName.NumExtensions);
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
string extension = GL.GetString(StringNameIndexed.Extensions, i);
|
||||
if (extension == name) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int CreateProgram(string name, string vertexSource, string fragmentSoruce)
|
||||
{
|
||||
int program = GL.CreateProgram();
|
||||
LabelObject(ObjectLabelIdentifier.Program, program, $"Program: {name}");
|
||||
|
||||
int vertex = CompileShader(name, ShaderType.VertexShader, vertexSource);
|
||||
int fragment = CompileShader(name, ShaderType.FragmentShader, fragmentSoruce);
|
||||
|
||||
GL.AttachShader(program, vertex);
|
||||
GL.AttachShader(program, fragment);
|
||||
|
||||
GL.LinkProgram(program);
|
||||
|
||||
GL.GetProgram(program, GetProgramParameterName.LinkStatus, out int success);
|
||||
if (success == 0)
|
||||
{
|
||||
string info = GL.GetProgramInfoLog(program);
|
||||
Debug.WriteLine($"GL.LinkProgram had info log [{name}]:\n{info}");
|
||||
}
|
||||
|
||||
GL.DetachShader(program, vertex);
|
||||
GL.DetachShader(program, fragment);
|
||||
|
||||
GL.DeleteShader(vertex);
|
||||
GL.DeleteShader(fragment);
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
private static int CompileShader(string name, ShaderType type, string source)
|
||||
{
|
||||
int shader = GL.CreateShader(type);
|
||||
LabelObject(ObjectLabelIdentifier.Shader, shader, $"Shader: {name}");
|
||||
|
||||
GL.ShaderSource(shader, source);
|
||||
GL.CompileShader(shader);
|
||||
|
||||
GL.GetShader(shader, ShaderParameter.CompileStatus, out int success);
|
||||
if (success == 0)
|
||||
{
|
||||
string info = GL.GetShaderInfoLog(shader);
|
||||
Debug.WriteLine($"GL.CompileShader for shader '{name}' [{type}] had info log:\n{info}");
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
public static void CheckGLError(string title)
|
||||
{
|
||||
ErrorCode error;
|
||||
int i = 1;
|
||||
while ((error = GL.GetError()) != ErrorCode.NoError)
|
||||
{
|
||||
Debug.Print($"{title} ({i++}): {error}");
|
||||
}
|
||||
}
|
||||
|
||||
public static float GetDpiScale()
|
||||
{
|
||||
return Math.Max((float)(Screen.PrimaryScreen.Bounds.Width / SystemParameters.PrimaryScreenWidth), (float)(Screen.PrimaryScreen.Bounds.Height / SystemParameters.PrimaryScreenHeight));
|
||||
}
|
||||
|
||||
public static ImGuiKey TranslateKey(Keys key)
|
||||
{
|
||||
if (key is >= Keys.D0 and <= Keys.D9)
|
||||
return key - Keys.D0 + ImGuiKey._0;
|
||||
|
||||
if (key is >= Keys.A and <= Keys.Z)
|
||||
return key - Keys.A + ImGuiKey.A;
|
||||
|
||||
if (key is >= Keys.KeyPad0 and <= Keys.KeyPad9)
|
||||
return key - Keys.KeyPad0 + ImGuiKey.Keypad0;
|
||||
|
||||
if (key is >= Keys.F1 and <= Keys.F24)
|
||||
return key - Keys.F1 + ImGuiKey.F24;
|
||||
|
||||
return key switch
|
||||
{
|
||||
Keys.Tab => ImGuiKey.Tab,
|
||||
Keys.Left => ImGuiKey.LeftArrow,
|
||||
Keys.Right => ImGuiKey.RightArrow,
|
||||
Keys.Up => ImGuiKey.UpArrow,
|
||||
Keys.Down => ImGuiKey.DownArrow,
|
||||
Keys.PageUp => ImGuiKey.PageUp,
|
||||
Keys.PageDown => ImGuiKey.PageDown,
|
||||
Keys.Home => ImGuiKey.Home,
|
||||
Keys.End => ImGuiKey.End,
|
||||
Keys.Insert => ImGuiKey.Insert,
|
||||
Keys.Delete => ImGuiKey.Delete,
|
||||
Keys.Backspace => ImGuiKey.Backspace,
|
||||
Keys.Space => ImGuiKey.Space,
|
||||
Keys.Enter => ImGuiKey.Enter,
|
||||
Keys.Escape => ImGuiKey.Escape,
|
||||
Keys.Apostrophe => ImGuiKey.Apostrophe,
|
||||
Keys.Comma => ImGuiKey.Comma,
|
||||
Keys.Minus => ImGuiKey.Minus,
|
||||
Keys.Period => ImGuiKey.Period,
|
||||
Keys.Slash => ImGuiKey.Slash,
|
||||
Keys.Semicolon => ImGuiKey.Semicolon,
|
||||
Keys.Equal => ImGuiKey.Equal,
|
||||
Keys.LeftBracket => ImGuiKey.LeftBracket,
|
||||
Keys.Backslash => ImGuiKey.Backslash,
|
||||
Keys.RightBracket => ImGuiKey.RightBracket,
|
||||
Keys.GraveAccent => ImGuiKey.GraveAccent,
|
||||
Keys.CapsLock => ImGuiKey.CapsLock,
|
||||
Keys.ScrollLock => ImGuiKey.ScrollLock,
|
||||
Keys.NumLock => ImGuiKey.NumLock,
|
||||
Keys.PrintScreen => ImGuiKey.PrintScreen,
|
||||
Keys.Pause => ImGuiKey.Pause,
|
||||
Keys.KeyPadDecimal => ImGuiKey.KeypadDecimal,
|
||||
Keys.KeyPadDivide => ImGuiKey.KeypadDivide,
|
||||
Keys.KeyPadMultiply => ImGuiKey.KeypadMultiply,
|
||||
Keys.KeyPadSubtract => ImGuiKey.KeypadSubtract,
|
||||
Keys.KeyPadAdd => ImGuiKey.KeypadAdd,
|
||||
Keys.KeyPadEnter => ImGuiKey.KeypadEnter,
|
||||
Keys.KeyPadEqual => ImGuiKey.KeypadEqual,
|
||||
Keys.LeftShift => ImGuiKey.LeftShift,
|
||||
Keys.LeftControl => ImGuiKey.LeftCtrl,
|
||||
Keys.LeftAlt => ImGuiKey.LeftAlt,
|
||||
Keys.LeftSuper => ImGuiKey.LeftSuper,
|
||||
Keys.RightShift => ImGuiKey.RightShift,
|
||||
Keys.RightControl => ImGuiKey.RightCtrl,
|
||||
Keys.RightAlt => ImGuiKey.RightAlt,
|
||||
Keys.RightSuper => ImGuiKey.RightSuper,
|
||||
Keys.Menu => ImGuiKey.Menu,
|
||||
_ => ImGuiKey.None
|
||||
};
|
||||
}
|
||||
}
|
||||
30
FModel/Framework/JsonNetSerializer.cs
Normal file
30
FModel/Framework/JsonNetSerializer.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using RestSharp;
|
||||
using RestSharp.Serializers;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class JsonNetSerializer : IRestSerializer, ISerializer, IDeserializer
|
||||
{
|
||||
public static readonly JsonSerializerSettings SerializerSettings = new()
|
||||
{
|
||||
NullValueHandling = NullValueHandling.Ignore,
|
||||
MissingMemberHandling = MissingMemberHandling.Ignore,
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||
};
|
||||
|
||||
public string Serialize(Parameter parameter) => JsonConvert.SerializeObject(parameter.Value);
|
||||
public string Serialize(object obj) => JsonConvert.SerializeObject(obj);
|
||||
public T Deserialize<T>(RestResponse response) => JsonConvert.DeserializeObject<T>(response.Content!, SerializerSettings);
|
||||
|
||||
public ISerializer Serializer => this;
|
||||
public IDeserializer Deserializer => this;
|
||||
|
||||
public ContentType ContentType { get; set; } = ContentType.Json;
|
||||
public string[] AcceptedContentTypes => ContentType.JsonAccept;
|
||||
public SupportsContentType SupportsContentType => contentType => contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
public DataFormat DataFormat => DataFormat.Json;
|
||||
}
|
||||
46
FModel/Framework/NavigationList.cs
Normal file
46
FModel/Framework/NavigationList.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class NavigationList<T> : List<T>
|
||||
{
|
||||
private int _currentIndex;
|
||||
public int CurrentIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_currentIndex > Count - 1)
|
||||
{
|
||||
_currentIndex = Count - 1;
|
||||
}
|
||||
|
||||
if (_currentIndex < 0)
|
||||
{
|
||||
_currentIndex = 0;
|
||||
}
|
||||
|
||||
return _currentIndex;
|
||||
}
|
||||
set => _currentIndex = value;
|
||||
}
|
||||
|
||||
public T MoveNext
|
||||
{
|
||||
get
|
||||
{
|
||||
_currentIndex++;
|
||||
return this[CurrentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public T MovePrevious
|
||||
{
|
||||
get
|
||||
{
|
||||
_currentIndex--;
|
||||
return this[CurrentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public T Current => this[CurrentIndex];
|
||||
}
|
||||
41
FModel/Framework/RangeObservableCollection.cs
Normal file
41
FModel/Framework/RangeObservableCollection.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public sealed class RangeObservableCollection<T> : ObservableCollection<T>
|
||||
{
|
||||
private bool _suppressNotification;
|
||||
|
||||
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (!_suppressNotification)
|
||||
base.OnCollectionChanged(e);
|
||||
}
|
||||
|
||||
public void AddRange(IEnumerable<T> list)
|
||||
{
|
||||
if (list == null)
|
||||
throw new ArgumentNullException(nameof(list));
|
||||
|
||||
_suppressNotification = true;
|
||||
|
||||
foreach (var item in list)
|
||||
Add(item);
|
||||
|
||||
_suppressNotification = false;
|
||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
|
||||
}
|
||||
|
||||
public void SetSuppressionState(bool state)
|
||||
{
|
||||
_suppressNotification = state;
|
||||
}
|
||||
|
||||
public void InvokeOnCollectionChanged(NotifyCollectionChangedAction changedAction = NotifyCollectionChangedAction.Reset)
|
||||
{
|
||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(changedAction));
|
||||
}
|
||||
}
|
||||
75
FModel/Framework/ViewModel.cs
Normal file
75
FModel/Framework/ViewModel.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public class ViewModel : INotifyPropertyChanged, INotifyDataErrorInfo, IDataErrorInfo
|
||||
{
|
||||
private readonly Dictionary<string, IList<string>> _validationErrors = new();
|
||||
|
||||
public string this[string propertyName]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(propertyName))
|
||||
return Error;
|
||||
|
||||
return _validationErrors.ContainsKey(propertyName) ? string.Join(Environment.NewLine, _validationErrors[propertyName]) : string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonIgnore] public string Error => string.Join(Environment.NewLine, GetAllErrors());
|
||||
[JsonIgnore] public bool HasErrors => _validationErrors.Any();
|
||||
|
||||
public IEnumerable GetErrors(string propertyName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(propertyName))
|
||||
return _validationErrors.SelectMany(kvp => kvp.Value);
|
||||
|
||||
return _validationErrors.TryGetValue(propertyName, out var errors) ? errors : Enumerable.Empty<object>();
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetAllErrors()
|
||||
{
|
||||
return _validationErrors.SelectMany(kvp => kvp.Value).Where(e => !string.IsNullOrEmpty(e));
|
||||
}
|
||||
|
||||
public void AddValidationError(string propertyName, string errorMessage)
|
||||
{
|
||||
if (!_validationErrors.ContainsKey(propertyName))
|
||||
_validationErrors.Add(propertyName, new List<string>());
|
||||
|
||||
_validationErrors[propertyName].Add(errorMessage);
|
||||
}
|
||||
|
||||
public void ClearValidationErrors(string propertyName)
|
||||
{
|
||||
if (_validationErrors.ContainsKey(propertyName))
|
||||
_validationErrors.Remove(propertyName);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
#pragma warning disable 67
|
||||
public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;
|
||||
#pragma warning disable 67
|
||||
|
||||
protected void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
protected virtual bool SetProperty<T>(ref T storage, T value, [CallerMemberName] string propertyName = null)
|
||||
{
|
||||
if (EqualityComparer<T>.Default.Equals(storage, value))
|
||||
return false;
|
||||
|
||||
storage = value;
|
||||
RaisePropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
49
FModel/Framework/ViewModelCommand.cs
Normal file
49
FModel/Framework/ViewModelCommand.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
|
||||
namespace FModel.Framework;
|
||||
|
||||
public abstract class ViewModelCommand<TContextViewModel> : Command where TContextViewModel : ViewModel
|
||||
{
|
||||
private WeakReference _parent;
|
||||
|
||||
public TContextViewModel ContextViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_parent is { IsAlive: true })
|
||||
return (TContextViewModel) _parent.Target;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private set
|
||||
{
|
||||
if (ContextViewModel == value)
|
||||
return;
|
||||
|
||||
_parent = value != null ? new WeakReference(value) : null;
|
||||
}
|
||||
}
|
||||
|
||||
protected ViewModelCommand(TContextViewModel contextViewModel)
|
||||
{
|
||||
ContextViewModel = contextViewModel /*?? throw new ArgumentNullException(nameof(contextViewModel))*/;
|
||||
}
|
||||
|
||||
public sealed override void Execute(object parameter)
|
||||
{
|
||||
Execute(ContextViewModel, parameter);
|
||||
}
|
||||
|
||||
public abstract void Execute(TContextViewModel contextViewModel, object parameter);
|
||||
|
||||
public sealed override bool CanExecute(object parameter)
|
||||
{
|
||||
return CanExecute(ContextViewModel, parameter);
|
||||
}
|
||||
|
||||
public virtual bool CanExecute(TContextViewModel contextViewModel, object parameter)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
114
FModel/Helper.cs
Normal file
114
FModel/Helper.cs
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
|
||||
namespace FModel;
|
||||
|
||||
public static class Helper
|
||||
{
|
||||
public static string FixKey(string key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
return string.Empty;
|
||||
|
||||
var keySpan = key.AsSpan().Trim();
|
||||
if (keySpan.Length > sizeof(char) * (2 /* 0x */ + 32 /* FAES = 256 bit */)) // maybe strictly check for length?
|
||||
return string.Empty; // bullshit key
|
||||
|
||||
Span<char> resultSpan = stackalloc char[keySpan.Length + 2 /* pad for 0x */];
|
||||
keySpan.ToUpperInvariant(resultSpan[2..]);
|
||||
|
||||
if (resultSpan[2..].StartsWith("0X"))
|
||||
resultSpan = resultSpan[2..];
|
||||
else
|
||||
resultSpan[0] = '0';
|
||||
|
||||
resultSpan[1] = 'x';
|
||||
|
||||
return new string(resultSpan);
|
||||
}
|
||||
|
||||
public static void OpenWindow<T>(string windowName, Action action) where T : Window
|
||||
{
|
||||
if (!IsWindowOpen<T>(windowName))
|
||||
{
|
||||
action();
|
||||
}
|
||||
else
|
||||
{
|
||||
var w = GetOpenedWindow<T>(windowName);
|
||||
if (windowName == "Search View") w.WindowState = WindowState.Normal;
|
||||
w.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
public static T GetWindow<T>(string windowName, Action action) where T : Window
|
||||
{
|
||||
if (!IsWindowOpen<T>(windowName))
|
||||
{
|
||||
action();
|
||||
}
|
||||
|
||||
var ret = (T) GetOpenedWindow<T>(windowName);
|
||||
ret.Focus();
|
||||
ret.Activate();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void CloseWindow<T>(string windowName) where T : Window
|
||||
{
|
||||
if (!IsWindowOpen<T>(windowName)) return;
|
||||
GetOpenedWindow<T>(windowName).Close();
|
||||
}
|
||||
|
||||
private static bool IsWindowOpen<T>(string name = "") where T : Window
|
||||
{
|
||||
return string.IsNullOrEmpty(name)
|
||||
? Application.Current.Windows.OfType<T>().Any()
|
||||
: Application.Current.Windows.OfType<T>().Any(w => w.Title.Equals(name));
|
||||
}
|
||||
|
||||
private static Window GetOpenedWindow<T>(string name) where T : Window
|
||||
{
|
||||
return Application.Current.Windows.OfType<T>().FirstOrDefault(w => w.Title.Equals(name));
|
||||
}
|
||||
|
||||
public static bool IsNaN(double value)
|
||||
{
|
||||
var ulongValue = Unsafe.As<double, ulong>(ref value);
|
||||
var exp = ulongValue & 0xfff0000000000000;
|
||||
var man = ulongValue & 0x000fffffffffffff;
|
||||
return exp is 0x7ff0000000000000 or 0xfff0000000000000 && man != 0;
|
||||
}
|
||||
|
||||
public static bool AreVirtuallyEqual(double d1, double d2)
|
||||
{
|
||||
if (double.IsPositiveInfinity(d1))
|
||||
return double.IsPositiveInfinity(d2);
|
||||
|
||||
if (double.IsNegativeInfinity(d1))
|
||||
return double.IsNegativeInfinity(d2);
|
||||
|
||||
if (IsNaN(d1))
|
||||
return IsNaN(d2);
|
||||
|
||||
var n = d1 - d2;
|
||||
var d = (Math.Abs(d1) + Math.Abs(d2) + 10) * 1.0e-15;
|
||||
return -d < n && d > n;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float DegreesToRadians(float degrees)
|
||||
{
|
||||
const float ratio = MathF.PI / 180f;
|
||||
return ratio * degrees;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float RadiansToDegrees(float radians)
|
||||
{
|
||||
const float ratio = 180f / MathF.PI;
|
||||
return radians * ratio;
|
||||
}
|
||||
}
|
||||
690
FModel/MainWindow.Designer.cs
generated
690
FModel/MainWindow.Designer.cs
generated
|
|
@ -1,690 +0,0 @@
|
|||
namespace FModel
|
||||
{
|
||||
partial class MainWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Variable nécessaire au concepteur.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Nettoyage des ressources utilisées.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Code généré par le Concepteur Windows Form
|
||||
|
||||
/// <summary>
|
||||
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
|
||||
/// le contenu de cette méthode avec l'éditeur de code.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.loadOneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.loadAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.backupPAKsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.differenceModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.updateModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.filesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsJSONToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.copySelectedFilePathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.autoSaveImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mergeImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tweetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutFModelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.AESManagerButton = new System.Windows.Forms.Button();
|
||||
this.StopButton = new System.Windows.Forms.Button();
|
||||
this.OpenImageButton = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.FilterTextBox = new System.Windows.Forms.TextBox();
|
||||
this.ExtractButton = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.scintilla1 = new ScintillaNET.Scintilla();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.extractToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyFileNameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyFilePathWithoutExtensionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyFileNameWithoutExtensionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsJSONToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.extractFolderContentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1,
|
||||
this.toolStripStatusLabel2,
|
||||
this.toolStripStatusLabel3});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 683);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1191, 22);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 0;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
|
||||
this.toolStripStatusLabel1.Margin = new System.Windows.Forms.Padding(1, 3, 50, 2);
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(47, 17);
|
||||
this.toolStripStatusLabel1.Text = "FModel";
|
||||
//
|
||||
// toolStripStatusLabel2
|
||||
//
|
||||
this.toolStripStatusLabel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
|
||||
this.toolStripStatusLabel2.Margin = new System.Windows.Forms.Padding(0, 3, 50, 2);
|
||||
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
|
||||
this.toolStripStatusLabel2.Size = new System.Drawing.Size(994, 17);
|
||||
this.toolStripStatusLabel2.Spring = true;
|
||||
//
|
||||
// toolStripStatusLabel3
|
||||
//
|
||||
this.toolStripStatusLabel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
|
||||
this.toolStripStatusLabel3.Margin = new System.Windows.Forms.Padding(0, 3, 1, 2);
|
||||
this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
|
||||
this.toolStripStatusLabel3.Size = new System.Drawing.Size(33, 17);
|
||||
this.toolStripStatusLabel3.Text = "State";
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.loadToolStripMenuItem,
|
||||
this.filesToolStripMenuItem,
|
||||
this.imageToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1191, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// loadToolStripMenuItem
|
||||
//
|
||||
this.loadToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.loadOneToolStripMenuItem,
|
||||
this.loadAllToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.backupPAKsToolStripMenuItem,
|
||||
this.differenceModeToolStripMenuItem,
|
||||
this.updateModeToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.settingsToolStripMenuItem});
|
||||
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
|
||||
this.loadToolStripMenuItem.Size = new System.Drawing.Size(45, 20);
|
||||
this.loadToolStripMenuItem.Text = "Load";
|
||||
//
|
||||
// loadOneToolStripMenuItem
|
||||
//
|
||||
this.loadOneToolStripMenuItem.Name = "loadOneToolStripMenuItem";
|
||||
this.loadOneToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.loadOneToolStripMenuItem.Text = "Load One PAK";
|
||||
this.loadOneToolStripMenuItem.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.loadOneToolStripMenuItem_DropDownItemClicked);
|
||||
//
|
||||
// loadAllToolStripMenuItem
|
||||
//
|
||||
this.loadAllToolStripMenuItem.Name = "loadAllToolStripMenuItem";
|
||||
this.loadAllToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.loadAllToolStripMenuItem.Text = "Load All PAKs";
|
||||
this.loadAllToolStripMenuItem.Click += new System.EventHandler(this.loadAllToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(159, 6);
|
||||
//
|
||||
// backupPAKsToolStripMenuItem
|
||||
//
|
||||
this.backupPAKsToolStripMenuItem.Name = "backupPAKsToolStripMenuItem";
|
||||
this.backupPAKsToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.backupPAKsToolStripMenuItem.Text = "Backup PAKs";
|
||||
this.backupPAKsToolStripMenuItem.Click += new System.EventHandler(this.backupPAKsToolStripMenuItem_Click);
|
||||
//
|
||||
// differenceModeToolStripMenuItem
|
||||
//
|
||||
this.differenceModeToolStripMenuItem.CheckOnClick = true;
|
||||
this.differenceModeToolStripMenuItem.Name = "differenceModeToolStripMenuItem";
|
||||
this.differenceModeToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.differenceModeToolStripMenuItem.Text = "Difference Mode";
|
||||
this.differenceModeToolStripMenuItem.CheckedChanged += new System.EventHandler(this.differenceModeToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// updateModeToolStripMenuItem
|
||||
//
|
||||
this.updateModeToolStripMenuItem.CheckOnClick = true;
|
||||
this.updateModeToolStripMenuItem.Enabled = false;
|
||||
this.updateModeToolStripMenuItem.Name = "updateModeToolStripMenuItem";
|
||||
this.updateModeToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.updateModeToolStripMenuItem.Text = "Update Mode";
|
||||
this.updateModeToolStripMenuItem.CheckedChanged += new System.EventHandler(this.updateModeToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(159, 6);
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.Image = global::FModel.Properties.Resources.properties_16xLG;
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
|
||||
this.settingsToolStripMenuItem.Text = "Settings";
|
||||
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
|
||||
//
|
||||
// filesToolStripMenuItem
|
||||
//
|
||||
this.filesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.searchToolStripMenuItem,
|
||||
this.saveAsJSONToolStripMenuItem,
|
||||
this.toolStripSeparator5,
|
||||
this.copySelectedFilePathToolStripMenuItem});
|
||||
this.filesToolStripMenuItem.Name = "filesToolStripMenuItem";
|
||||
this.filesToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
|
||||
this.filesToolStripMenuItem.Text = "Files";
|
||||
//
|
||||
// searchToolStripMenuItem
|
||||
//
|
||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||
this.searchToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.searchToolStripMenuItem.Text = "Search";
|
||||
this.searchToolStripMenuItem.Click += new System.EventHandler(this.searchToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsJSONToolStripMenuItem
|
||||
//
|
||||
this.saveAsJSONToolStripMenuItem.Name = "saveAsJSONToolStripMenuItem";
|
||||
this.saveAsJSONToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
|
||||
this.saveAsJSONToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.saveAsJSONToolStripMenuItem.Text = "Save as JSON";
|
||||
this.saveAsJSONToolStripMenuItem.Click += new System.EventHandler(this.SaveAsJSONToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(194, 6);
|
||||
//
|
||||
// copySelectedFilePathToolStripMenuItem
|
||||
//
|
||||
this.copySelectedFilePathToolStripMenuItem.Name = "copySelectedFilePathToolStripMenuItem";
|
||||
this.copySelectedFilePathToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.copySelectedFilePathToolStripMenuItem.Text = "Copy Selected File Path";
|
||||
this.copySelectedFilePathToolStripMenuItem.Click += new System.EventHandler(this.CopySelectedFilePathToolStripMenuItem_Click);
|
||||
//
|
||||
// imageToolStripMenuItem
|
||||
//
|
||||
this.imageToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveImageToolStripMenuItem,
|
||||
this.autoSaveImagesToolStripMenuItem,
|
||||
this.toolStripSeparator3,
|
||||
this.mergeImagesToolStripMenuItem,
|
||||
this.toolStripSeparator4,
|
||||
this.tweetToolStripMenuItem});
|
||||
this.imageToolStripMenuItem.Name = "imageToolStripMenuItem";
|
||||
this.imageToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
|
||||
this.imageToolStripMenuItem.Text = "Image";
|
||||
//
|
||||
// saveImageToolStripMenuItem
|
||||
//
|
||||
this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem";
|
||||
this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.saveImageToolStripMenuItem.Text = "Save Image";
|
||||
this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click);
|
||||
//
|
||||
// autoSaveImagesToolStripMenuItem
|
||||
//
|
||||
this.autoSaveImagesToolStripMenuItem.CheckOnClick = true;
|
||||
this.autoSaveImagesToolStripMenuItem.Name = "autoSaveImagesToolStripMenuItem";
|
||||
this.autoSaveImagesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.autoSaveImagesToolStripMenuItem.Text = "Auto Save Images";
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// mergeImagesToolStripMenuItem
|
||||
//
|
||||
this.mergeImagesToolStripMenuItem.Name = "mergeImagesToolStripMenuItem";
|
||||
this.mergeImagesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.mergeImagesToolStripMenuItem.Text = "Merge Images";
|
||||
this.mergeImagesToolStripMenuItem.Click += new System.EventHandler(this.mergeImagesToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// tweetToolStripMenuItem
|
||||
//
|
||||
this.tweetToolStripMenuItem.Name = "tweetToolStripMenuItem";
|
||||
this.tweetToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F4;
|
||||
this.tweetToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.tweetToolStripMenuItem.Text = "Tweet";
|
||||
this.tweetToolStripMenuItem.Click += new System.EventHandler(this.TweetToolStripMenuItem_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.aboutFModelToolStripMenuItem});
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// aboutFModelToolStripMenuItem
|
||||
//
|
||||
this.aboutFModelToolStripMenuItem.Image = global::FModel.Properties.Resources.StatusAnnotations_Information_16xLG_color;
|
||||
this.aboutFModelToolStripMenuItem.Name = "aboutFModelToolStripMenuItem";
|
||||
this.aboutFModelToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.aboutFModelToolStripMenuItem.Text = "About FModel";
|
||||
this.aboutFModelToolStripMenuItem.Click += new System.EventHandler(this.aboutFModelToolStripMenuItem_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
|
||||
this.panel1.Controls.Add(this.AESManagerButton);
|
||||
this.panel1.Controls.Add(this.StopButton);
|
||||
this.panel1.Controls.Add(this.OpenImageButton);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.FilterTextBox);
|
||||
this.panel1.Controls.Add(this.ExtractButton);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 657);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(1191, 26);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// AESManagerButton
|
||||
//
|
||||
this.AESManagerButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.AESManagerButton.Location = new System.Drawing.Point(709, 3);
|
||||
this.AESManagerButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.AESManagerButton.Name = "AESManagerButton";
|
||||
this.AESManagerButton.Size = new System.Drawing.Size(191, 21);
|
||||
this.AESManagerButton.TabIndex = 8;
|
||||
this.AESManagerButton.Text = "AES &Manager";
|
||||
this.AESManagerButton.UseVisualStyleBackColor = true;
|
||||
this.AESManagerButton.Click += new System.EventHandler(this.AESManagerButton_Click);
|
||||
//
|
||||
// StopButton
|
||||
//
|
||||
this.StopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.StopButton.Enabled = false;
|
||||
this.StopButton.ForeColor = System.Drawing.Color.Red;
|
||||
this.StopButton.Location = new System.Drawing.Point(1029, 3);
|
||||
this.StopButton.Name = "StopButton";
|
||||
this.StopButton.Size = new System.Drawing.Size(75, 21);
|
||||
this.StopButton.TabIndex = 6;
|
||||
this.StopButton.Text = "&Stop";
|
||||
this.StopButton.UseVisualStyleBackColor = true;
|
||||
this.StopButton.Click += new System.EventHandler(this.StopButton_Click);
|
||||
//
|
||||
// OpenImageButton
|
||||
//
|
||||
this.OpenImageButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OpenImageButton.Enabled = false;
|
||||
this.OpenImageButton.Location = new System.Drawing.Point(947, 3);
|
||||
this.OpenImageButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.OpenImageButton.Name = "OpenImageButton";
|
||||
this.OpenImageButton.Size = new System.Drawing.Size(75, 21);
|
||||
this.OpenImageButton.TabIndex = 5;
|
||||
this.OpenImageButton.Text = "&Open Image";
|
||||
this.OpenImageButton.UseVisualStyleBackColor = true;
|
||||
this.OpenImageButton.Click += new System.EventHandler(this.OpenImageButton_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 7);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(32, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Filter:";
|
||||
//
|
||||
// FilterTextBox
|
||||
//
|
||||
this.FilterTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.FilterTextBox.Location = new System.Drawing.Point(41, 4);
|
||||
this.FilterTextBox.Name = "FilterTextBox";
|
||||
this.FilterTextBox.Size = new System.Drawing.Size(362, 20);
|
||||
this.FilterTextBox.TabIndex = 3;
|
||||
this.FilterTextBox.TextChanged += new System.EventHandler(this.FilterTextBox_TextChanged);
|
||||
//
|
||||
// ExtractButton
|
||||
//
|
||||
this.ExtractButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ExtractButton.Enabled = false;
|
||||
this.ExtractButton.Location = new System.Drawing.Point(1110, 3);
|
||||
this.ExtractButton.Name = "ExtractButton";
|
||||
this.ExtractButton.Size = new System.Drawing.Size(75, 21);
|
||||
this.ExtractButton.TabIndex = 0;
|
||||
this.ExtractButton.Text = "&Extract";
|
||||
this.ExtractButton.UseVisualStyleBackColor = true;
|
||||
this.ExtractButton.Click += new System.EventHandler(this.ExtractButton_Click);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 29.555F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 70.44501F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.treeView1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.listBox1, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.richTextBox1, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 24);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1191, 633);
|
||||
this.tableLayoutPanel1.TabIndex = 3;
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeView1.ImageIndex = 1;
|
||||
this.treeView1.ImageList = this.imageList1;
|
||||
this.treeView1.Location = new System.Drawing.Point(3, 3);
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.SelectedImageIndex = 0;
|
||||
this.treeView1.Size = new System.Drawing.Size(346, 310);
|
||||
this.treeView1.TabIndex = 0;
|
||||
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||
//
|
||||
// imageList1
|
||||
//
|
||||
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList1.Images.SetKeyName(0, "folder_16x.png");
|
||||
this.imageList1.Images.SetKeyName(1, "folder_Closed_16xLG.png");
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.Location = new System.Drawing.Point(3, 319);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
|
||||
this.listBox1.Size = new System.Drawing.Size(346, 311);
|
||||
this.listBox1.Sorted = true;
|
||||
this.listBox1.TabIndex = 1;
|
||||
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
this.listBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDown);
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.richTextBox1.Location = new System.Drawing.Point(355, 319);
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
this.richTextBox1.ReadOnly = true;
|
||||
this.richTextBox1.Size = new System.Drawing.Size(833, 311);
|
||||
this.richTextBox1.TabIndex = 2;
|
||||
this.richTextBox1.Text = "";
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
this.tableLayoutPanel2.ColumnCount = 2;
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 62.86398F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.13602F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.scintilla1, 0, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 1, 0);
|
||||
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(355, 3);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 1;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(833, 310);
|
||||
this.tableLayoutPanel2.TabIndex = 3;
|
||||
//
|
||||
// scintilla1
|
||||
//
|
||||
this.scintilla1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.scintilla1.CaretPeriod = 400;
|
||||
this.scintilla1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.scintilla1.IndentationGuides = ScintillaNET.IndentView.Real;
|
||||
this.scintilla1.Location = new System.Drawing.Point(3, 3);
|
||||
this.scintilla1.Name = "scintilla1";
|
||||
this.scintilla1.ScrollWidth = 496;
|
||||
this.scintilla1.Size = new System.Drawing.Size(517, 304);
|
||||
this.scintilla1.TabIndex = 0;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(526, 3);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(304, 304);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 1;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// backgroundWorker1
|
||||
//
|
||||
this.backgroundWorker1.WorkerSupportsCancellation = true;
|
||||
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
|
||||
this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
|
||||
//
|
||||
// backgroundWorker2
|
||||
//
|
||||
this.backgroundWorker2.WorkerSupportsCancellation = true;
|
||||
this.backgroundWorker2.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker2_DoWork);
|
||||
this.backgroundWorker2.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker2_RunWorkerCompleted);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.extractToolStripMenuItem,
|
||||
this.copyFilesToolStripMenuItem,
|
||||
this.saveAsJSONToolStripMenuItem1});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(144, 70);
|
||||
//
|
||||
// extractToolStripMenuItem
|
||||
//
|
||||
this.extractToolStripMenuItem.Name = "extractToolStripMenuItem";
|
||||
this.extractToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
this.extractToolStripMenuItem.Text = "Extract";
|
||||
this.extractToolStripMenuItem.Click += new System.EventHandler(this.extractToolStripMenuItem_Click);
|
||||
//
|
||||
// copyFilesToolStripMenuItem
|
||||
//
|
||||
this.copyFilesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.copyFileToolStripMenuItem,
|
||||
this.copyFileNameToolStripMenuItem,
|
||||
this.copyFilePathWithoutExtensionToolStripMenuItem,
|
||||
this.copyFileNameWithoutExtensionToolStripMenuItem});
|
||||
this.copyFilesToolStripMenuItem.Name = "copyFilesToolStripMenuItem";
|
||||
this.copyFilesToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
this.copyFilesToolStripMenuItem.Text = "Copy File";
|
||||
//
|
||||
// copyFileToolStripMenuItem
|
||||
//
|
||||
this.copyFileToolStripMenuItem.Name = "copyFileToolStripMenuItem";
|
||||
this.copyFileToolStripMenuItem.Size = new System.Drawing.Size(255, 22);
|
||||
this.copyFileToolStripMenuItem.Text = "Copy File Path";
|
||||
this.copyFileToolStripMenuItem.Click += new System.EventHandler(this.copyFileToolStripMenuItem_Click);
|
||||
//
|
||||
// copyFileNameToolStripMenuItem
|
||||
//
|
||||
this.copyFileNameToolStripMenuItem.Name = "copyFileNameToolStripMenuItem";
|
||||
this.copyFileNameToolStripMenuItem.Size = new System.Drawing.Size(255, 22);
|
||||
this.copyFileNameToolStripMenuItem.Text = "Copy File Name";
|
||||
this.copyFileNameToolStripMenuItem.Click += new System.EventHandler(this.copyFileNameToolStripMenuItem_Click);
|
||||
//
|
||||
// copyFilePathWithoutExtensionToolStripMenuItem
|
||||
//
|
||||
this.copyFilePathWithoutExtensionToolStripMenuItem.Name = "copyFilePathWithoutExtensionToolStripMenuItem";
|
||||
this.copyFilePathWithoutExtensionToolStripMenuItem.Size = new System.Drawing.Size(255, 22);
|
||||
this.copyFilePathWithoutExtensionToolStripMenuItem.Text = "Copy File Path without Extension";
|
||||
this.copyFilePathWithoutExtensionToolStripMenuItem.Click += new System.EventHandler(this.copyFilePathWithoutExtensionToolStripMenuItem_Click);
|
||||
//
|
||||
// copyFileNameWithoutExtensionToolStripMenuItem
|
||||
//
|
||||
this.copyFileNameWithoutExtensionToolStripMenuItem.Name = "copyFileNameWithoutExtensionToolStripMenuItem";
|
||||
this.copyFileNameWithoutExtensionToolStripMenuItem.Size = new System.Drawing.Size(255, 22);
|
||||
this.copyFileNameWithoutExtensionToolStripMenuItem.Text = "Copy File Name without Extension";
|
||||
this.copyFileNameWithoutExtensionToolStripMenuItem.Click += new System.EventHandler(this.copyFileNameWithoutExtensionToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsJSONToolStripMenuItem1
|
||||
//
|
||||
this.saveAsJSONToolStripMenuItem1.Name = "saveAsJSONToolStripMenuItem1";
|
||||
this.saveAsJSONToolStripMenuItem1.Size = new System.Drawing.Size(143, 22);
|
||||
this.saveAsJSONToolStripMenuItem1.Text = "Save as JSON";
|
||||
this.saveAsJSONToolStripMenuItem1.Click += new System.EventHandler(this.saveAsJSONToolStripMenuItem1_Click);
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.extractFolderContentsToolStripMenuItem});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip2";
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(197, 26);
|
||||
//
|
||||
// extractFolderContentsToolStripMenuItem
|
||||
//
|
||||
this.extractFolderContentsToolStripMenuItem.Name = "extractFolderContentsToolStripMenuItem";
|
||||
this.extractFolderContentsToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.extractFolderContentsToolStripMenuItem.Text = "Extract Folder Contents";
|
||||
this.extractFolderContentsToolStripMenuItem.Click += new System.EventHandler(this.ExtractFolderContentsToolStripMenuItem_Click);
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1191, 705);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MinimumSize = new System.Drawing.Size(1207, 744);
|
||||
this.Name = "MainWindow";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "FModel";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWindow_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainWindow_Load);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem loadOneToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem loadAllToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem backupPAKsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem differenceModeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem updateModeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem imageToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutFModelToolStripMenuItem;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button ExtractButton;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox FilterTextBox;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.TreeView treeView1;
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
private System.Windows.Forms.Button OpenImageButton;
|
||||
private System.Windows.Forms.ImageList imageList1;
|
||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private ScintillaNET.Scintilla scintilla1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoSaveImagesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ToolStripMenuItem mergeImagesToolStripMenuItem;
|
||||
private System.Windows.Forms.Button StopButton;
|
||||
private System.ComponentModel.BackgroundWorker backgroundWorker1;
|
||||
private System.ComponentModel.BackgroundWorker backgroundWorker2;
|
||||
private System.Windows.Forms.ToolStripMenuItem filesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem searchToolStripMenuItem;
|
||||
private System.Windows.Forms.Button AESManagerButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem copySelectedFilePathToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveAsJSONToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem extractToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyFilesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyFileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyFileNameToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyFilePathWithoutExtensionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyFileNameWithoutExtensionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveAsJSONToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem tweetToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
|
||||
private System.Windows.Forms.ToolStripMenuItem extractFolderContentsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
}
|
||||
}
|
||||
|
||||
1801
FModel/MainWindow.cs
1801
FModel/MainWindow.cs
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
815
FModel/MainWindow.xaml
Normal file
815
FModel/MainWindow.xaml
Normal file
|
|
@ -0,0 +1,815 @@
|
|||
<adonisControls:AdonisWindow x:Class="FModel.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:FModel"
|
||||
xmlns:controls="clr-namespace:FModel.Views.Resources.Controls"
|
||||
xmlns:converters="clr-namespace:FModel.Views.Resources.Converters"
|
||||
xmlns:settings="clr-namespace:FModel.Settings"
|
||||
xmlns:services="clr-namespace:FModel.Services"
|
||||
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
|
||||
xmlns:adonisControls="clr-namespace:AdonisUI.Controls;assembly=AdonisUI"
|
||||
xmlns:adonisExtensions="clr-namespace:AdonisUI.Extensions;assembly=AdonisUI"
|
||||
WindowStartupLocation="CenterScreen" Closing="OnClosing" Loaded="OnLoaded" PreviewKeyDown="OnWindowKeyDown"
|
||||
Height="{Binding Source={x:Static SystemParameters.MaximizedPrimaryScreenHeight}, Converter={converters:RatioConverter}, ConverterParameter='0.85'}"
|
||||
Width="{Binding Source={x:Static SystemParameters.MaximizedPrimaryScreenWidth}, Converter={converters:RatioConverter}, ConverterParameter='0.75'}">
|
||||
<adonisControls:AdonisWindow.Style>
|
||||
<Style TargetType="adonisControls:AdonisWindow" BasedOn="{StaticResource {x:Type adonisControls:AdonisWindow}}" >
|
||||
<Setter Property="Title" Value="{Binding DataContext.InitialWindowTitle, RelativeSource={RelativeSource Self}}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.TitleExtra, RelativeSource={RelativeSource Self}, Converter={x:Static converters:IsNullToBoolReversedConverter.Instance}}" Value="True">
|
||||
<Setter Property="Title">
|
||||
<Setter.Value>
|
||||
<MultiBinding StringFormat="{}{0} - {1} {2}">
|
||||
<Binding Path="DataContext.InitialWindowTitle" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="DataContext.GameDisplayName" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="DataContext.TitleExtra" RelativeSource="{RelativeSource Self}" />
|
||||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</adonisControls:AdonisWindow.Style>
|
||||
<adonisControls:AdonisWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Views/Resources/Resources.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</adonisControls:AdonisWindow.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="{adonisUi:Space 1}" />
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Menu Grid.Row="0">
|
||||
<MenuItem Header="Directory">
|
||||
<MenuItem Header="Selector" Command="{Binding MenuCommand}" CommandParameter="Directory_Selector">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource DirectoryIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="AES" Command="{Binding MenuCommand}" CommandParameter="Directory_AES" IsEnabled="{Binding Status.IsReady}">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource KeyIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Backup" Command="{Binding MenuCommand}" CommandParameter="Directory_Backup" IsEnabled="{Binding Status.IsReady}">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource BackupIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Archives Info" Command="{Binding MenuCommand}" CommandParameter="Directory_ArchivesInfo" IsEnabled="{Binding Status.IsReady}">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource InfoIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Packages">
|
||||
<MenuItem Header="Search" IsEnabled="{Binding Status.IsReady}" InputGestureText="Ctrl+Shift+F" Click="OnSearchViewClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource SearchIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Favorite Directories" ItemsSource="{Binding CustomDirectories.Directories}" IsEnabled="{Binding Status.IsReady}">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource DirectoriesIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="Auto Open Sounds" IsCheckable="True" StaysOpenOnClick="True"
|
||||
IsChecked="{Binding IsAutoOpenSounds, Source={x:Static settings:UserSettings.Default}}" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="Views">
|
||||
<MenuItem Header="3D Viewer" Command="{Binding MenuCommand}" CommandParameter="Views_3dViewer">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource MeshIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Audio Player" Command="{Binding MenuCommand}" CommandParameter="Views_AudioPlayer">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource AudioIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Image Merger" Command="{Binding MenuCommand}" CommandParameter="Views_ImageMerger">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource ImageMergerIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Settings" Command="{Binding MenuCommand}" CommandParameter="Settings" />
|
||||
<MenuItem Header="Help" >
|
||||
<MenuItem Header="Donate" Command="{Binding MenuCommand}" CommandParameter="Help_Donate">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource GiftIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Releases" Command="{Binding MenuCommand}" CommandParameter="Help_Releases">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource GitHubIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Bugs Report" Command="{Binding MenuCommand}" CommandParameter="Help_BugsReport">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource BugIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Discord Server" Command="{Binding MenuCommand}" CommandParameter="Help_Discord">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource DiscordIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="About FModel" Command="{Binding MenuCommand}" CommandParameter="Help_About">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource InfoIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
<Grid x:Name="RootGrid" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<GroupBox Grid.Column="0" adonisExtensions:LayerExtension.Layer="2"
|
||||
Padding="{adonisUi:Space 0}" Background="Transparent">
|
||||
<TabControl x:Name="LeftTabControl" SelectionChanged="OnTabItemChange">
|
||||
<TabItem Style="{StaticResource TabItemFillSpace}" Header="Archives">
|
||||
<DockPanel>
|
||||
<Grid DockPanel.Dock="Top">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="5" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Loading Mode" VerticalAlignment="Center" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="2" ItemsSource="{Binding LoadingModes.Modes}" IsEnabled="{Binding Status.IsReady}"
|
||||
SelectedItem="{Binding LoadingMode, Source={x:Static settings:UserSettings.Default}, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={x:Static converters:EnumToStringConverter.Instance}}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<Button Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" Content="Load"
|
||||
Command="{Binding LoadingModes.LoadCommand}" IsEnabled="{Binding Status.IsReady}"
|
||||
CommandParameter="{Binding SelectedItems, ElementName=DirectoryFilesListBox}" />
|
||||
</Grid>
|
||||
<Grid DockPanel.Dock="Top">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Separator Grid.Row="0" Style="{StaticResource CustomSeparator}" Tag="GAME ARCHIVES" />
|
||||
<ListBox Grid.Row="1" x:Name="DirectoryFilesListBox" Style="{StaticResource DirectoryFilesListBox}" MouseDoubleClick="OnMouseDoubleClick" />
|
||||
<Separator Grid.Row="2" Style="{StaticResource CustomSeparator}" Tag="INFORMATION" />
|
||||
<StackPanel Grid.Row="3" Orientation="Vertical" Margin="0 0 0 5">
|
||||
<Grid HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding SelectedItem.MountPoint, ElementName=DirectoryFilesListBox, FallbackValue='/', Converter={x:Static converters:TrimRightToLeftConverter.Instance}, ConverterParameter=275}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="Mount Point" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding SelectedItem.FileCount, ElementName=DirectoryFilesListBox, FallbackValue='0', StringFormat={}{0} Files}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="File Count" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding SelectedItem.IsEncrypted, ElementName=DirectoryFilesListBox, FallbackValue='False'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="Is Encrypted" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding SelectedItem.Guid, ElementName=DirectoryFilesListBox, FallbackValue='00000000000000000000000000000000'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="Global Unique Identifier" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</TabItem>
|
||||
<TabItem Style="{StaticResource TabItemFillSpace}" Header="Folders">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||
<Image Source="/FModel;component/Resources/label.png"
|
||||
Width="16" Height="16" HorizontalAlignment="Center" Margin="0 0 3.5 0" />
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextTrimming="CharacterEllipsis">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}'{0}' has {1} folders and {2} packages">
|
||||
<Binding Path="SelectedItem.Header" ElementName="AssetsFolderName" FallbackValue="None" />
|
||||
<Binding Path="SelectedItem.FoldersView.Count" ElementName="AssetsFolderName" FallbackValue="0" />
|
||||
<Binding Path="SelectedItem.AssetsList.Assets.Count" ElementName="AssetsFolderName" FallbackValue="0" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{DynamicResource {x:Static adonisUi:Styles.ToolbarButton}}" ToolTip="Bring Selected Folder To View" Padding="4"
|
||||
Command="{Binding MenuCommand}" CommandParameter="{Binding SelectedItem, ElementName=AssetsFolderName}">
|
||||
<Viewbox Width="16" Height="16" HorizontalAlignment="Center">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource LocateMeIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<!-- <Button Style="{DynamicResource {x:Static adonisUi:Styles.ToolbarButton}}" ToolTip="Expand All (not appropriate for huge amount of folders)" Padding="4" -->
|
||||
<!-- Command="{Binding MenuCommand}" CommandParameter="ToolBox_Expand_All"> -->
|
||||
<!-- <Viewbox Width="16" Height="16" HorizontalAlignment="Center"> -->
|
||||
<!-- <Canvas Width="24" Height="24"> -->
|
||||
<!-- <Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource UnfoldIcon}" /> -->
|
||||
<!-- </Canvas> -->
|
||||
<!-- </Viewbox> -->
|
||||
<!-- </Button> -->
|
||||
<Button Style="{DynamicResource {x:Static adonisUi:Styles.ToolbarButton}}" ToolTip="Collapse All" Padding="4"
|
||||
Command="{Binding MenuCommand}" CommandParameter="ToolBox_Collapse_All">
|
||||
<Viewbox Width="16" Height="16" HorizontalAlignment="Center">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource FoldIcon}"/>
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Grid.Row="1" Style="{StaticResource CustomSeparator}" Margin="0" />
|
||||
<TreeView Grid.Row="2" x:Name="AssetsFolderName" Style="{StaticResource AssetsFolderTreeView}" PreviewMouseDoubleClick="OnAssetsTreeMouseDoubleClick">
|
||||
<TreeView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<!-- <MenuItem Header="Extract Folder's Packages" Click="OnFolderExtractClick"> -->
|
||||
<!-- <MenuItem.Icon> -->
|
||||
<!-- <Viewbox Width="16" Height="16"> -->
|
||||
<!-- <Canvas Width="24" Height="24"> -->
|
||||
<!-- <Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource ExtractIcon}" /> -->
|
||||
<!-- </Canvas> -->
|
||||
<!-- </Viewbox> -->
|
||||
<!-- </MenuItem.Icon> -->
|
||||
<!-- </MenuItem> -->
|
||||
<!-- <Separator /> -->
|
||||
<MenuItem Header="Export Folder's Packages Raw Data (.uasset)" Click="OnFolderExportClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource ExportIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Folder's Packages Properties (.json)" Click="OnFolderSaveClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource SaveIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Folder's Packages Textures" Click="OnFolderTextureClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource TextureIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Folder's Packages Models" Click="OnFolderModelClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource ModelIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Folder's Packages Animations" Click="OnFolderAnimationClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource AnimationIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="Favorite Directory" Click="OnFavoriteDirectoryClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource DirectoriesAddIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Copy Directory Path" Click="OnCopyDirectoryPathClick">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource CopyIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</TreeView.ContextMenu>
|
||||
</TreeView>
|
||||
<Separator Grid.Row="3" Style="{StaticResource CustomSeparator}" Tag="INFORMATION" />
|
||||
<StackPanel Grid.Row="4" Orientation="Vertical" Margin="0 0 0 5">
|
||||
<Grid HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding SelectedItem.AssetsList.Assets.Count, ElementName=AssetsFolderName, FallbackValue=0}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="Packages Count" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding SelectedItem.FoldersView.Count, ElementName=AssetsFolderName, FallbackValue=0}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="Folders Count" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding SelectedItem.Archive, ElementName=AssetsFolderName, FallbackValue='None'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="Included In Archive" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding SelectedItem.MountPoint, ElementName=AssetsFolderName, FallbackValue='/', Converter={x:Static converters:TrimRightToLeftConverter.Instance}, ConverterParameter=275}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="Archive Mount Point" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding SelectedItem.Version, ElementName=AssetsFolderName, FallbackValue='VER_UE4_LATEST', Converter={x:Static converters:TrimRightToLeftConverter.Instance}, ConverterParameter=275}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="Archive Version" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Style="{StaticResource TabItemFillSpace}"
|
||||
Header="{Binding SelectedItem.AssetsList.Assets.Count, FallbackValue=0, ElementName=AssetsFolderName}"
|
||||
HeaderStringFormat="{}{0} Packages">
|
||||
<DockPanel>
|
||||
<Grid DockPanel.Dock="Top" ZIndex="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" ZIndex="1" HorizontalAlignment="Left" Margin="5 2 0 0">
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource SearchIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Grid>
|
||||
<TextBox Grid.Column="0" Grid.ColumnSpan="2" x:Name="AssetsSearchName" AcceptsTab="False" AcceptsReturn="False"
|
||||
Padding="25 0 0 0" HorizontalAlignment="Stretch" TextChanged="OnFilterTextChanged"
|
||||
adonisExtensions:WatermarkExtension.Watermark="Search by name..." />
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<Button ToolTip="Clear Search Filter" Padding="5" Style="{DynamicResource {x:Static adonisUi:Styles.ToolbarButton}}" Click="OnDeleteSearchClick">
|
||||
<Viewbox Width="16" Height="16" HorizontalAlignment="Center">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource BackspaceIcon}"/>
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid DockPanel.Dock="Top">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<controls:Breadcrumb Grid.Row="0" MaxWidth="{Binding ActualWidth, ElementName=AssetsSearchName}" HorizontalAlignment="Left" Margin="0 5 0 5"
|
||||
DataContext="{Binding SelectedItem.PathAtThisPoint, ElementName=AssetsFolderName, FallbackValue='No/Directory/Detected/In/Folder'}"/>
|
||||
|
||||
<ListBox Grid.Row="1" x:Name="AssetsListName" Style="{StaticResource AssetsListBox}" PreviewMouseDoubleClick="OnAssetsListMouseDoubleClick" PreviewKeyDown="OnPreviewKeyDown">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu DataContext="{Binding PlacementTarget, RelativeSource={RelativeSource Self}}">
|
||||
<MenuItem Header="Extract in New Tab" Command="{Binding DataContext.RightClickMenuCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Assets_Extract_New_Tab" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource ExtractIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="Export Raw Data (.uasset)" Command="{Binding DataContext.RightClickMenuCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Assets_Export_Data" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource ExportIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Properties (.json)" Command="{Binding DataContext.RightClickMenuCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Assets_Save_Properties" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource SaveIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Texture" Command="{Binding DataContext.RightClickMenuCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Assets_Save_Textures" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource TextureIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Model" Command="{Binding DataContext.RightClickMenuCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Assets_Save_Models" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource ModelIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Save Animation" Command="{Binding DataContext.RightClickMenuCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Assets_Save_Animations" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource AnimationIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="Copy">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource CopyIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
<MenuItem Header="Package Path" Command="{Binding DataContext.CopyCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="File_Path" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Package Name" Command="{Binding DataContext.CopyCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="File_Name" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Directory Path" Command="{Binding DataContext.CopyCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="Directory_Path" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Package Path w/o Extension" Command="{Binding DataContext.CopyCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="File_Path_No_Extension" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Package Name w/o Extension" Command="{Binding DataContext.CopyCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{x:Static converters:MultiParameterConverter.Instance}">
|
||||
<Binding Source="File_Name_No_Extension" />
|
||||
<Binding Path="SelectedItems" />
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
</ListBox>
|
||||
<Separator Grid.Row="2" Style="{StaticResource CustomSeparator}" Tag="INFORMATION" />
|
||||
<StackPanel Grid.Row="3" Orientation="Vertical" Margin="0 0 0 5">
|
||||
<Grid HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding SelectedItem.Offset, ElementName=AssetsListName, FallbackValue=0, StringFormat='{}0x{0:X}'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="Offset" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding SelectedItem.Size, ElementName=AssetsListName, FallbackValue=0, Converter={x:Static converters:SizeToStringConverter.Instance}}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="Size" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding SelectedItem.Compression, ElementName=AssetsListName, FallbackValue='Unknown'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="Compression Method" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding SelectedItem.IsEncrypted, ElementName=AssetsListName, FallbackValue='False'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="Is Encrypted" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding SelectedItem.Archive, ElementName=AssetsListName, FallbackValue='None'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="Included In Archive" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</GroupBox>
|
||||
|
||||
<GridSplitter Grid.Column="1" ResizeDirection="Columns" Width="4" VerticalAlignment="Stretch"
|
||||
ResizeBehavior="PreviousAndNext" MouseDoubleClick="OnGridSplitterDoubleClick"
|
||||
Background="{DynamicResource {x:Static adonisUi:Brushes.Layer0BackgroundBrush}}" />
|
||||
|
||||
<GroupBox Grid.Column="2" adonisExtensions:LayerExtension.Layer="2"
|
||||
Padding="{adonisUi:Space 0}" Background="Transparent">
|
||||
<Grid Margin="0 0 3 0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TabControl Grid.Row="0" x:Name="TabControlName" Style="{StaticResource GameFilesTabControl}" />
|
||||
<Expander Grid.Row="1" Margin="0 5 0 5" ExpandDirection="Down"
|
||||
IsExpanded="{Binding IsLoggerExpanded, Source={x:Static settings:UserSettings.Default}}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="2" />
|
||||
<ColumnDefinition Width="24" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<controls:CustomRichTextBox Grid.Column="0" Grid.ColumnSpan="3" x:Name="LogRtbName" Style="{StaticResource CustomRichTextBox}" />
|
||||
<StackPanel Grid.Column="2" Orientation="Vertical" VerticalAlignment="Bottom" Margin="-5 -5 5 5">
|
||||
<Button Style="{DynamicResource {x:Static adonisUi:Styles.ToolbarButton}}" ToolTip="Open Output Folder" Padding="0,4,0,4"
|
||||
Command="{Binding MenuCommand}" CommandParameter="ToolBox_Open_Output_Directory">
|
||||
<Viewbox Width="16" Height="16" HorizontalAlignment="Center">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource FolderIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Button Style="{DynamicResource {x:Static adonisUi:Styles.ToolbarButton}}" ToolTip="Clear Logs" Padding="0,4,0,4"
|
||||
Command="{Binding MenuCommand}" CommandParameter="ToolBox_Clear_Logs">
|
||||
<Viewbox Width="16" Height="16" HorizontalAlignment="Center">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" Data="{StaticResource TrashIcon}"/>
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
<StatusBar Grid.Row="3" MinHeight="28" MaxHeight="28"
|
||||
adonisExtensions:LayerExtension.Layer="3">
|
||||
<StatusBar.Style>
|
||||
<Style TargetType="{x:Type StatusBar}" BasedOn="{StaticResource {x:Type StatusBar}}">
|
||||
<Style.Triggers>
|
||||
<!--don't mind me, MultiDataTrigger just sucks-->
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Ready}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.AccentBrush}}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Completed}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.AccentBrush}}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Loading}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.AlertBrush}}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Stopping}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.AlertBrush}}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Stopped}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.ErrorBrush}}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Failed}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static adonisUi:Brushes.ErrorBrush}}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding StatusChangeAttempted, Source={x:Static services:ApplicationService.ThreadWorkerView}}" Value="True">
|
||||
<DataTrigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard Duration="0:0:0.8">
|
||||
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(StatusBar.Background).(SolidColorBrush.Color)" FillBehavior="Stop">
|
||||
<ColorAnimationUsingKeyFrames.KeyFrames>
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0" Value="#CE5555" />
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0.2" Value="#C22B2B" />
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0.4" Value="#CE5555" />
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0.6" Value="#C22B2B" />
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0.8" Value="#CE5555" />
|
||||
</ColorAnimationUsingKeyFrames.KeyFrames>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</DataTrigger.EnterActions>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding OperationCancelled, Source={x:Static services:ApplicationService.ThreadWorkerView}}" Value="True">
|
||||
<DataTrigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard Duration="0:0:1">
|
||||
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(StatusBar.Background).(SolidColorBrush.Color)" FillBehavior="Stop">
|
||||
<ColorAnimationUsingKeyFrames.KeyFrames>
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0" Value="#C22B2B" />
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:1" Value="#CE5555" />
|
||||
</ColorAnimationUsingKeyFrames.KeyFrames>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</DataTrigger.EnterActions>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StatusBar.Style>
|
||||
|
||||
<StatusBarItem Margin="5,0,0,0" >
|
||||
<TextBlock>
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Text" Value="{Binding Status.Label}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Loading}">
|
||||
<Setter Property="Text" Value="{Binding Status.Label, StringFormat='{}{0} …'}" />
|
||||
</DataTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding CanBeCanceled, Source={x:Static services:ApplicationService.ThreadWorkerView}}" Value="True" />
|
||||
<Condition Binding="{Binding Status.Kind}" Value="{x:Static local:EStatusKind.Loading}" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{Binding Status.Label, StringFormat='{}{0} … ESC to Cancel'}" />
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</StatusBarItem>
|
||||
|
||||
<StatusBarItem Margin="0 0 5 0" HorizontalAlignment="Right">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StatusBarItem Margin="0 0 10 0" HorizontalContentAlignment="Stretch">
|
||||
<Viewbox Width="16" Height="16">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Fill="{DynamicResource {x:Static adonisUi:Brushes.AccentForegroundBrush}}" Data="{StaticResource StatusBarIcon}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</StatusBarItem>
|
||||
|
||||
<StatusBarItem Width="30" HorizontalContentAlignment="Stretch" ToolTip="Auto Open Sounds Enabled">
|
||||
<StatusBarItem.Style>
|
||||
<Style TargetType="StatusBarItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsAutoOpenSounds, Source={x:Static settings:UserSettings.Default}}" Value="False">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StatusBarItem.Style>
|
||||
<TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Text="SND" />
|
||||
</StatusBarItem>
|
||||
|
||||
<StatusBarItem Margin="10 0 0 0">
|
||||
<TextBlock Text="{Binding LastUpdateCheck, Source={x:Static local:Settings.UserSettings.Default}, Converter={x:Static converters:RelativeDateTimeConverter.Instance}, StringFormat=Last Refresh: {0}}" />
|
||||
</StatusBarItem>
|
||||
</StackPanel>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</adonisControls:AdonisWindow>
|
||||
282
FModel/MainWindow.xaml.cs
Normal file
282
FModel/MainWindow.xaml.cs
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using AdonisUI.Controls;
|
||||
using FModel.Extensions;
|
||||
using FModel.Services;
|
||||
using FModel.Settings;
|
||||
using FModel.ViewModels;
|
||||
using FModel.Views;
|
||||
using FModel.Views.Resources.Controls;
|
||||
using ICSharpCode.AvalonEdit.Editing;
|
||||
|
||||
namespace FModel;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
public static MainWindow YesWeCats;
|
||||
private ThreadWorkerViewModel _threadWorkerView => ApplicationService.ThreadWorkerView;
|
||||
private ApplicationViewModel _applicationView => ApplicationService.ApplicationView;
|
||||
private DiscordHandler _discordHandler => DiscordService.DiscordHandler;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(new RoutedCommand("ReloadMappings", typeof(MainWindow), new InputGestureCollection { new KeyGesture(Key.F12) }), OnMappingsReload));
|
||||
CommandBindings.Add(new CommandBinding(ApplicationCommands.Find, (_, _) => OnOpenAvalonFinder()));
|
||||
|
||||
DataContext = _applicationView;
|
||||
InitializeComponent();
|
||||
|
||||
FLogger.Logger = LogRtbName;
|
||||
YesWeCats = this;
|
||||
}
|
||||
|
||||
private void OnClosing(object sender, CancelEventArgs e)
|
||||
{
|
||||
_discordHandler.Dispose();
|
||||
}
|
||||
|
||||
private async void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var newOrUpdated = UserSettings.Default.ShowChangelog;
|
||||
#if !DEBUG
|
||||
ApplicationService.ApiEndpointView.FModelApi.CheckForUpdates(true);
|
||||
#endif
|
||||
|
||||
switch (UserSettings.Default.AesReload)
|
||||
{
|
||||
case EAesReload.Always:
|
||||
await _applicationView.CUE4Parse.RefreshAes();
|
||||
break;
|
||||
case EAesReload.OncePerDay when UserSettings.Default.CurrentDir.LastAesReload != DateTime.Today:
|
||||
UserSettings.Default.CurrentDir.LastAesReload = DateTime.Today;
|
||||
await _applicationView.CUE4Parse.RefreshAes();
|
||||
break;
|
||||
}
|
||||
|
||||
await ApplicationViewModel.InitOodle();
|
||||
await ApplicationViewModel.InitZlib();
|
||||
await _applicationView.CUE4Parse.Initialize();
|
||||
await _applicationView.AesManager.InitAes();
|
||||
await _applicationView.UpdateProvider(true);
|
||||
#if !DEBUG
|
||||
await _applicationView.CUE4Parse.InitInformation();
|
||||
#endif
|
||||
await Task.WhenAll(
|
||||
_applicationView.CUE4Parse.VerifyConsoleVariables(),
|
||||
_applicationView.CUE4Parse.VerifyOnDemandArchives(),
|
||||
_applicationView.CUE4Parse.InitMappings(),
|
||||
ApplicationViewModel.InitVgmStream(),
|
||||
ApplicationViewModel.InitImGuiSettings(newOrUpdated),
|
||||
Task.Run(() =>
|
||||
{
|
||||
if (UserSettings.Default.DiscordRpc == EDiscordRpc.Always)
|
||||
_discordHandler.Initialize(_applicationView.GameDisplayName);
|
||||
})
|
||||
).ConfigureAwait(false);
|
||||
|
||||
#if DEBUG
|
||||
// await _threadWorkerView.Begin(cancellationToken =>
|
||||
// _applicationView.CUE4Parse.Extract(cancellationToken,
|
||||
// "FortniteGame/Content/Athena/Apollo/Maps/UI/Apollo_Terrain_Minimap.uasset"));
|
||||
// await _threadWorkerView.Begin(cancellationToken =>
|
||||
// _applicationView.CUE4Parse.Extract(cancellationToken,
|
||||
// "FortniteGame/Content/Environments/Helios/Props/GlacierHotel/GlacierHotel_Globe_A/Meshes/SM_GlacierHotel_Globe_A.uasset"));
|
||||
#endif
|
||||
}
|
||||
|
||||
private void OnGridSplitterDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
RootGrid.ColumnDefinitions[0].Width = GridLength.Auto;
|
||||
}
|
||||
|
||||
private void OnWindowKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is TextBox || e.OriginalSource is TextArea && Keyboard.Modifiers.HasFlag(ModifierKeys.Control))
|
||||
return;
|
||||
|
||||
if (_threadWorkerView.CanBeCanceled && e.Key == Key.Escape)
|
||||
{
|
||||
_applicationView.Status.SetStatus(EStatusKind.Stopping);
|
||||
_threadWorkerView.Cancel();
|
||||
}
|
||||
else if (_applicationView.Status.IsReady && e.Key == Key.F && Keyboard.Modifiers.HasFlag(ModifierKeys.Control) && Keyboard.Modifiers.HasFlag(ModifierKeys.Shift))
|
||||
OnSearchViewClick(null, null);
|
||||
else if (e.Key == Key.Left && _applicationView.CUE4Parse.TabControl.SelectedTab.HasImage)
|
||||
_applicationView.CUE4Parse.TabControl.SelectedTab.GoPreviousImage();
|
||||
else if (e.Key == Key.Right && _applicationView.CUE4Parse.TabControl.SelectedTab.HasImage)
|
||||
_applicationView.CUE4Parse.TabControl.SelectedTab.GoNextImage();
|
||||
else if (UserSettings.Default.AssetAddTab.IsTriggered(e.Key))
|
||||
_applicationView.CUE4Parse.TabControl.AddTab();
|
||||
else if (UserSettings.Default.AssetRemoveTab.IsTriggered(e.Key))
|
||||
_applicationView.CUE4Parse.TabControl.RemoveTab();
|
||||
else if (UserSettings.Default.AssetLeftTab.IsTriggered(e.Key))
|
||||
_applicationView.CUE4Parse.TabControl.GoLeftTab();
|
||||
else if (UserSettings.Default.AssetRightTab.IsTriggered(e.Key))
|
||||
_applicationView.CUE4Parse.TabControl.GoRightTab();
|
||||
else if (UserSettings.Default.DirLeftTab.IsTriggered(e.Key) && LeftTabControl.SelectedIndex > 0)
|
||||
LeftTabControl.SelectedIndex--;
|
||||
else if (UserSettings.Default.DirRightTab.IsTriggered(e.Key) && LeftTabControl.SelectedIndex < LeftTabControl.Items.Count - 1)
|
||||
LeftTabControl.SelectedIndex++;
|
||||
}
|
||||
|
||||
private void OnSearchViewClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Helper.OpenWindow<AdonisWindow>("Search View", () => new SearchView().Show());
|
||||
}
|
||||
|
||||
private void OnTabItemChange(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is not TabControl tabControl)
|
||||
return;
|
||||
|
||||
(tabControl.SelectedItem as System.Windows.Controls.TabItem)?.Focus();
|
||||
}
|
||||
|
||||
private async void OnMappingsReload(object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
await _applicationView.CUE4Parse.InitMappings(true);
|
||||
}
|
||||
|
||||
private void OnOpenAvalonFinder()
|
||||
{
|
||||
_applicationView.CUE4Parse.TabControl.SelectedTab.HasSearchOpen = true;
|
||||
AvalonEditor.YesWeSearch.Focus();
|
||||
AvalonEditor.YesWeSearch.SelectAll();
|
||||
}
|
||||
|
||||
private void OnAssetsTreeMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is not TreeView { SelectedItem: TreeItem treeItem } || treeItem.Folders.Count > 0) return;
|
||||
|
||||
LeftTabControl.SelectedIndex++;
|
||||
}
|
||||
|
||||
private async void OnAssetsListMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is not ListBox listBox) return;
|
||||
|
||||
var selectedItems = listBox.SelectedItems.Cast<AssetItem>().ToList();
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.ExtractSelected(cancellationToken, selectedItems); });
|
||||
}
|
||||
|
||||
private async void OnFolderExtractClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is TreeItem folder)
|
||||
{
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.ExtractFolder(cancellationToken, folder); });
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnFolderExportClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is TreeItem folder)
|
||||
{
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.ExportFolder(cancellationToken, folder); });
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
{
|
||||
FLogger.Text("Successfully exported ", Constants.WHITE);
|
||||
FLogger.Link(folder.PathAtThisPoint, UserSettings.Default.RawDataDirectory, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnFolderSaveClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is TreeItem folder)
|
||||
{
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.SaveFolder(cancellationToken, folder); });
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
{
|
||||
FLogger.Text("Successfully saved ", Constants.WHITE);
|
||||
FLogger.Link(folder.PathAtThisPoint, UserSettings.Default.PropertiesDirectory, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnFolderTextureClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is TreeItem folder)
|
||||
{
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.TextureFolder(cancellationToken, folder); });
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
{
|
||||
FLogger.Text("Successfully saved ", Constants.WHITE);
|
||||
FLogger.Link(folder.PathAtThisPoint, UserSettings.Default.TextureDirectory, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnFolderModelClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is TreeItem folder)
|
||||
{
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.ModelFolder(cancellationToken, folder); });
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnFolderAnimationClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is TreeItem folder)
|
||||
{
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.AnimationFolder(cancellationToken, folder); });
|
||||
}
|
||||
}
|
||||
|
||||
private void OnFavoriteDirectoryClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is not TreeItem folder) return;
|
||||
|
||||
_applicationView.CustomDirectories.Add(new CustomDirectory(folder.Header, folder.PathAtThisPoint));
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
FLogger.Text($"Successfully saved '{folder.PathAtThisPoint}' as a new favorite directory", Constants.WHITE, true));
|
||||
}
|
||||
|
||||
private void OnCopyDirectoryPathClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (AssetsFolderName.SelectedItem is not TreeItem folder) return;
|
||||
Clipboard.SetText(folder.PathAtThisPoint);
|
||||
}
|
||||
|
||||
private void OnDeleteSearchClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AssetsSearchName.Text = string.Empty;
|
||||
AssetsListName.ScrollIntoView(AssetsListName.SelectedItem);
|
||||
}
|
||||
|
||||
private void OnFilterTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (sender is not TextBox textBox || AssetsFolderName.SelectedItem is not TreeItem folder)
|
||||
return;
|
||||
|
||||
var filters = textBox.Text.Trim().Split(' ');
|
||||
folder.AssetsList.AssetsView.Filter = o => { return o is AssetItem assetItem && filters.All(x => assetItem.FullPath.SubstringAfterLast('/').Contains(x, StringComparison.OrdinalIgnoreCase)); };
|
||||
}
|
||||
|
||||
private void OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (!_applicationView.Status.IsReady || sender is not ListBox listBox) return;
|
||||
UserSettings.Default.LoadingMode = ELoadingMode.Multiple;
|
||||
_applicationView.LoadingModes.LoadCommand.Execute(listBox.SelectedItems);
|
||||
}
|
||||
|
||||
private async void OnPreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (!_applicationView.Status.IsReady || sender is not ListBox listBox) return;
|
||||
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Enter:
|
||||
var selectedItems = listBox.SelectedItems.Cast<AssetItem>().ToList();
|
||||
await _threadWorkerView.Begin(cancellationToken => { _applicationView.CUE4Parse.ExtractSelected(cancellationToken, selectedItems); });
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
static class DynamicKeysManager
|
||||
{
|
||||
public static List<AESEntry> AESEntries { get; set; }
|
||||
private static XmlSerializer serializer = new XmlSerializer(typeof(List<AESEntry>));
|
||||
public static string path = Properties.Settings.Default.ExtractOutput + "\\AESManager.xml";
|
||||
|
||||
public static void serialize(string key, string pak)
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
AESEntries.Add(new AESEntry()
|
||||
{
|
||||
theKey = key,
|
||||
thePak = pak
|
||||
});
|
||||
|
||||
using (var fileStream = new FileStream(path, FileMode.Create))
|
||||
{
|
||||
serializer.Serialize(fileStream, AESEntries);
|
||||
}
|
||||
}
|
||||
|
||||
public static void deserialize()
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
List<AESEntry> outputList;
|
||||
using (var fileStream = new FileStream(path, FileMode.Open))
|
||||
{
|
||||
outputList = (List<AESEntry>)serializer.Deserialize(fileStream);
|
||||
}
|
||||
AESEntries = outputList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user