Compare commits
801 Commits
ef8f6b8d47
...
sdl_platfo
| Author | SHA1 | Date | |
|---|---|---|---|
| c6bc90a82a | |||
| 43b576d961 | |||
| 1d8f221f1b | |||
| d70a003617 | |||
| b443b74d18 | |||
|
|
42b542d190 | ||
|
|
576b0710e0 | ||
|
|
44e70692a2 | ||
|
|
857b0c5ac3 | ||
|
|
1f6d837117 | ||
|
|
67220d3f80 | ||
|
|
c5d06b2c8b | ||
|
|
3b19e1b40c | ||
|
|
831fb0f442 | ||
|
|
cd22cd059d | ||
|
|
3e363c8275 | ||
|
|
c44d939c08 | ||
|
|
c0c9df49dc | ||
|
|
80de56f469 | ||
|
|
f1ecbf828e | ||
|
|
f1c4fd464a | ||
|
|
212b0de29b | ||
|
|
5a2555f845 | ||
|
|
c57e128ff1 | ||
|
|
eff5f84185 | ||
|
|
ad1163bccc | ||
|
|
1042ad4e7d | ||
|
|
8fdda1a71a | ||
|
|
3f7fe635d8 | ||
|
|
fcebc57ed0 | ||
|
|
c40e447bb7 | ||
|
|
e6f94bb154 | ||
|
|
adbc546978 | ||
|
|
2d171967e9 | ||
|
|
33a0e6ac7d | ||
|
|
848cc38bf1 | ||
|
|
91cd1e8065 | ||
|
|
9fafb47abb | ||
|
|
5222f1d35c | ||
|
|
785649f9d5 | ||
|
|
d47ac95681 | ||
|
|
703e0cb7ca | ||
|
|
ef7c7f2d30 | ||
|
|
f3d375e356 | ||
|
|
a3073321cf | ||
|
|
824b49dd88 | ||
|
|
d0e7bff03a | ||
|
|
d314d5b324 | ||
|
|
a027ed3b63 | ||
|
|
bcedb05a2c | ||
|
|
b36be95947 | ||
|
|
826009c1b4 | ||
|
|
4ca399af71 | ||
|
|
c1f022520d | ||
|
|
2efd20f223 | ||
|
|
00dd432fbc | ||
|
|
f707508d70 | ||
|
|
b965ca6c8c | ||
|
|
26f4bcbc25 | ||
|
|
6fea9eefaa | ||
|
|
47caa6af28 | ||
|
|
9aedb37ac2 | ||
|
|
e4bc2c69c7 | ||
|
|
6db9265112 | ||
|
|
21a84c5b84 | ||
|
|
633b5857c9 | ||
|
|
9f9dac1543 | ||
|
|
df6f8fd8ae | ||
|
|
4bd8ce37ac | ||
|
|
40e204839f | ||
|
|
d6c75b3f86 | ||
|
|
687c283533 | ||
|
|
70ee8501a5 | ||
|
|
2c34bd2308 | ||
| fc341a86e7 | |||
|
|
5023e3277b | ||
|
|
9003d855b3 | ||
|
|
75906719d4 | ||
|
|
9a59925a36 | ||
|
|
d5ca80c2c1 | ||
|
|
cb07ee77aa | ||
|
|
680783f2b0 | ||
|
|
4a28b4bd6c | ||
|
|
4bf36f3467 | ||
|
|
2c1713d300 | ||
|
|
8136691914 | ||
|
|
da23e287c0 | ||
|
|
e0825d870d | ||
|
|
86dbe6b93d | ||
|
|
e71b74c625 | ||
|
|
45f6ef29e9 | ||
|
|
0fabca19cd | ||
|
|
0bc242c738 | ||
|
|
8c548ceff2 | ||
|
|
46fda05000 | ||
|
|
1fee95be1c | ||
|
|
8c66ae99a3 | ||
|
|
1cf98e2188 | ||
|
|
6a8553a277 | ||
|
|
a02b7d4a1a | ||
|
|
606dfa4e2e | ||
|
|
b6f853a01c | ||
|
|
fc2112ec93 | ||
|
|
6ccfbfeff1 | ||
|
|
f21accd466 | ||
|
|
38b4ace1a8 | ||
|
|
774b6bd72c | ||
|
|
9c4606fefc | ||
|
|
0e50e47cce | ||
|
|
285fa870d0 | ||
|
|
69ed0bf56f | ||
|
|
237b9bccd5 | ||
|
|
f5fd7319e1 | ||
|
|
e04c0c4ace | ||
|
|
f6d0b073da | ||
|
|
68a7cf4f18 | ||
|
|
a91360529f | ||
|
|
bf9ca14deb | ||
|
|
cb92a2b8cb | ||
|
|
8a73d79936 | ||
|
|
2f7d7a0f2a | ||
|
|
d43c0c593f | ||
|
|
1087bd2445 | ||
|
|
5e19a9729b | ||
|
|
69e12d77be | ||
|
|
cdb09847ec | ||
|
|
169d3e964d | ||
|
|
cf503cf921 | ||
|
|
6fd4ef735e | ||
|
|
303087c4c4 | ||
| 68da28ffe8 | |||
|
|
427e76e76e | ||
| b183b5bcfc | |||
|
|
278dead0bd | ||
|
|
cdff7708fb | ||
|
|
b4d501cd6a | ||
|
|
9cf9fae453 | ||
|
|
7fcf6f9c97 | ||
|
|
1bedfd3adf | ||
|
|
80d19a002f | ||
|
|
99707b6586 | ||
|
|
9f14bb7279 | ||
|
|
a18314c669 | ||
|
|
c946fa239e | ||
|
|
d109e5ca9f | ||
|
|
bc0e1f81e7 | ||
|
|
c1c806490f | ||
|
|
4fd6343fb9 | ||
|
|
a2e9d8d77b | ||
|
|
ff3d785483 | ||
|
|
82231981dc | ||
|
|
1915e1e7f4 | ||
|
|
b5a431d2f5 | ||
|
|
3907bc4957 | ||
|
|
854f3acd4c | ||
|
|
519a9c0a14 | ||
|
|
0ea555b041 | ||
|
|
90d1e63b58 | ||
|
|
0369d9b2cb | ||
|
|
9fabc1028a | ||
|
|
2a9260ddd5 | ||
|
|
3d84380175 | ||
|
|
545df6ce35 | ||
|
|
d4355e31d8 | ||
|
|
3ffb067e55 | ||
|
|
959371a995 | ||
|
|
cf9c203855 | ||
|
|
a5838f739d | ||
|
|
b1710c4d01 | ||
|
|
baf0cfce8e | ||
|
|
a1a6d4738f | ||
|
|
761ea094d6 | ||
|
|
8e043e533e | ||
|
|
1a88fefd76 | ||
|
|
abe496fe12 | ||
|
|
c9e0637b0f | ||
|
|
db660721ce | ||
|
|
2730d63257 | ||
|
|
31764d6d4e | ||
|
|
34ba45cd5a | ||
|
|
5de5d8f683 | ||
|
|
744c94b3cc | ||
|
|
b26d6ea108 | ||
|
|
5c5341e346 | ||
|
|
0f81c64964 | ||
|
|
7603109dce | ||
|
|
01617ae684 | ||
|
|
4aa2676084 | ||
|
|
a8b9211c32 | ||
|
|
9c5060584d | ||
|
|
846a0b5685 | ||
|
|
08154d8fe5 | ||
|
|
a53a438c3c | ||
|
|
bb8f569c41 | ||
|
|
6307ad7979 | ||
|
|
b6229350a3 | ||
|
|
5dc4ebade1 | ||
|
|
3cd5890db1 | ||
|
|
522d8d89e6 | ||
|
|
492a5f979d | ||
|
|
5e4d564338 | ||
|
|
8fcbef863e | ||
|
|
c68b75a298 | ||
|
|
8f63a99a2c | ||
|
|
6d05bf16b1 | ||
|
|
b8218e9ab4 | ||
|
|
99323c1d2f | ||
|
|
17c0892ff1 | ||
|
|
ad6764e6d7 | ||
|
|
0bfd38e065 | ||
|
|
a00ffe6ec3 | ||
|
|
a7ffd9e57f | ||
|
|
354eaac56c | ||
|
|
8c51ea511a | ||
|
|
2af266727f | ||
|
|
f37b75df7b | ||
|
|
6132e45e25 | ||
|
|
753035c452 | ||
|
|
acc1777638 | ||
|
|
69585618ed | ||
|
|
af0ea65d78 | ||
|
|
751d179cdb | ||
|
|
2dc44ac1a6 | ||
|
|
2550b9f88e | ||
|
|
c3cf8fba98 | ||
|
|
6f172f8f2c | ||
|
|
735d611de1 | ||
|
|
d6a33d5a1c | ||
|
|
6cbd40e6d8 | ||
|
|
8ac2385447 | ||
|
|
b8e00f2ed1 | ||
|
|
b6e18ccae5 | ||
|
|
1fb6586dff | ||
|
|
e6265105b5 | ||
|
|
892e2e0d1e | ||
|
|
90551b32bc | ||
|
|
cd08eeaf95 | ||
|
|
f8dadac453 | ||
|
|
f87e2c2229 | ||
|
|
18035a8604 | ||
|
|
fc46219a82 | ||
|
|
2546e19d65 | ||
|
|
6763436eff | ||
|
|
2754d61c05 | ||
|
|
7fd278a689 | ||
|
|
2d2c5411cd | ||
|
|
3e0c085bf3 | ||
|
|
c882b547c8 | ||
|
|
9646dd3fc2 | ||
|
|
c0cce748cc | ||
|
|
ab8612a914 | ||
|
|
20f1e67700 | ||
|
|
eda7f7e90f | ||
|
|
a22b33d3bb | ||
|
|
8ed2d6da56 | ||
|
|
bb37f980ed | ||
|
|
349547f66c | ||
|
|
a1e4ed05c4 | ||
|
|
10e9aee8ce | ||
|
|
4af26a5516 | ||
|
|
3e82e550f3 | ||
|
|
33b540ed9e | ||
|
|
50871d8885 | ||
|
|
c27a9808c4 | ||
|
|
bdaf31b54f | ||
|
|
3abbf08f1f | ||
|
|
a8eb4fc140 | ||
|
|
83374164db | ||
|
|
c5bfc6bc3d | ||
|
|
d698bf96cc | ||
|
|
b3f88e156c | ||
|
|
7418d60f24 | ||
|
|
3981d5090c | ||
|
|
48c6339ebb | ||
|
|
2dd34b288c | ||
|
|
0bc595f16f | ||
|
|
7abed93972 | ||
| 51feaa0730 | |||
| 8e69aa8bd6 | |||
| 90b2fded48 | |||
| 9125ffeb9e | |||
| 28980e5fbf | |||
| aab0d772a4 | |||
|
|
4b10d7057a | ||
|
|
85aed8c4d7 | ||
|
|
da08be42b4 | ||
| a93a940630 | |||
| 3e353db1fa | |||
|
|
056fea9a8c | ||
|
|
bf345f13ce | ||
|
|
a138c6b062 | ||
|
|
33e58c12cb | ||
|
|
094a6562b8 | ||
|
|
7f783bb7da | ||
|
|
b08f218f30 | ||
|
|
c6640be04a | ||
|
|
eff3c50d9c | ||
|
|
3fa099ad06 | ||
|
|
5e47a861f3 | ||
|
|
37b4b25ead | ||
|
|
edfd145226 | ||
|
|
763ede4bd9 | ||
|
|
284da341e1 | ||
|
|
53ed2431b5 | ||
|
|
b4ab39b3bf | ||
|
|
de61e3efb5 | ||
|
|
29fb36fcd6 | ||
|
|
78f0ff75f2 | ||
|
|
6efd456eaf | ||
|
|
e0c96c0cde | ||
|
|
ada269568a | ||
|
|
dd256ad518 | ||
|
|
12c8bb4f31 | ||
|
|
4e4d380267 | ||
|
|
448eb48c23 | ||
|
|
78d519cb9a | ||
|
|
43d11264f8 | ||
|
|
f126a83b79 | ||
|
|
bdd7bae459 | ||
|
|
75647d149a | ||
|
|
d7ab497b0e | ||
|
|
683a48a6e3 | ||
|
|
a41fc51f92 | ||
|
|
3dc7546dd4 | ||
|
|
185151b025 | ||
|
|
8cdec15fa6 | ||
|
|
1b40775d62 | ||
|
|
45e82d21f4 | ||
|
|
5c37584eca | ||
|
|
674fda7375 | ||
| 6296e1a9eb | |||
| 1586bb0702 | |||
|
|
bf10d0949e | ||
|
|
d1c43ec1fe | ||
| edeaf6af09 | |||
|
|
dbd8297612 | ||
|
|
8d62a13cbc | ||
| 951edd95db | |||
| 9951211596 | |||
| 6d337464f7 | |||
|
|
5a05038a9b | ||
|
|
109d4423bb | ||
| d0b552d74a | |||
|
|
6c1e380a3e | ||
| 83512822b1 | |||
| ccb78103ec | |||
| 6e79ffea34 | |||
| 4f03d37a17 | |||
|
|
c57a1a7205 | ||
|
|
867ae2ceaa | ||
|
|
ef5d45874a | ||
|
|
169db79b2a | ||
|
|
9e4c1da032 | ||
|
|
c8622d1801 | ||
|
|
d7df403e5e | ||
|
|
d3a50cdacb | ||
|
|
fdd22c3380 | ||
|
|
53761df85e | ||
|
|
ecaae2b458 | ||
|
|
3cb74d48ca | ||
|
|
8633ed2124 | ||
|
|
2e10d776e9 | ||
|
|
4ac870f701 | ||
|
|
6144f6c74e | ||
|
|
edb6884942 | ||
|
|
62e329ac6e | ||
|
|
68dce7e4dd | ||
|
|
6479a3d3c6 | ||
|
|
e41c48f9e5 | ||
|
|
9cfcbfa9d2 | ||
|
|
bcd2b1f0f2 | ||
| 6fb8419b3c | |||
| a4272d6ca9 | |||
|
|
eb6010cba7 | ||
|
|
bd2add7edd | ||
|
|
986693757c | ||
|
|
5a23060e05 | ||
|
|
b92c18cf25 | ||
|
|
6a82eb114d | ||
|
|
97b37b3ce4 | ||
|
|
bbe54969b0 | ||
| 4654117d5e | |||
|
|
8164ce924f | ||
|
|
22911bbc45 | ||
|
|
cae2720585 | ||
|
|
90b6293bc2 | ||
|
|
d110237423 | ||
|
|
117f890612 | ||
|
|
a6a2fd2c66 | ||
|
|
a05ca12770 | ||
|
|
abe7785e94 | ||
|
|
2cedac8d96 | ||
|
|
ea854a0f7b | ||
|
|
d0817809ff | ||
|
|
95f2216f97 | ||
|
|
7e5edf1b33 | ||
|
|
c649a4f4b2 | ||
|
|
cd7233d559 | ||
| 6ff260d052 | |||
| 88d2b72822 | |||
|
|
3c74b315a8 | ||
|
|
f841575378 | ||
|
|
d90377ed62 | ||
|
|
c8d622bda9 | ||
|
|
fbf2d8f567 | ||
|
|
42687a792c | ||
|
|
5c43d35146 | ||
|
|
c1e1dee975 | ||
|
|
742d74a2d0 | ||
|
|
614ffa70a0 | ||
|
|
4b4331fd70 | ||
|
|
e221f7204b | ||
|
|
18fa8e1c47 | ||
|
|
2f02ec52ed | ||
|
|
9464f97e16 | ||
|
|
54467a4a5e | ||
|
|
3a9e175043 | ||
|
|
9dff048cb5 | ||
|
|
f376fd50a9 | ||
|
|
e27cf04f91 | ||
|
|
648504ceb1 | ||
|
|
e2f741cab9 | ||
|
|
766091045b | ||
|
|
47e1547d29 | ||
|
|
e2d9452994 | ||
|
|
eadb4411ff | ||
|
|
bdc87c7bc6 | ||
|
|
7606c9ac12 | ||
|
|
4240646ec7 | ||
|
|
28eaac37dc | ||
|
|
214ec9f2b1 | ||
|
|
0fa53f860a | ||
|
|
27ac755bbe | ||
|
|
8ec138399a | ||
|
|
5b6859a66f | ||
|
|
bed1f6e9cc | ||
|
|
00055ef663 | ||
|
|
aa59a6faf7 | ||
|
|
e9835766bc | ||
|
|
d6eb647d59 | ||
|
|
b50f3fcb64 | ||
|
|
d6b4992991 | ||
|
|
fc561b5ec5 | ||
|
|
dacc0068e0 | ||
|
|
e7d2025010 | ||
|
|
b418ab5275 | ||
|
|
c1e782bb32 | ||
|
|
cfd2f42b0c | ||
|
|
e1a2a36978 | ||
|
|
793bc33b2f | ||
|
|
2109a2d261 | ||
|
|
89c7f4b0a3 | ||
|
|
d7ff9fdade | ||
|
|
9e50a39ebf | ||
|
|
7fc564a0ac | ||
|
|
8dfb564fb3 | ||
|
|
f8daff273a | ||
|
|
112e728465 | ||
|
|
057ec9d41e | ||
|
|
7fa4efcac5 | ||
|
|
6547e7ee9c | ||
|
|
907c593671 | ||
| 29868531ad | |||
| 95dfb6fdc6 | |||
|
|
9c9d560ce5 | ||
|
|
f1945552ab | ||
|
|
65ab42158d | ||
|
|
99841e2e8d | ||
|
|
73c30d3d89 | ||
|
|
ecd5559aad | ||
|
|
1fa83639c2 | ||
|
|
568719b615 | ||
|
|
74000fa766 | ||
|
|
1d63067614 | ||
|
|
85fd1389db | ||
|
|
cce042045e | ||
|
|
53e3cee196 | ||
|
|
6ee3b23261 | ||
|
|
1a77ba4552 | ||
|
|
bffb175a9b | ||
|
|
125a973ff2 | ||
|
|
462f75abd0 | ||
|
|
d95cd2f0be | ||
|
|
091f76bbf2 | ||
|
|
e8b60060ab | ||
|
|
cd637e8a7a | ||
|
|
9d8e75caa3 | ||
|
|
eee4e55cf0 | ||
|
|
0670c0bbd3 | ||
|
|
f462a2187f | ||
|
|
c2cbaeed30 | ||
|
|
e982a23ed3 | ||
|
|
f6feae5cf2 | ||
|
|
ba75fd5882 | ||
|
|
1eaf40f2f7 | ||
|
|
fe98a23cb4 | ||
|
|
77bf03128e | ||
|
|
8f49a492d8 | ||
| 8df3999f85 | |||
|
|
dd4bb2f7f1 | ||
|
|
6b78b498f7 | ||
|
|
496856d12e | ||
|
|
e97d683545 | ||
|
|
71991ff8c7 | ||
|
|
ae44d47043 | ||
|
|
8b88def9d0 | ||
|
|
fa97229830 | ||
|
|
1946caac6e | ||
|
|
6f5308126b | ||
|
|
6a0c734cec | ||
|
|
13b8863f0c | ||
|
|
f2aaad0048 | ||
|
|
55b441e9fa | ||
|
|
6fece4ca38 | ||
|
|
2fd9b4a62a | ||
|
|
077f7a3cd1 | ||
|
|
7da69f18d4 | ||
| 6c63c2f650 | |||
| 149b189629 | |||
|
|
fd8a8b5a4d | ||
| b1fd86e6b5 | |||
| 5e8fdf879d | |||
|
|
fa89e710d8 | ||
|
|
b51ba58063 | ||
|
|
057489e5b9 | ||
|
|
5bae695ae9 | ||
|
|
5b3ed1fbc3 | ||
|
|
f5092e5262 | ||
|
|
3bd6160c3b | ||
|
|
1d0a0a409d | ||
|
|
eb90ab84f2 | ||
|
|
6f37525674 | ||
|
|
eeb8a7ea41 | ||
|
|
df0b571c50 | ||
|
|
ec22427acd | ||
|
|
6c499e877f | ||
|
|
4d9407e4e9 | ||
|
|
28c70f5078 | ||
|
|
14806a1ac7 | ||
|
|
1ebb3e67d6 | ||
|
|
991cdbb9a0 | ||
|
|
278b177c46 | ||
|
|
0630b6257a | ||
|
|
f86d9c47b7 | ||
|
|
ae2088bb9d | ||
|
|
9340c42f2b | ||
|
|
8d7dfd5946 | ||
|
|
894cb273aa | ||
|
|
2996e0c53c | ||
|
|
79ce82d8a0 | ||
|
|
3c8e59c114 | ||
|
|
1493571810 | ||
|
|
a613d89f47 | ||
|
|
5471c59d5f | ||
|
|
ac42223f9e | ||
|
|
c21c9c13ad | ||
|
|
8251509607 | ||
|
|
3083e3f611 | ||
|
|
66add1f3bd | ||
|
|
b8a680df57 | ||
|
|
e969b7fffb | ||
|
|
5d9657781a | ||
|
|
2cd03787cd | ||
|
|
619c5ac3b0 | ||
|
|
89baa91552 | ||
|
|
83b3b1af76 | ||
|
|
19148f21ac | ||
|
|
2da8e392db | ||
|
|
a812b8b108 | ||
|
|
3dc96352e6 | ||
|
|
c2b590d2cf | ||
|
|
842d6969fe | ||
|
|
0f3044ae72 | ||
|
|
11dec8e868 | ||
|
|
d6b1f06721 | ||
|
|
14fcc593c7 | ||
|
|
08ed5ae483 | ||
|
|
b065e6c989 | ||
|
|
372a23cf3a | ||
|
|
4721e8109f | ||
|
|
b58aaccc53 | ||
|
|
294dd3d363 | ||
|
|
e00f552baf | ||
|
|
8eff098850 | ||
|
|
4fe9fdded6 | ||
|
|
03d52d4eb9 | ||
|
|
ab61ed5a37 | ||
|
|
72ee80242d | ||
|
|
9dc4dbc6d7 | ||
|
|
a74c5e7943 | ||
|
|
8f9fa6995e | ||
|
|
98e59450f1 | ||
|
|
8c62f1120f | ||
|
|
9aaba955d0 | ||
|
|
410ec0465c | ||
|
|
ae9ded504d | ||
|
|
f9cb4ddae2 | ||
|
|
9753e579c1 | ||
|
|
954cf3eb5b | ||
|
|
2e996c8e91 | ||
|
|
545a43de32 | ||
|
|
e606c35093 | ||
|
|
21ae2d5d40 | ||
|
|
4649298605 | ||
|
|
ae9622d271 | ||
|
|
4366976015 | ||
|
|
5b2a966ac6 | ||
|
|
bb855e2663 | ||
|
|
d24f9d1e1e | ||
|
|
c1b1f4afc4 | ||
|
|
c639a3103c | ||
|
|
32bc73610f | ||
|
|
66dcfafa2e | ||
|
|
9215f2662f | ||
|
|
2dc404cbd3 | ||
|
|
59308df250 | ||
|
|
9ba1c4c338 | ||
|
|
ec2957bf38 | ||
|
|
8bb5655b2f | ||
|
|
c24ecaaab1 | ||
|
|
483a33996f | ||
|
|
245d7de818 | ||
|
|
49e0cc937e | ||
|
|
6be8158209 | ||
|
|
8e7fcd3cad | ||
|
|
a792a8a533 | ||
|
|
25d8c4645e | ||
|
|
64c552d69d | ||
|
|
fafa400db0 | ||
|
|
0b20a5342e | ||
|
|
fa4e56a32a | ||
|
|
212bd7a011 | ||
|
|
943864004f | ||
|
|
8ce4d94a96 | ||
|
|
6be193bfbf | ||
|
|
5d3947f117 | ||
|
|
c7bb7be20f | ||
|
|
f74b96bcb6 | ||
|
|
cecfea1ecf | ||
|
|
09ce2b5a6d | ||
|
|
2f9cdadb11 | ||
|
|
e218ce2d85 | ||
|
|
5ec6993342 | ||
|
|
87787cb5bf | ||
|
|
5b618b4f31 | ||
|
|
08a86066d0 | ||
|
|
388eb654a5 | ||
|
|
d8059c3db3 | ||
| 559d17e6c3 | |||
|
|
dfe177447c | ||
|
|
2a5aed6c15 | ||
|
|
f5ad8566eb | ||
| 7c5628d47e | |||
| 9645008460 | |||
| 12dbf09164 | |||
| f09fd7ad34 | |||
| 8986290b12 | |||
| 9a4d3a56a3 | |||
|
|
b0048d6540 | ||
|
|
b1b36ea1a3 | ||
|
|
e568e6e17b | ||
|
|
af955ba418 | ||
|
|
a56e2e7b1e | ||
|
|
a0cdb08893 | ||
|
|
fbb829a915 | ||
|
|
5790da6167 | ||
|
|
c6e4fbd966 | ||
|
|
101ea44051 | ||
|
|
d6c6936f6d | ||
|
|
4929e8172c | ||
|
|
8c83156133 | ||
|
|
d587921a83 | ||
|
|
6fe6ba20fb | ||
|
|
2ea3cde203 | ||
|
|
059fe98c67 | ||
|
|
1ab05b620a | ||
|
|
4b387d040d | ||
|
|
9d527ab4a6 | ||
|
|
bbc221086a | ||
|
|
e5b7e58a07 | ||
|
|
1704cfba4d | ||
|
|
cfef93134e | ||
| 84ada18299 | |||
| 635fe8017e | |||
| 834380ff05 | |||
| dd65fc2289 | |||
| 86125bb625 | |||
| 09a9d8b380 | |||
| 86b223ec93 | |||
| 78f6080321 | |||
| c7be6f6e0e | |||
| c40c31fbb7 | |||
| f5fbc1e32d | |||
| 0a20378acd | |||
| d4e87877b6 | |||
| 7eb7236b8a | |||
| dc0e4ffce2 | |||
| 86fe93943d | |||
| 3258113ef8 | |||
| ebf3999cfe | |||
| a1ccbbb5b9 | |||
| 35072c40d8 | |||
| 5c51021388 | |||
| 95fd527515 | |||
| 113d851cea | |||
| 72f0c460f9 | |||
| 13ddd15b44 | |||
| c9e24aaf5f | |||
| 68c0ac0ffc | |||
| bebda275a9 | |||
| 287eaae850 | |||
| 7e59c3b9a7 | |||
| 38658a5b8c | |||
| 88c75b8672 | |||
| 17ab1e6830 | |||
| 1f45110e5f | |||
| 5401166a07 | |||
| bfa8188782 | |||
| e777a71784 | |||
| c13e91a0d0 | |||
| aac5d57352 | |||
| ceca13c7b6 | |||
| 2905470330 | |||
| 2c17033822 | |||
| 0a4cb9e9b1 | |||
| 096651f4c1 | |||
| 275a08506b | |||
| 4cd61cb381 | |||
| 9ad1147581 | |||
| 35e09def1b | |||
| 0469607a71 | |||
| d115d22ee6 | |||
| 8120ae621d | |||
| f873c2fa9f | |||
| c3ffbe2f42 | |||
| 55a0a39881 | |||
| 592215dd30 | |||
| ef0c2a2785 | |||
| 37979e452a | |||
| e9671bb727 | |||
| aa328bd591 | |||
| 188e4313f9 | |||
| df02c70e31 | |||
| 257f54b323 | |||
| fb4b5b2575 | |||
| 4e1251276d | |||
| a7b200dc57 | |||
| 8cadbae80e | |||
| c3bae49aae | |||
|
|
6fa4fc6149 | ||
| f1ffe1acaa | |||
| 5c9ddf7f00 | |||
| 431767a150 | |||
| 8ba4e442a6 | |||
| 2f8d19c267 | |||
| f2fd98f742 | |||
| 3ce35d6e81 | |||
| 796dbaa836 | |||
| 84b209ec7f | |||
| fa976b34dc | |||
| e7cda362b7 | |||
| a41a09c162 | |||
| e82f84f0ab | |||
| f1d387ceea | |||
| 3893d4d1f8 | |||
| cf7ac50faf | |||
| 3f6bf15554 | |||
| dac74829b4 | |||
| 94d6f213a0 | |||
| 8f2550ef61 | |||
| b622a1cc5e | |||
| c83a3c32c7 | |||
| e7dcf7f7e7 | |||
| 398785a2be | |||
| 05dba0f1f5 | |||
| 39dbd32b2e | |||
| 23a34a455a | |||
| 4308328b48 | |||
|
|
4e44831bbe | ||
|
|
0c1e0e48d4 | ||
|
|
6884df02fd | ||
|
|
63655d18c5 | ||
|
|
4170699348 | ||
|
|
d58a9beb3d | ||
|
|
5049f3b2d8 | ||
|
|
6e44eebb9e | ||
|
|
aecbab5613 | ||
|
|
6bf90f29c5 | ||
|
|
19edce1770 | ||
|
|
e17b96b2d6 | ||
|
|
9b6feb9367 | ||
|
|
391c67b1a9 | ||
|
|
975cc79085 | ||
|
|
468babae87 | ||
|
|
516d4263c9 | ||
|
|
ba35123420 | ||
|
|
409703d675 | ||
|
|
570c3f7462 | ||
|
|
42d02a9e63 | ||
|
|
819c93f6fb | ||
|
|
0c645cbc78 |
BIN
Content/Editor/Camera/M_Camera.flax
(Stored with Git LFS)
BIN
Content/Editor/Camera/M_Camera.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/CubeTexturePreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/CubeTexturePreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/DDGIDebugProbes.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/DDGIDebugProbes.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Decal.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Decal.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Particle.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Particle.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Surface.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Surface.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Terrain.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Terrain.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DefaultFontMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/DefaultFontMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/FoliageBrushMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/FoliageBrushMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/MaterialWire.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/MaterialWire.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/SelectionOutlineMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/SelectionOutlineMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Highlight Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Highlight Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/IconsMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/IconsMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/IconsAtlas.flax
(Stored with Git LFS)
BIN
Content/Editor/IconsAtlas.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/IesProfilePreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/IesProfilePreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
@@ -13,7 +13,7 @@
|
||||
META_CB_BEGIN(0, Data)
|
||||
float4x4 WorldMatrix;
|
||||
float4x4 InvWorld;
|
||||
float4x4 SVPositionToWorld;
|
||||
float4x4 SvPositionToWorld;
|
||||
@1META_CB_END
|
||||
|
||||
// Use depth buffer for per-pixel decal layering
|
||||
@@ -27,12 +27,63 @@ struct MaterialInput
|
||||
float3 WorldPosition;
|
||||
float TwoSidedSign;
|
||||
float2 TexCoord;
|
||||
float4 TexCoord_DDX_DDY;
|
||||
float3x3 TBN;
|
||||
float4 SvPosition;
|
||||
float3 PreSkinnedPosition;
|
||||
float3 PreSkinnedNormal;
|
||||
};
|
||||
|
||||
// Calculates decal texcoords for a given pixel position (sampels depth buffer and projects value to decal space).
|
||||
float2 SvPositionToDecalUV(float4 svPosition)
|
||||
{
|
||||
float2 screenUV = svPosition.xy * ScreenSize.zw;
|
||||
svPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r;
|
||||
float4 positionHS = mul(float4(svPosition.xyz, 1), SvPositionToWorld);
|
||||
float3 positionWS = positionHS.xyz / positionHS.w;
|
||||
float3 positionOS = mul(float4(positionWS, 1), InvWorld).xyz;
|
||||
return positionOS.xz + 0.5f;
|
||||
}
|
||||
|
||||
// Manually compute ddx/ddy for decal texture cooordinates to avoid the 2x2 pixels artifacts on the edges of geometry under decal
|
||||
// [Reference: https://www.humus.name/index.php?page=3D&ID=84]
|
||||
float4 CalculateTextureDerivatives(float4 svPosition, float2 texCoord)
|
||||
{
|
||||
float4 svDiffX = float4(1, 0, 0, 0);
|
||||
float2 uvDiffX0 = texCoord - SvPositionToDecalUV(svPosition - svDiffX);
|
||||
float2 uvDiffX1 = SvPositionToDecalUV(svPosition + svDiffX) - texCoord;
|
||||
float2 dx = dot(uvDiffX0, uvDiffX0) < dot(uvDiffX1, uvDiffX1) ? uvDiffX0 : uvDiffX1;
|
||||
|
||||
float4 svDiffY = float4(0, 1, 0, 0);
|
||||
float2 uvDiffY0 = texCoord - SvPositionToDecalUV(svPosition - svDiffY);
|
||||
float2 uvDiffY1 = SvPositionToDecalUV(svPosition + svDiffY) - texCoord;
|
||||
float2 dy = dot(uvDiffY0, uvDiffY0) < dot(uvDiffY1, uvDiffY1) ? uvDiffY0 : uvDiffY1;
|
||||
|
||||
return float4(dx, dy);
|
||||
}
|
||||
|
||||
// Computes the mipmap level for a specific texture dimensions to be sampled at decal texture cooordinates.
|
||||
// [Reference: https://hugi.scene.org/online/coding/hugi%2014%20-%20comipmap.htm]
|
||||
float CalculateTextureMipmap(MaterialInput input, float2 textureSize)
|
||||
{
|
||||
float2 dx = input.TexCoord_DDX_DDY.xy * textureSize;
|
||||
float2 dy = input.TexCoord_DDX_DDY.zw * textureSize;
|
||||
float d = max(dot(dx, dx), dot(dy, dy));
|
||||
return (0.5 * 0.5) * log2(d); // Hardcoded half-mip rate reduction to avoid artifacts when decal is moved over dither texture
|
||||
}
|
||||
float CalculateTextureMipmap(MaterialInput input, Texture2D t)
|
||||
{
|
||||
float2 textureSize;
|
||||
t.GetDimensions(textureSize.x, textureSize.y);
|
||||
return CalculateTextureMipmap(input, textureSize);
|
||||
}
|
||||
float CalculateTextureMipmap(MaterialInput input, TextureCube t)
|
||||
{
|
||||
float2 textureSize;
|
||||
t.GetDimensions(textureSize.x, textureSize.y);
|
||||
return CalculateTextureMipmap(input, textureSize);
|
||||
}
|
||||
|
||||
// Transforms a vector from tangent space to world space
|
||||
float3 TransformTangentVectorToWorld(MaterialInput input, float3 tangentVector)
|
||||
{
|
||||
@@ -116,7 +167,6 @@ Material GetMaterialPS(MaterialInput input)
|
||||
}
|
||||
|
||||
// Input macro specified by the material: DECAL_BLEND_MODE
|
||||
|
||||
#define DECAL_BLEND_MODE_TRANSLUCENT 0
|
||||
#define DECAL_BLEND_MODE_STAIN 1
|
||||
#define DECAL_BLEND_MODE_NORMAL 2
|
||||
@@ -153,7 +203,7 @@ void PS_Decal(
|
||||
float2 screenUV = SvPosition.xy * ScreenSize.zw;
|
||||
SvPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r;
|
||||
|
||||
float4 positionHS = mul(float4(SvPosition.xyz, 1), SVPositionToWorld);
|
||||
float4 positionHS = mul(float4(SvPosition.xyz, 1), SvPositionToWorld);
|
||||
float3 positionWS = positionHS.xyz / positionHS.w;
|
||||
float3 positionOS = mul(float4(positionWS, 1), InvWorld).xyz;
|
||||
|
||||
@@ -166,8 +216,9 @@ void PS_Decal(
|
||||
materialInput.TexCoord = decalUVs;
|
||||
materialInput.TwoSidedSign = 1;
|
||||
materialInput.SvPosition = SvPosition;
|
||||
|
||||
// Build tangent to world transformation matrix
|
||||
materialInput.TexCoord_DDX_DDY = CalculateTextureDerivatives(materialInput.SvPosition, materialInput.TexCoord);
|
||||
|
||||
// Calculate tangent-space
|
||||
float3 ddxWp = ddx(positionWS);
|
||||
float3 ddyWp = ddy(positionWS);
|
||||
materialInput.TBN[0] = normalize(ddyWp);
|
||||
|
||||
@@ -28,6 +28,13 @@ TextureCube SkyLightTexture : register(t__SRV__);
|
||||
Buffer<float4> ShadowsBuffer : register(t__SRV__);
|
||||
Texture2D<float> ShadowMap : register(t__SRV__);
|
||||
@4// Forward Shading: Utilities
|
||||
// Public accessors for lighting data, use them as data binding might change but those methods will remain.
|
||||
LightData GetDirectionalLight() { return DirectionalLight; }
|
||||
LightData GetSkyLight() { return SkyLight; }
|
||||
ProbeData GetEnvironmentProbe() { return EnvironmentProbe; }
|
||||
ExponentialHeightFogData GetExponentialHeightFog() { return ExponentialHeightFog; }
|
||||
uint GetLocalLightsCount() { return LocalLightsCount; }
|
||||
LightData GetLocalLight(uint i) { return LocalLights[i]; }
|
||||
@5// Forward Shading: Shaders
|
||||
|
||||
// Pixel Shader function for Forward Pass
|
||||
@@ -76,9 +83,8 @@ void PS_Forward(
|
||||
gBuffer.ShadingModel = MATERIAL_SHADING_MODEL;
|
||||
|
||||
// Calculate lighting from a single directional light
|
||||
float4 shadowMask = 1.0f;
|
||||
ShadowSample shadow = SampleDirectionalLightShadow(DirectionalLight, ShadowsBuffer, ShadowMap, gBuffer);
|
||||
shadowMask = GetShadowMask(shadow);
|
||||
float4 shadowMask = GetShadowMask(shadow);
|
||||
float4 light = GetLighting(ViewPos, DirectionalLight, gBuffer, shadowMask, false, false);
|
||||
|
||||
// Calculate lighting from sky light
|
||||
@@ -143,9 +149,9 @@ void PS_Forward(
|
||||
|
||||
#endif
|
||||
|
||||
#if USE_FOG
|
||||
#if USE_FOG && MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
|
||||
// Calculate exponential height fog
|
||||
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0);
|
||||
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0, gBuffer.ViewPos.z);
|
||||
|
||||
// Apply fog to the output color
|
||||
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
|
||||
|
||||
@@ -20,6 +20,8 @@ float TimeParam;
|
||||
float4 ViewInfo;
|
||||
float4 ScreenSize;
|
||||
float4 ViewSize;
|
||||
float3 ViewPadding0;
|
||||
float UnscaledTimeParam;
|
||||
@1META_CB_END
|
||||
|
||||
// Shader resources
|
||||
|
||||
@@ -19,6 +19,8 @@ float4 ViewInfo;
|
||||
float4 ScreenSize;
|
||||
float4 TemporalAAJitter;
|
||||
float4x4 InverseViewProjectionMatrix;
|
||||
float3 ViewPadding0;
|
||||
float UnscaledTimeParam;
|
||||
@1META_CB_END
|
||||
|
||||
// Shader resources
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "./Flax/Common.hlsl"
|
||||
#include "./Flax/MaterialCommon.hlsl"
|
||||
#include "./Flax/GBufferCommon.hlsl"
|
||||
#include "./Flax/TerrainCommon.hlsl"
|
||||
@7
|
||||
// Primary constant buffer (with additional material parameters)
|
||||
META_CB_BEGIN(0, Data)
|
||||
@@ -334,7 +335,7 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
float lodValue = CurrentLOD;
|
||||
float morphAlpha = lodCalculated - CurrentLOD;
|
||||
|
||||
// Sample heightmap
|
||||
// Sample heightmap and splatmaps
|
||||
float2 heightmapUVs = input.TexCoord * HeightmapUVScaleBias.xy + HeightmapUVScaleBias.zw;
|
||||
#if USE_SMOOTH_LOD_TRANSITION
|
||||
float4 heightmapValueThisLOD = Heightmap.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
|
||||
@@ -342,7 +343,6 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
float2 heightmapUVsNextLOD = nextLODPos * HeightmapUVScaleBias.xy + HeightmapUVScaleBias.zw;
|
||||
float4 heightmapValueNextLOD = Heightmap.SampleLevel(SamplerPointClamp, heightmapUVsNextLOD, lodValue + 1);
|
||||
float4 heightmapValue = lerp(heightmapValueThisLOD, heightmapValueNextLOD, morphAlpha);
|
||||
bool isHole = max(heightmapValueThisLOD.b + heightmapValueThisLOD.a, heightmapValueNextLOD.b + heightmapValueNextLOD.a) >= 1.9f;
|
||||
#if USE_TERRAIN_LAYERS
|
||||
float4 splatmapValueThisLOD = Splatmap0.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
|
||||
float4 splatmapValueNextLOD = Splatmap0.SampleLevel(SamplerPointClamp, heightmapUVsNextLOD, lodValue + 1);
|
||||
@@ -355,7 +355,6 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
#endif
|
||||
#else
|
||||
float4 heightmapValue = Heightmap.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
|
||||
bool isHole = (heightmapValue.b + heightmapValue.a) >= 1.9f;
|
||||
#if USE_TERRAIN_LAYERS
|
||||
float4 splatmap0Value = Splatmap0.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
|
||||
#if TERRAIN_LAYERS_DATA_SIZE > 1
|
||||
@@ -363,12 +362,11 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
float height = (float)((int)(heightmapValue.x * 255.0) + ((int)(heightmapValue.y * 255) << 8)) / 65535.0;
|
||||
float height = DecodeHeightmapHeight(heightmapValue);
|
||||
|
||||
// Extract normal and the holes mask
|
||||
float2 normalTemp = float2(heightmapValue.b, heightmapValue.a) * 2.0f - 1.0f;
|
||||
float3 normal = float3(normalTemp.x, sqrt(1.0 - saturate(dot(normalTemp, normalTemp))), normalTemp.y);
|
||||
normal = normalize(normal);
|
||||
bool isHole;
|
||||
float3 normal = DecodeHeightmapNormal(heightmapValue, isHole);
|
||||
output.Geometry.HolesMask = isHole ? 0 : 1;
|
||||
if (isHole)
|
||||
{
|
||||
@@ -438,7 +436,6 @@ VertexOutput VS(TerrainVertexInput input)
|
||||
// Apply world position offset per-vertex
|
||||
#if USE_POSITION_OFFSET
|
||||
output.Geometry.WorldPosition += material.PositionOffset;
|
||||
output.Geometry.PrevWorldPosition += material.PositionOffset;
|
||||
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
|
||||
#endif
|
||||
|
||||
|
||||
BIN
Content/Editor/Particles/Particle Material Color.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Particle Material Color.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Particles/Smoke Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Smoke Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/SpriteMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/SpriteMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Terrain/Circle Brush Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Terrain/Circle Brush Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Terrain/Highlight Terrain Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Terrain/Highlight Terrain Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/TexturePreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/TexturePreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Wires Debug Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Wires Debug Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultDeformableMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultDeformableMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultRadialMenu.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultRadialMenu.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultTerrainMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultTerrainMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/SingleColorMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/SingleColorMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/SkyboxMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/SkyboxMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/BitonicSort.flax
(Stored with Git LFS)
BIN
Content/Shaders/BitonicSort.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/Editor/Grid.flax
(Stored with Git LFS)
BIN
Content/Shaders/Editor/Grid.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/Fog.flax
(Stored with Git LFS)
BIN
Content/Shaders/Fog.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/GPUParticlesSorting.flax
(Stored with Git LFS)
BIN
Content/Shaders/GPUParticlesSorting.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/PostProcessing.flax
(Stored with Git LFS)
BIN
Content/Shaders/PostProcessing.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/ProbesFilter.flax
(Stored with Git LFS)
BIN
Content/Shaders/ProbesFilter.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/SSAO.flax
(Stored with Git LFS)
BIN
Content/Shaders/SSAO.flax
(Stored with Git LFS)
Binary file not shown.
@@ -2,9 +2,9 @@
|
||||
"Name": "Flax",
|
||||
"Version": {
|
||||
"Major": 1,
|
||||
"Minor": 10,
|
||||
"Minor": 11,
|
||||
"Revision": 0,
|
||||
"Build": 6705
|
||||
"Build": 6800
|
||||
},
|
||||
"Company": "Flax",
|
||||
"Copyright": "Copyright (c) 2012-2025 Wojciech Figat. All rights reserved.",
|
||||
|
||||
@@ -73,6 +73,24 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=TYPEDEF/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=UNION/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=UNION_005FMEMBER/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Abbreviations/=CCD/@EntryIndexedValue">CCD</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Abbreviations/=GPU/@EntryIndexedValue">GPU</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=175CE9C669E52F4D92FD2C07848740BD/@EntryIndexedValue"><NamingElement Priority="11" Title="Class and struct public fields"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="PUBLIC"><type Name="class field" /><type Name="struct field" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=32EB6D69783B3E4481A733193E338089/@EntryIndexedValue"><NamingElement Priority="9" Title="Class and struct methods"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="member function" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=3C4E0D59F298854F9608A9B454E8FF5E/@EntryIndexedValue"><NamingElement Priority="17" Title="Typedefs"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="type alias" /><type Name="typedef" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=499C9026DADA2B448BCD0B2C54746A59/@EntryIndexedValue"><NamingElement Priority="14" Title="Other constants"><Descriptor Static="True" Constexpr="Indeterminate" Const="True" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="class field" /><type Name="local variable" /><type Name="struct field" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=50D2535711CE1A43A3B06EF841C36CFD/@EntryIndexedValue"><NamingElement Priority="13" Title="Enum members"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="scoped enumerator" /><type Name="unscoped enumerator" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=6AD3BADA1260CC4D840AB26323C51827/@EntryIndexedValue"><NamingElement Priority="15" Title="Global constants"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="True" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=904CDCA174AACE4AA52660A247CDF9A0/@EntryIndexedValue"><NamingElement Priority="7" Title="Global variables"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=95BCDE767C97B64DB3DAE800DBBBC758/@EntryIndexedValue"><NamingElement Priority="5" Title="Parameters"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="function parameter" /><type Name="lambda parameter" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=C03AE454FC2CBA43819AC75E4D6C9C8C/@EntryIndexedValue"><NamingElement Priority="1" Title="Classes and structs"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="__interface" /><type Name="class" /><type Name="struct" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=D49E31C610641E4CAD0407DB79ACC851/@EntryIndexedValue"><NamingElement Priority="8" Title="Global functions"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global function" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=D73FBB3529BC5449B6C85BB37B26A8D4/@EntryIndexedValue"><NamingElement Priority="16" Title="Namespaces"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="namespace" /><type Name="namespace alias" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DA41807CE47AEB4CBE1724C44D0B786E/@EntryIndexedValue"><NamingElement Priority="6" Title="Local variables"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="local variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DDF30C9A1DA74B4DBBC56D25FDF886AA/@EntryIndexedValue"><NamingElement Priority="10" Title="Class and struct fields"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="class field" /><type Name="struct field" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="_" Suffix="" Style="aaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=EF70A6BF54ACE446971DDB32344C25A3/@EntryIndexedValue"><NamingElement Priority="12" Title="Union members"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="union member" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=F37818C54C323A4A80B1A478629985AE/@EntryIndexedValue"><NamingElement Priority="2" Title="Enums"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="enum" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AI/@EntryIndexedValue">AI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ARGB/@EntryIndexedValue">ARGB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LO/@EntryIndexedValue">LO</s:String>
|
||||
@@ -213,6 +231,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=YZ/@EntryIndexedValue">YZ</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PublicFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/PsiConfigurationSettingsKey/CustomLocation/@EntryValue">C:\Users\Wojtek\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v08_f9eacea9\SolutionCaches</s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002ECodeStyle_002ENaming_002ECppNamingOptionsMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002ECodeStyle_002ESettingsUpgrade_002EFunctionReturnStyleSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002ECodeStyle_002ESettingsUpgrade_002ENamespaceIndentationSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -267,6 +286,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=comperand/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=coord/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cubemap/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=DDGI/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deformer/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=deformers/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=defragmentation/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Flax Engine is a high quality modern 3D game engine written in C++ and C#.
|
||||
From stunning graphics to powerful scripts, it's designed for fast workflow with many ready-to-use features waiting for you right now. To learn more see the website ([www.flaxengine.com](https://flaxengine.com)).
|
||||
|
||||
This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Anyone is welcome to contribute or use the modified source in Flax-based games.
|
||||
This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Documentation source is also available in a separate repository. Anyone is welcome to contribute or use the modified source in Flax-based games.
|
||||
|
||||
# Development
|
||||
|
||||
@@ -46,21 +46,26 @@ Follow the instructions below to compile and run the engine from source.
|
||||
* Install Visual Studio Code
|
||||
* Install .NET 8 or 9 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Ubuntu: `sudo apt install dotnet-sdk-8.0`
|
||||
* Fedora: `sudo dnf install dotnet-sdk-8.0`
|
||||
* Arch: `sudo pacman -S dotnet-sdk-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-host`
|
||||
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
|
||||
* Ubuntu: `sudo apt install vulkan-sdk`
|
||||
* Arch: `sudo pacman -S spirv-tools vulkan-headers vulkan-tools vulkan-validation-layers`
|
||||
* Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers`
|
||||
* Arch: `sudo pacman -S vulkan-headers vulkan-tools vulkan-validation-layers`
|
||||
* Install Git with LFS
|
||||
* Ubuntu: `sudo apt-get install git git-lfs`
|
||||
* Arch: `sudo pacman -S git git-lfs`
|
||||
* `git-lfs install`
|
||||
* Install the required packages:
|
||||
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev`
|
||||
* Fedora: `sudo dnf install libX11-devel libXcursor-devel libXinerama-devel ghc-zlib-devel`
|
||||
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib`
|
||||
* Install Clang compiler (version 6 or later):
|
||||
* Ubuntu: `sudo apt-get install clang lldb lld`
|
||||
* Fedora: `sudo dnf install clang llvm lldb lld`
|
||||
* Arch: `sudo pacman -S clang lldb lld`
|
||||
* Clone the repository (with LFS)
|
||||
* git-lfs clone https://github.com/FlaxEngine/FlaxEngine.git
|
||||
* Run `./GenerateProjectFiles.sh`
|
||||
* Open workspace with Visual Code
|
||||
* Build and run (configuration and task named `Flax|Editor.Linux.Development|x64`)
|
||||
|
||||
@@ -174,7 +174,9 @@ void EditorAnalytics::StartSession()
|
||||
// Bind events
|
||||
GameCooker::OnEvent.Bind<RegisterGameCookingStart>();
|
||||
ShadowsOfMordor::Builder::Instance()->OnBuildStarted.Bind<RegisterLightmapsBuildingStart>();
|
||||
#if LOG_ENABLE
|
||||
Log::Logger::OnError.Bind<RegisterError>();
|
||||
#endif
|
||||
}
|
||||
|
||||
void EditorAnalytics::EndSession()
|
||||
@@ -187,7 +189,9 @@ void EditorAnalytics::EndSession()
|
||||
// Unbind events
|
||||
GameCooker::OnEvent.Unbind<RegisterGameCookingStart>();
|
||||
ShadowsOfMordor::Builder::Instance()->OnBuildStarted.Unbind<RegisterLightmapsBuildingStart>();
|
||||
#if LOG_ENABLE
|
||||
Log::Logger::OnError.Unbind<RegisterError>();
|
||||
#endif
|
||||
|
||||
// End session
|
||||
{
|
||||
|
||||
@@ -13,6 +13,11 @@ namespace FlaxEditor.Content.Create
|
||||
/// <inheritdoc />
|
||||
public string ResultUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating wether a file can be created based on the current settings.
|
||||
/// </summary>
|
||||
public abstract bool CanBeCreated { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this entry has settings to modify.
|
||||
/// </summary>
|
||||
|
||||
@@ -60,7 +60,8 @@ namespace FlaxEditor.Content.Create
|
||||
Text = "Create",
|
||||
AnchorPreset = AnchorPresets.BottomRight,
|
||||
Offsets = new Margin(-ButtonsWidth - ButtonsMargin, ButtonsWidth, -ButtonsHeight - ButtonsMargin, ButtonsHeight),
|
||||
Parent = this
|
||||
Parent = this,
|
||||
Enabled = entry.CanBeCreated,
|
||||
};
|
||||
createButton.Clicked += OnSubmit;
|
||||
var cancelButton = new Button
|
||||
@@ -68,7 +69,7 @@ namespace FlaxEditor.Content.Create
|
||||
Text = "Cancel",
|
||||
AnchorPreset = AnchorPresets.BottomRight,
|
||||
Offsets = new Margin(-ButtonsWidth - ButtonsMargin - ButtonsWidth - ButtonsMargin, ButtonsWidth, -ButtonsHeight - ButtonsMargin, ButtonsHeight),
|
||||
Parent = this
|
||||
Parent = this,
|
||||
};
|
||||
cancelButton.Clicked += OnCancel;
|
||||
|
||||
@@ -77,7 +78,7 @@ namespace FlaxEditor.Content.Create
|
||||
{
|
||||
AnchorPreset = AnchorPresets.HorizontalStretchTop,
|
||||
Offsets = new Margin(2, 2, infoLabel.Bottom + 2, EditorHeight),
|
||||
Parent = this
|
||||
Parent = this,
|
||||
};
|
||||
|
||||
// Settings editor
|
||||
@@ -87,6 +88,7 @@ namespace FlaxEditor.Content.Create
|
||||
_dialogSize = new Float2(TotalWidth, panel.Bottom);
|
||||
|
||||
_settingsEditor.Select(_entry.Settings);
|
||||
_settingsEditor.Modified += () => createButton.Enabled = _entry.CanBeCreated;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace FlaxEditor.Content.Create
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class ParticleEmitterCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override bool CanBeCreated => true;
|
||||
|
||||
/// <summary>
|
||||
/// Types of the emitter templates that can be created.
|
||||
/// </summary>
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace FlaxEditor.Content.Create
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class PrefabCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override bool CanBeCreated => _options.RootActorType != null;
|
||||
|
||||
/// <summary>
|
||||
/// The create options.
|
||||
/// </summary>
|
||||
@@ -73,6 +76,9 @@ namespace FlaxEditor.Content.Create
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class WidgetCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override bool CanBeCreated => _options.RootControlType != null;
|
||||
|
||||
/// <summary>
|
||||
/// The create options.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace FlaxEditor.Content.Create
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
internal class SettingsCreateEntry : CreateFileEntry
|
||||
{
|
||||
public override bool CanBeCreated => _options.Type != null;
|
||||
|
||||
internal class Options
|
||||
{
|
||||
[Tooltip("The settings type.")]
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace FlaxEditor.Content.Create
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class VisualScriptCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override bool CanBeCreated => _options.BaseClass != null;
|
||||
|
||||
/// <summary>
|
||||
/// The create options.
|
||||
/// </summary>
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace FlaxEditor.Content.GUI
|
||||
set
|
||||
{
|
||||
value = Mathf.Clamp(value, 0.3f, 3.0f);
|
||||
if (!Mathf.NearEqual(value, _viewScale))
|
||||
if (value != _viewScale)
|
||||
{
|
||||
_viewScale = value;
|
||||
ViewScaleChanged?.Invoke();
|
||||
|
||||
@@ -65,6 +65,9 @@ namespace FlaxEditor.Content
|
||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||
public class GenericJsonCreateEntry : CreateFileEntry
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override bool CanBeCreated => _options.Type != null;
|
||||
|
||||
/// <summary>
|
||||
/// The create options.
|
||||
/// </summary>
|
||||
|
||||
@@ -10,11 +10,9 @@ using FlaxEngine;
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Context proxy object for shader source files (represented by <see cref="ShaderSourceItem"/>).
|
||||
/// Base class for shader source files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.ContentProxy" />
|
||||
[ContentContextMenu("New/Shader Source")]
|
||||
public class ShaderSourceProxy : ContentProxy
|
||||
public abstract class ShaderBaseProxy : ContentProxy
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override bool CanCreate(ContentFolder targetLocation)
|
||||
@@ -29,6 +27,21 @@ namespace FlaxEditor.Content
|
||||
return targetLocation.ShortName == "Source" && prevTargetLocation.ShortName == "Shaders";
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
{
|
||||
Editor.Instance.CodeEditing.OpenFile(item.Path);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Context proxy object for shader source files (represented by <see cref="ShaderSourceItem"/>).
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.ContentProxy" />
|
||||
[ContentContextMenu("New/Shader Source (.shader)")]
|
||||
public class ShaderSourceProxy : ShaderBaseProxy
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void Create(string outputPath, object arg)
|
||||
{
|
||||
@@ -44,13 +57,6 @@ namespace FlaxEditor.Content
|
||||
File.WriteAllText(outputPath, shaderTemplate, Encoding.UTF8);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
{
|
||||
Editor.Instance.CodeEditing.OpenFile(item.Path);
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Color AccentColor => Color.FromRGB(0x7542f5);
|
||||
|
||||
@@ -66,4 +72,33 @@ namespace FlaxEditor.Content
|
||||
return item is ShaderSourceItem;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Context proxy object for shader header files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.ContentProxy" />
|
||||
[ContentContextMenu("New/Shader Header (.hlsl)")]
|
||||
public class ShaderHeaderProxy : ShaderBaseProxy
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void Create(string outputPath, object arg)
|
||||
{
|
||||
File.WriteAllText(outputPath, "\n", Encoding.UTF8);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Color AccentColor => Color.FromRGB(0x2545a5);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FileExtension => "hlsl";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Shader Header";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsProxyFor(ContentItem item)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,13 +20,6 @@ class PlatformTools;
|
||||
#define GAME_BUILD_DOTNET_RUNTIME_MAX_VER 9
|
||||
#endif
|
||||
|
||||
#if OFFICIAL_BUILD
|
||||
// Use the fixed .NET SDK version in packaged builds for compatibility (FlaxGame is precompiled with it)
|
||||
#define GAME_BUILD_DOTNET_VER TEXT("-dotnet=" MACRO_TO_STR(GAME_BUILD_DOTNET_RUNTIME_MIN_VER))
|
||||
#else
|
||||
#define GAME_BUILD_DOTNET_VER TEXT("")
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Game building options. Used as flags.
|
||||
/// </summary>
|
||||
@@ -374,6 +367,8 @@ public:
|
||||
/// </summary>
|
||||
void GetBuildPlatformName(const Char*& platform, const Char*& architecture) const;
|
||||
|
||||
String GetDotnetCommandArg() const;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "Engine/Scripting/ManagedCLR/MAssembly.h"
|
||||
#include "Engine/Content/JsonAsset.h"
|
||||
#include "Engine/Content/AssetReference.h"
|
||||
#include "Engine/Profiler/ProfilerMemory.h"
|
||||
#if PLATFORM_TOOLS_WINDOWS
|
||||
#include "Platform/Windows/WindowsPlatformTools.h"
|
||||
#include "Engine/Platform/Windows/WindowsPlatformSettings.h"
|
||||
@@ -311,6 +312,14 @@ void CookingData::GetBuildPlatformName(const Char*& platform, const Char*& archi
|
||||
}
|
||||
}
|
||||
|
||||
String CookingData::GetDotnetCommandArg() const
|
||||
{
|
||||
int32 version = Tools->GetDotnetVersion();
|
||||
if (version == 0)
|
||||
return String::Empty;
|
||||
return String::Format(TEXT("-dotnet={}"), version);
|
||||
}
|
||||
|
||||
void CookingData::StepProgress(const String& info, const float stepProgress) const
|
||||
{
|
||||
const float singleStepProgress = 1.0f / (StepsCount + 1);
|
||||
@@ -380,6 +389,7 @@ bool GameCooker::IsCancelRequested()
|
||||
|
||||
PlatformTools* GameCooker::GetTools(BuildPlatform platform)
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
PlatformTools* result = nullptr;
|
||||
if (!Tools.TryGet(platform, result))
|
||||
{
|
||||
@@ -471,6 +481,7 @@ bool GameCooker::Build(BuildPlatform platform, BuildConfiguration configuration,
|
||||
LOG(Error, "Build platform {0} is not supported.", ::ToString(platform));
|
||||
return true;
|
||||
}
|
||||
PROFILE_MEM(Editor);
|
||||
|
||||
// Setup
|
||||
CancelFlag = 0;
|
||||
@@ -624,6 +635,7 @@ void GameCookerImpl::ReportProgress(const String& info, float totalProgress)
|
||||
|
||||
void GameCookerImpl::OnCollectAssets(HashSet<Guid>& assets)
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
if (Internal_OnCollectAssets == nullptr)
|
||||
{
|
||||
auto c = GameCooker::GetStaticClass();
|
||||
@@ -651,6 +663,7 @@ void GameCookerImpl::OnCollectAssets(HashSet<Guid>& assets)
|
||||
|
||||
bool GameCookerImpl::Build()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
CookingData& data = *Data;
|
||||
LOG(Info, "Starting Game Cooker...");
|
||||
LOG(Info, "Platform: {0}, Configuration: {2}, Options: {1}", ::ToString(data.Platform), (int32)data.Options, ::ToString(data.Configuration));
|
||||
@@ -670,8 +683,7 @@ bool GameCookerImpl::Build()
|
||||
|
||||
MCore::Thread::Attach();
|
||||
|
||||
// Build Started
|
||||
if (!EnumHasAnyFlags(data.Options, BuildOptions::NoCook))
|
||||
// Build start
|
||||
{
|
||||
CallEvent(GameCooker::EventType::BuildStarted);
|
||||
data.Tools->OnBuildStarted(data);
|
||||
@@ -744,8 +756,8 @@ bool GameCookerImpl::Build()
|
||||
}
|
||||
IsRunning = false;
|
||||
CancelFlag = 0;
|
||||
if (!EnumHasAnyFlags(data.Options, BuildOptions::NoCook))
|
||||
{
|
||||
// Build end
|
||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||
Steps[stepIndex]->OnBuildEnded(data, failed);
|
||||
data.Tools->OnBuildEnded(data, failed);
|
||||
@@ -778,6 +790,8 @@ int32 GameCookerImpl::ThreadFunction()
|
||||
|
||||
bool GameCookerService::Init()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
|
||||
auto editorAssembly = ((NativeBinaryModule*)GetBinaryModuleFlaxEngine())->Assembly;
|
||||
editorAssembly->Unloading.Bind(OnEditorAssemblyUnloading);
|
||||
GameCooker::OnCollectAssets.Bind(OnCollectAssets);
|
||||
@@ -789,6 +803,7 @@ void GameCookerService::Update()
|
||||
{
|
||||
if (IsRunning)
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
ScopeLock lock(ProgressLocker);
|
||||
|
||||
if (ProgressMsg.HasChars())
|
||||
|
||||
@@ -195,4 +195,9 @@ bool GDKPlatformTools::OnPostProcess(CookingData& data, GDKPlatformSettings* pla
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 GDKPlatformTools::GetDotnetVersion() const
|
||||
{
|
||||
return GAME_BUILD_DOTNET_RUNTIME_MIN_VER;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
public:
|
||||
|
||||
// [PlatformTools]
|
||||
int32 GetDotnetVersion() const override;
|
||||
DotNetAOTModes UseAOT() const override;
|
||||
bool OnDeployBinaries(CookingData& data) override;
|
||||
};
|
||||
|
||||
@@ -186,7 +186,7 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
|
||||
ADD_ENTRY("CFBundlePackageType", "APPL");
|
||||
ADD_ENTRY("NSPrincipalClass", "NSApplication");
|
||||
ADD_ENTRY("LSApplicationCategoryType", "public.app-category.games");
|
||||
ADD_ENTRY("LSMinimumSystemVersion", "10.15");
|
||||
ADD_ENTRY("LSMinimumSystemVersion", "13");
|
||||
ADD_ENTRY("CFBundleIconFile", "icon.icns");
|
||||
ADD_ENTRY_STR("CFBundleExecutable", executableName);
|
||||
ADD_ENTRY_STR("CFBundleIdentifier", appIdentifier);
|
||||
@@ -231,6 +231,8 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
|
||||
LOG(Info, "Building app package...");
|
||||
{
|
||||
const String dmgPath = data.OriginalOutputPath / appName + TEXT(".dmg");
|
||||
if (FileSystem::FileExists(dmgPath))
|
||||
FileSystem::DeleteFile(dmgPath);
|
||||
CreateProcessSettings procSettings;
|
||||
procSettings.HiddenWindow = true;
|
||||
procSettings.WorkingDirectory = data.OriginalOutputPath;
|
||||
|
||||
@@ -528,6 +528,9 @@ bool WindowsPlatformTools::OnDeployBinaries(CookingData& data)
|
||||
|
||||
void WindowsPlatformTools::OnBuildStarted(CookingData& data)
|
||||
{
|
||||
if (EnumHasAllFlags(data.Options, BuildOptions::NoCook))
|
||||
return;
|
||||
|
||||
// Remove old executable
|
||||
Array<String> files;
|
||||
FileSystem::DirectoryGetFiles(files, data.NativeCodeOutputPath, TEXT("*.exe"), DirectorySearchOption::TopDirectoryOnly);
|
||||
|
||||
@@ -70,6 +70,20 @@ public:
|
||||
/// </summary>
|
||||
virtual ArchitectureType GetArchitecture() const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the .Net version to use for the cooked game.
|
||||
/// </summary>
|
||||
virtual int32 GetDotnetVersion() const
|
||||
{
|
||||
#if OFFICIAL_BUILD
|
||||
// Use the fixed .NET SDK version in packaged builds for compatibility (FlaxGame is precompiled with it)
|
||||
return GAME_BUILD_DOTNET_RUNTIME_MIN_VER;
|
||||
#else
|
||||
// Use the highest version found on a system (Flax.Build will decide)
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value indicating whenever platform requires AOT (needs C# assemblies to be precompiled).
|
||||
/// </summary>
|
||||
|
||||
@@ -189,7 +189,7 @@ bool CompileScriptsStep::Perform(CookingData& data)
|
||||
const String logFile = data.CacheDirectory / TEXT("CompileLog.txt");
|
||||
auto args = String::Format(
|
||||
TEXT("-log -logfile=\"{4}\" -build -mutex -buildtargets={0} -platform={1} -arch={2} -configuration={3} -aotMode={5} {6}"),
|
||||
target, platform, architecture, configuration, logFile, ToString(data.Tools->UseAOT()), GAME_BUILD_DOTNET_VER);
|
||||
target, platform, architecture, configuration, logFile, ToString(data.Tools->UseAOT()), data.GetDotnetCommandArg());
|
||||
#if PLATFORM_WINDOWS
|
||||
if (data.Platform == BuildPlatform::LinuxX64)
|
||||
#elif PLATFORM_LINUX
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "Engine/Engine/Base/GameBase.h"
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Scripting/Enums.h"
|
||||
#if PLATFORM_TOOLS_WINDOWS
|
||||
|
||||
@@ -88,7 +88,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
{
|
||||
// Ask Flax.Build to provide .NET SDK location for the current platform
|
||||
String sdks;
|
||||
bool failed = ScriptsBuilder::RunBuildTool(String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printSDKs {}"), GAME_BUILD_DOTNET_VER), data.CacheDirectory);
|
||||
bool failed = ScriptsBuilder::RunBuildTool(String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printSDKs {}"), data.GetDotnetCommandArg()), data.CacheDirectory);
|
||||
failed |= File::ReadAllText(data.CacheDirectory / TEXT("SDKs.txt"), sdks);
|
||||
int32 idx = sdks.Find(TEXT("DotNetSdk, "), StringSearchCase::CaseSensitive);
|
||||
if (idx != -1)
|
||||
@@ -200,7 +200,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
String sdks;
|
||||
const Char *platformName, *archName;
|
||||
data.GetBuildPlatformName(platformName, archName);
|
||||
String args = String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printDotNetRuntime -platform={} -arch={} {}"), platformName, archName, GAME_BUILD_DOTNET_VER);
|
||||
String args = String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printDotNetRuntime -platform={} -arch={} {}"), platformName, archName, data.GetDotnetCommandArg());
|
||||
bool failed = ScriptsBuilder::RunBuildTool(args, data.CacheDirectory);
|
||||
failed |= File::ReadAllText(data.CacheDirectory / TEXT("SDKs.txt"), sdks);
|
||||
Array<String> parts;
|
||||
@@ -244,10 +244,13 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
}
|
||||
if (version.IsEmpty())
|
||||
{
|
||||
int32 minVer = GAME_BUILD_DOTNET_RUNTIME_MIN_VER, maxVer = GAME_BUILD_DOTNET_RUNTIME_MAX_VER;
|
||||
if (srcDotnetFromEngine)
|
||||
{
|
||||
// Detect version from runtime files inside Engine Platform folder
|
||||
for (int32 i = GAME_BUILD_DOTNET_RUNTIME_MAX_VER; i >= GAME_BUILD_DOTNET_RUNTIME_MIN_VER; i--)
|
||||
if (data.Tools->GetDotnetVersion() != 0)
|
||||
minVer = maxVer = data.Tools->GetDotnetVersion();
|
||||
for (int32 i = maxVer; i >= minVer; i--)
|
||||
{
|
||||
// Check runtime files inside Engine Platform folder
|
||||
String testPath1 = srcDotnet / String::Format(TEXT("lib/net{}.0"), i);
|
||||
@@ -262,7 +265,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
}
|
||||
if (version.IsEmpty())
|
||||
{
|
||||
data.Error(String::Format(TEXT("Failed to find supported .NET {} version for the current host platform."), GAME_BUILD_DOTNET_RUNTIME_MIN_VER));
|
||||
data.Error(String::Format(TEXT("Failed to find supported .NET {} version (min {}) for the current host platform."), maxVer, minVer));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -364,7 +367,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
const String logFile = data.CacheDirectory / TEXT("StripDotnetLibs.txt");
|
||||
String args = String::Format(
|
||||
TEXT("-log -logfile=\"{}\" -runDotNetClassLibStripping -mutex -binaries=\"{}\" {}"),
|
||||
logFile, data.DataOutputPath, GAME_BUILD_DOTNET_VER);
|
||||
logFile, data.DataOutputPath, data.GetDotnetCommandArg());
|
||||
for (const String& define : data.CustomDefines)
|
||||
{
|
||||
args += TEXT(" -D");
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
void PrecompileAssembliesStep::OnBuildStarted(CookingData& data)
|
||||
{
|
||||
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
||||
if (aotMode == DotNetAOTModes::None)
|
||||
if (aotMode == DotNetAOTModes::None || EnumHasAllFlags(data.Options, BuildOptions::NoCook))
|
||||
return;
|
||||
const auto& buildSettings = *BuildSettings::Get();
|
||||
|
||||
@@ -69,7 +69,7 @@ bool PrecompileAssembliesStep::Perform(CookingData& data)
|
||||
const String logFile = data.CacheDirectory / TEXT("AOTLog.txt");
|
||||
String args = String::Format(
|
||||
TEXT("-log -logfile=\"{}\" -runDotNetAOT -mutex -platform={} -arch={} -configuration={} -aotMode={} -binaries=\"{}\" -intermediate=\"{}\" {}"),
|
||||
logFile, platform, architecture, configuration, ToString(aotMode), data.DataOutputPath, data.ManagedCodeOutputPath, GAME_BUILD_DOTNET_VER);
|
||||
logFile, platform, architecture, configuration, ToString(aotMode), data.DataOutputPath, data.ManagedCodeOutputPath, data.GetDotnetCommandArg());
|
||||
if (!buildSettings.SkipUnusedDotnetLibsPackaging)
|
||||
args += TEXT(" -skipUnusedDotnetLibs=false"); // Run AOT on whole class library (not just used libs)
|
||||
for (const String& define : data.CustomDefines)
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace FlaxEditor
|
||||
private readonly CustomEditorPresenter _presenter;
|
||||
private CustomEditorWindow _customEditor;
|
||||
|
||||
public Win(CustomEditorWindow customEditor)
|
||||
: base(Editor.Instance, false, ScrollBars.Vertical)
|
||||
public Win(CustomEditorWindow customEditor, bool hideOnClose, ScrollBars scrollBars)
|
||||
: base(Editor.Instance, hideOnClose, scrollBars)
|
||||
{
|
||||
Title = customEditor.GetType().Name;
|
||||
_customEditor = customEditor;
|
||||
@@ -64,9 +64,9 @@ namespace FlaxEditor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CustomEditorWindow"/> class.
|
||||
/// </summary>
|
||||
protected CustomEditorWindow()
|
||||
protected CustomEditorWindow(bool hideOnClose = false, ScrollBars scrollBars = ScrollBars.Vertical)
|
||||
{
|
||||
_win = new Win(this);
|
||||
_win = new Win(this, hideOnClose, scrollBars);
|
||||
ScriptsBuilder.ScriptsReloadBegin += OnScriptsReloadBegin;
|
||||
}
|
||||
|
||||
|
||||
@@ -749,6 +749,15 @@ namespace FlaxEditor.CustomEditors
|
||||
}
|
||||
}
|
||||
|
||||
private Actor FindActor(CustomEditor editor)
|
||||
{
|
||||
if (editor.Values[0] is Actor actor)
|
||||
return actor;
|
||||
if (editor.ParentEditor != null)
|
||||
return FindActor(editor.ParentEditor);
|
||||
return null;
|
||||
}
|
||||
|
||||
private Actor FindPrefabRoot(CustomEditor editor)
|
||||
{
|
||||
if (editor.Values[0] is Actor actor)
|
||||
@@ -767,32 +776,35 @@ namespace FlaxEditor.CustomEditors
|
||||
return FindPrefabRoot(actor.Parent);
|
||||
}
|
||||
|
||||
private SceneObject FindObjectWithPrefabObjectId(Actor actor, ref Guid prefabObjectId)
|
||||
private SceneObject FindObjectWithPrefabObjectId(Actor actor, ref Guid prefabObjectId, Actor endPoint)
|
||||
{
|
||||
var visited = new HashSet<Actor>();
|
||||
return FindObjectWithPrefabObjectId(actor, ref prefabObjectId, endPoint, visited);
|
||||
}
|
||||
|
||||
private SceneObject FindObjectWithPrefabObjectId(Actor actor, ref Guid prefabObjectId, Actor endPoint, HashSet<Actor> visited)
|
||||
{
|
||||
if (visited.Contains(actor) || actor is Scene || actor == endPoint)
|
||||
return null;
|
||||
if (actor.PrefabObjectID == prefabObjectId)
|
||||
return actor;
|
||||
|
||||
for (int i = 0; i < actor.ScriptsCount; i++)
|
||||
{
|
||||
if (actor.GetScript(i).PrefabObjectID == prefabObjectId)
|
||||
{
|
||||
var a = actor.GetScript(i);
|
||||
if (a != null)
|
||||
return a;
|
||||
}
|
||||
var script = actor.GetScript(i);
|
||||
if (script != null && script.PrefabObjectID == prefabObjectId)
|
||||
return script;
|
||||
}
|
||||
|
||||
for (int i = 0; i < actor.ChildrenCount; i++)
|
||||
{
|
||||
if (actor.GetChild(i).PrefabObjectID == prefabObjectId)
|
||||
{
|
||||
var a = actor.GetChild(i);
|
||||
if (a != null)
|
||||
return a;
|
||||
}
|
||||
var child = actor.GetChild(i);
|
||||
if (child != null && child.PrefabObjectID == prefabObjectId)
|
||||
return child;
|
||||
}
|
||||
|
||||
return null;
|
||||
// Go up in the hierarchy
|
||||
return FindObjectWithPrefabObjectId(actor.Parent, ref prefabObjectId, endPoint, visited);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -826,7 +838,7 @@ namespace FlaxEditor.CustomEditors
|
||||
}
|
||||
|
||||
var prefabObjectId = referenceSceneObject.PrefabObjectID;
|
||||
var prefabInstanceRef = FindObjectWithPrefabObjectId(prefabInstanceRoot, ref prefabObjectId);
|
||||
var prefabInstanceRef = FindObjectWithPrefabObjectId(FindActor(this), ref prefabObjectId, prefabInstanceRoot);
|
||||
if (prefabInstanceRef == null)
|
||||
{
|
||||
Editor.LogWarning("Missing prefab instance reference in the prefab instance. Cannot revert to it.");
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FlaxEditor.SceneGraph;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
@@ -52,6 +53,21 @@ namespace FlaxEditor.CustomEditors
|
||||
/// </summary>
|
||||
/// <param name="nodes">The nodes to select</param>
|
||||
public void Select(List<SceneGraph.SceneGraphNode> nodes);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current selection.
|
||||
/// </summary>
|
||||
public List<SceneGraphNode> Selection { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Indication of if the properties window is locked on specific objects.
|
||||
/// </summary>
|
||||
public bool LockSelection { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scene editing context.
|
||||
/// </summary>
|
||||
public ISceneEditingContext SceneContext { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -81,6 +97,8 @@ namespace FlaxEditor.CustomEditors
|
||||
Offsets = Margin.Zero;
|
||||
Pivot = Float2.Zero;
|
||||
IsScrollable = true;
|
||||
Spacing = Utilities.Constants.UIMargin;
|
||||
Margin = new Margin(Utilities.Constants.UIMargin);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -95,7 +113,7 @@ namespace FlaxEditor.CustomEditors
|
||||
{
|
||||
FlaxEditor.Editor.LogWarning(ex);
|
||||
|
||||
// Refresh layout on errors to reduce lgo spam
|
||||
// Refresh layout on errors to reduce log spam
|
||||
_presenter.BuildLayout();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "Engine/Core/Types/TimeSpan.h"
|
||||
#include "Engine/Core/Types/Stopwatch.h"
|
||||
#include "Engine/Core/Collections/Dictionary.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Profiler/ProfilerMemory.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
#include "Engine/Scripting/Scripting.h"
|
||||
#include "Engine/Scripting/BinaryModule.h"
|
||||
@@ -69,6 +71,7 @@ MTypeObject* CustomEditorsUtil::GetCustomEditor(MTypeObject* refType)
|
||||
|
||||
bool CustomEditorsUtilService::Init()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
TRACK_ASSEMBLY(((NativeBinaryModule*)GetBinaryModuleFlaxEngine())->Assembly);
|
||||
Scripting::BinaryModuleLoaded.Bind(&OnBinaryModuleLoaded);
|
||||
|
||||
@@ -77,6 +80,8 @@ bool CustomEditorsUtilService::Init()
|
||||
|
||||
void OnAssemblyLoaded(MAssembly* assembly)
|
||||
{
|
||||
PROFILE_CPU_NAMED("CustomEditors.OnAssemblyLoaded");
|
||||
PROFILE_MEM(Editor);
|
||||
Stopwatch stopwatch;
|
||||
|
||||
// Prepare FlaxEngine
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FlaxEditor.Actions;
|
||||
using FlaxEditor.CustomEditors.Editors;
|
||||
using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEditor.GUI;
|
||||
using FlaxEditor.GUI.ContextMenu;
|
||||
using FlaxEditor.GUI.Tree;
|
||||
using FlaxEditor.Modules;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
using FlaxEngine.Json;
|
||||
using FlaxEngine.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FlaxEditor.CustomEditors.Dedicated
|
||||
{
|
||||
@@ -71,14 +69,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
// Display prefab UI (when displaying object inside Prefab Window then display only nested prefabs)
|
||||
prefab.GetNestedObject(ref prefabObjectId, out var nestedPrefabId, out var nestedPrefabObjectId);
|
||||
var nestedPrefab = FlaxEngine.Content.Load<Prefab>(nestedPrefabId);
|
||||
var panel = layout.CustomContainer<UniformGridPanel>();
|
||||
var panel = layout.UniformGrid();
|
||||
panel.CustomControl.Height = 20.0f;
|
||||
panel.CustomControl.SlotsVertically = 1;
|
||||
if (Presenter == Editor.Instance.Windows.PropertiesWin.Presenter || nestedPrefab)
|
||||
{
|
||||
var targetPrefab = nestedPrefab ?? prefab;
|
||||
panel.CustomControl.SlotsHorizontally = 3;
|
||||
|
||||
|
||||
// Selecting actor prefab asset
|
||||
var selectPrefab = panel.Button("Select Prefab");
|
||||
selectPrefab.Button.Clicked += () =>
|
||||
@@ -133,35 +131,22 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
var actor = (Actor)Values[0];
|
||||
var scriptType = TypeUtils.GetType(actor.TypeName);
|
||||
var item = scriptType.ContentItem;
|
||||
if (Presenter.Owner is PropertiesWindow propertiesWindow)
|
||||
if (Presenter.Owner != null)
|
||||
{
|
||||
var lockButton = cm.AddButton(propertiesWindow.LockObjects ? "Unlock" : "Lock");
|
||||
var lockButton = cm.AddButton(Presenter.Owner.LockSelection ? "Unlock" : "Lock");
|
||||
lockButton.ButtonClicked += button =>
|
||||
{
|
||||
propertiesWindow.LockObjects = !propertiesWindow.LockObjects;
|
||||
var owner = Presenter?.Owner;
|
||||
if (owner == null)
|
||||
return;
|
||||
owner.LockSelection = !owner.LockSelection;
|
||||
|
||||
// Reselect current selection
|
||||
if (!propertiesWindow.LockObjects && Editor.Instance.SceneEditing.SelectionCount > 0)
|
||||
if (!owner.LockSelection && owner.Selection.Count > 0)
|
||||
{
|
||||
var cachedSelection = Editor.Instance.SceneEditing.Selection.ToArray();
|
||||
Editor.Instance.SceneEditing.Select(null);
|
||||
Editor.Instance.SceneEditing.Select(cachedSelection);
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (Presenter.Owner is PrefabWindow prefabWindow)
|
||||
{
|
||||
var lockButton = cm.AddButton(prefabWindow.LockSelectedObjects ? "Unlock" : "Lock");
|
||||
lockButton.ButtonClicked += button =>
|
||||
{
|
||||
prefabWindow.LockSelectedObjects = !prefabWindow.LockSelectedObjects;
|
||||
|
||||
// Reselect current selection
|
||||
if (!prefabWindow.LockSelectedObjects && prefabWindow.Selection.Count > 0)
|
||||
{
|
||||
var cachedSelection = prefabWindow.Selection.ToList();
|
||||
prefabWindow.Select(null);
|
||||
prefabWindow.Select(cachedSelection);
|
||||
var cachedSelection = owner.Selection.ToList();
|
||||
owner.Select(null);
|
||||
owner.Select(cachedSelection);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -254,11 +239,27 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
node.TextColor = Color.OrangeRed;
|
||||
node.Text = Utilities.Utils.GetPropertyNameUI(removed.PrefabObject.GetType().Name);
|
||||
}
|
||||
// Removed Actor
|
||||
else if (editor is RemovedActorDummy removedActor)
|
||||
{
|
||||
node.TextColor = Color.OrangeRed;
|
||||
node.Text = $"{removedActor.PrefabObject.Name} ({Utilities.Utils.GetPropertyNameUI(removedActor.PrefabObject.GetType().Name)})";
|
||||
}
|
||||
// Actor or Script
|
||||
else if (editor.Values[0] is SceneObject sceneObject)
|
||||
{
|
||||
node.TextColor = sceneObject.HasPrefabLink ? FlaxEngine.GUI.Style.Current.ProgressNormal : FlaxEngine.GUI.Style.Current.BackgroundSelected;
|
||||
node.Text = Utilities.Utils.GetPropertyNameUI(sceneObject.GetType().Name);
|
||||
if (editor.Values.Info != ScriptMemberInfo.Null)
|
||||
{
|
||||
if (editor.Values.GetAttributes().FirstOrDefault(x => x is EditorDisplayAttribute) is EditorDisplayAttribute editorDisplayAttribute && !string.IsNullOrEmpty(editorDisplayAttribute.Name))
|
||||
node.Text = $"{Utilities.Utils.GetPropertyNameUI(editorDisplayAttribute.Name)} ({Utilities.Utils.GetPropertyNameUI(editor.Values.Info.Name)})";
|
||||
else
|
||||
node.Text = Utilities.Utils.GetPropertyNameUI(editor.Values.Info.Name);
|
||||
}
|
||||
else if (sceneObject is Actor actor)
|
||||
node.Text = $"{actor.Name} ({Utilities.Utils.GetPropertyNameUI(sceneObject.GetType().Name)})";
|
||||
else
|
||||
node.Text = Utilities.Utils.GetPropertyNameUI(sceneObject.GetType().Name);
|
||||
}
|
||||
// Array Item
|
||||
else if (editor.ParentEditor is CollectionEditor)
|
||||
@@ -268,7 +269,12 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
// Common type
|
||||
else if (editor.Values.Info != ScriptMemberInfo.Null)
|
||||
{
|
||||
node.Text = Utilities.Utils.GetPropertyNameUI(editor.Values.Info.Name);
|
||||
if (editor.Values.GetAttributes().FirstOrDefault(x => x is EditorDisplayAttribute) is EditorDisplayAttribute editorDisplayAttribute
|
||||
&& !string.IsNullOrEmpty(editorDisplayAttribute.Name)
|
||||
&& !editorDisplayAttribute.Name.Contains("_inline"))
|
||||
node.Text = $"{Utilities.Utils.GetPropertyNameUI(editorDisplayAttribute.Name)} ({Utilities.Utils.GetPropertyNameUI(editor.Values.Info.Name)})";
|
||||
else
|
||||
node.Text = Utilities.Utils.GetPropertyNameUI(editor.Values.Info.Name);
|
||||
}
|
||||
// Custom type
|
||||
else if (editor.Values[0] != null)
|
||||
@@ -294,16 +300,40 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
// Not used
|
||||
}
|
||||
}
|
||||
|
||||
private class RemovedActorDummy : CustomEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// The removed prefab object (from the prefab default instance).
|
||||
/// </summary>
|
||||
public Actor PrefabObject;
|
||||
|
||||
/// <summary>
|
||||
/// The prefab instance's parent.
|
||||
/// </summary>
|
||||
public Actor ParentActor;
|
||||
|
||||
/// <summary>
|
||||
/// The order of the removed actor in the parent.
|
||||
/// </summary>
|
||||
public int OrderInParent;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
// Not used
|
||||
}
|
||||
}
|
||||
|
||||
private TreeNode ProcessDiff(CustomEditor editor, bool skipIfNotModified = true)
|
||||
{
|
||||
// Special case for new Script added to actor
|
||||
if (editor.Values[0] is Script script && !script.HasPrefabLink)
|
||||
// Special case for new Script or child actor added to actor
|
||||
if ((editor.Values[0] is Script script && !script.HasPrefabLink) || (editor.Values[0] is Actor a && !a.HasPrefabLink))
|
||||
return CreateDiffNode(editor);
|
||||
|
||||
// Skip if no change detected
|
||||
var isRefEdited = editor.Values.IsReferenceValueModified;
|
||||
if (!isRefEdited && skipIfNotModified)
|
||||
if (!isRefEdited && skipIfNotModified && editor is not ScriptsEditor)
|
||||
return null;
|
||||
|
||||
TreeNode result = null;
|
||||
@@ -316,7 +346,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
var childEditor = editor.ChildrenEditors[i];
|
||||
|
||||
// Special case for root actor transformation (can be applied only in Prefab editor, not in Level)
|
||||
if (isActorEditorInLevel && childEditor.Values.Info.Name is "LocalPosition" or "LocalOrientation" or "LocalScale")
|
||||
if (isActorEditorInLevel && childEditor.Values.Info.Name is "LocalPosition" or "LocalOrientation" or "LocalScale" or "Name")
|
||||
continue;
|
||||
|
||||
var child = ProcessDiff(childEditor, !isScriptEditorWithRefValue);
|
||||
@@ -358,16 +388,80 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
}
|
||||
}
|
||||
|
||||
// Compare child actors for removed actors.
|
||||
if (editor is ActorEditor && editor.Values.HasReferenceValue && editor.Values.ReferenceValue is Actor prefabObjectActor)
|
||||
{
|
||||
var thisActor = editor.Values[0] as Actor;
|
||||
for (int i = 0; i < prefabObjectActor.ChildrenCount; i++)
|
||||
{
|
||||
var prefabActorChild = prefabObjectActor.Children[i];
|
||||
if (thisActor == null)
|
||||
continue;
|
||||
bool isRemoved = true;
|
||||
for (int j = 0; j < thisActor.ChildrenCount; j++)
|
||||
{
|
||||
var actorChild = thisActor.Children[j];
|
||||
if (actorChild.PrefabObjectID == prefabActorChild.PrefabObjectID)
|
||||
{
|
||||
isRemoved = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isRemoved)
|
||||
{
|
||||
var dummy = new RemovedActorDummy
|
||||
{
|
||||
PrefabObject = prefabActorChild,
|
||||
ParentActor = thisActor,
|
||||
OrderInParent = prefabActorChild.OrderInParent,
|
||||
};
|
||||
var child = CreateDiffNode(dummy);
|
||||
if (result == null)
|
||||
result = CreateDiffNode(editor);
|
||||
result.AddChild(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (editor is ScriptsEditor && result != null && result.ChildrenCount == 0)
|
||||
return null;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private TreeNode CreateDiffTree(Actor actor, CustomEditorPresenter presenter, LayoutElementsContainer layout)
|
||||
{
|
||||
var actorNode = Editor.Instance.Scene.GetActorNode(actor);
|
||||
ValueContainer vc = new ValueContainer(ScriptMemberInfo.Null);
|
||||
vc.SetType(new ScriptType(actorNode.EditableObject.GetType()));
|
||||
vc.Add(actorNode.EditableObject);
|
||||
var editor = CustomEditorsUtil.CreateEditor(vc, null, false);
|
||||
editor.Initialize(presenter, layout, vc);
|
||||
var node = ProcessDiff(editor, false);
|
||||
layout.ClearLayout();
|
||||
foreach (var child in actor.Children)
|
||||
{
|
||||
var childNode = CreateDiffTree(child, presenter, layout);
|
||||
if (childNode == null)
|
||||
continue;
|
||||
if (node == null)
|
||||
node = CreateDiffNode(editor);
|
||||
node.AddChild(childNode);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
private void ViewChanges(Control target, Float2 targetLocation)
|
||||
{
|
||||
// Build a tree out of modified properties
|
||||
var rootNode = ProcessDiff(this, false);
|
||||
var thisActor = (Actor)Values[0];
|
||||
var rootActor = thisActor.IsPrefabRoot ? thisActor : thisActor.GetPrefabRoot();
|
||||
var presenter = new CustomEditorPresenter(null);
|
||||
var layout = new CustomElementsContainer<ContainerControl>();
|
||||
var rootNode = CreateDiffTree(rootActor, presenter, layout);
|
||||
|
||||
// Skip if no changes detected
|
||||
if (rootNode == null || rootNode.ChildrenCount == 0)
|
||||
if (rootNode == null)
|
||||
{
|
||||
var cm1 = new ContextMenu();
|
||||
cm1.AddButton("No changes detected");
|
||||
@@ -411,6 +505,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
Presenter.BuildLayoutOnUpdate();
|
||||
}
|
||||
|
||||
private static void GetAllPrefabObjects(List<object> objects, Actor actor)
|
||||
{
|
||||
objects.Add(actor);
|
||||
objects.AddRange(actor.Scripts);
|
||||
var children = actor.Children;
|
||||
foreach (var child in children)
|
||||
GetAllPrefabObjects(objects, child);
|
||||
}
|
||||
|
||||
private void OnDiffRevert(CustomEditor editor)
|
||||
{
|
||||
// Special case for removed Script from actor
|
||||
@@ -432,6 +535,22 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
return;
|
||||
}
|
||||
|
||||
// Special case for reverting removed Actors
|
||||
if (editor is RemovedActorDummy removedActor)
|
||||
{
|
||||
Editor.Log("Reverting removed actor changes to prefab (adding it)");
|
||||
|
||||
var parentActor = removedActor.ParentActor;
|
||||
var restored = parentActor.AddChild(removedActor.PrefabObject.GetType());
|
||||
var prefabId = parentActor.PrefabID;
|
||||
var prefabObjectId = removedActor.PrefabObject.PrefabObjectID;
|
||||
string data = JsonSerializer.Serialize(removedActor.PrefabObject);
|
||||
JsonSerializer.Deserialize(restored, data);
|
||||
Presenter.Owner.SceneContext.Spawn(restored, parentActor, removedActor.OrderInParent);
|
||||
Actor.Internal_LinkPrefab(FlaxEngine.Object.GetUnmanagedPtr(restored), ref prefabId, ref prefabObjectId);
|
||||
return;
|
||||
}
|
||||
|
||||
// Special case for new Script added to actor
|
||||
if (editor.Values[0] is Script script && !script.HasPrefabLink)
|
||||
{
|
||||
@@ -443,8 +562,37 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Special case for new Actor added to actor
|
||||
if (editor.Values[0] is Actor a && !a.HasPrefabLink)
|
||||
{
|
||||
Editor.Log("Reverting added actor changes to prefab (removing it)");
|
||||
|
||||
editor.RevertToReferenceValue();
|
||||
// TODO: Keep previous selection.
|
||||
var context = Presenter.Owner.SceneContext;
|
||||
context.Select(SceneGraph.SceneGraphFactory.FindNode(a.ID));
|
||||
context.DeleteSelection();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Presenter.Undo != null && Presenter.Undo.Enabled)
|
||||
{
|
||||
var thisActor = (Actor)Values[0];
|
||||
var rootActor = thisActor.IsPrefabRoot ? thisActor : thisActor.GetPrefabRoot();
|
||||
var prefabObjects = new List<object>();
|
||||
GetAllPrefabObjects(prefabObjects, rootActor);
|
||||
using (new UndoMultiBlock(Presenter.Undo, prefabObjects, "Revert to Prefab"))
|
||||
{
|
||||
editor.RevertToReferenceValue();
|
||||
editor.RefreshInternal();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
editor.RevertToReferenceValue();
|
||||
editor.RefreshInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
_infoLabel = playbackGroup.Label(string.Empty).Label;
|
||||
_infoLabel.AutoHeight = true;
|
||||
|
||||
var grid = playbackGroup.CustomContainer<UniformGridPanel>();
|
||||
var grid = playbackGroup.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = Button.DefaultHeight;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
var paintValue = new ReadOnlyValueContainer(new ScriptType(typeof(ClothPaintingGizmoMode)), _gizmoMode);
|
||||
paintGroup.Object(paintValue);
|
||||
{
|
||||
var grid = paintGroup.CustomContainer<UniformGridPanel>();
|
||||
var grid = paintGroup.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = Button.DefaultHeight;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEditor.Content.Settings;
|
||||
using FlaxEngine;
|
||||
@@ -16,6 +15,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
{
|
||||
private int _layersCount;
|
||||
private List<CheckBox> _checkBoxes;
|
||||
private VerticalPanel _upperRightCell;
|
||||
private VerticalPanel _bottomLeftCell;
|
||||
private UniformGridPanel _grid;
|
||||
private Border _horizontalHighlight;
|
||||
private Border _verticalHighlight;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DisplayStyle Style => DisplayStyle.InlineIntoParent;
|
||||
@@ -37,12 +41,29 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
Parent = panel,
|
||||
};
|
||||
|
||||
var style = FlaxEngine.GUI.Style.Current;
|
||||
_horizontalHighlight = new Border()
|
||||
{
|
||||
Parent = panel,
|
||||
BorderColor = style.Foreground,
|
||||
BorderWidth = 1.0f,
|
||||
Visible = false,
|
||||
};
|
||||
|
||||
_verticalHighlight = new Border()
|
||||
{
|
||||
Parent = panel,
|
||||
BorderColor = style.Foreground,
|
||||
BorderWidth = 1.0f,
|
||||
Visible = false,
|
||||
};
|
||||
|
||||
var upperLeftCell = new Label
|
||||
{
|
||||
Parent = gridPanel,
|
||||
};
|
||||
|
||||
var upperRightCell = new VerticalPanel
|
||||
_upperRightCell = new VerticalPanel
|
||||
{
|
||||
ClipChildren = false,
|
||||
Pivot = new Float2(0.00001f, 0.0f),
|
||||
@@ -54,7 +75,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
Parent = gridPanel,
|
||||
};
|
||||
|
||||
var bottomLeftCell = new VerticalPanel
|
||||
_bottomLeftCell = new VerticalPanel
|
||||
{
|
||||
Pivot = Float2.Zero,
|
||||
Spacing = 0,
|
||||
@@ -63,7 +84,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
Parent = gridPanel,
|
||||
};
|
||||
|
||||
var grid = new UniformGridPanel(0)
|
||||
_grid = new UniformGridPanel(0)
|
||||
{
|
||||
SlotsHorizontally = layersCount,
|
||||
SlotsVertically = layersCount,
|
||||
@@ -74,13 +95,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
int layerIndex = 0;
|
||||
for (; layerIndex < layerNames.Length; layerIndex++)
|
||||
{
|
||||
upperRightCell.AddChild(new Label
|
||||
_upperRightCell.AddChild(new Label
|
||||
{
|
||||
Height = labelsHeight,
|
||||
Text = layerNames[layerNames.Length - layerIndex - 1],
|
||||
HorizontalAlignment = TextAlignment.Near,
|
||||
});
|
||||
bottomLeftCell.AddChild(new Label
|
||||
_bottomLeftCell.AddChild(new Label
|
||||
{
|
||||
Height = labelsHeight,
|
||||
Text = layerNames[layerIndex],
|
||||
@@ -90,13 +111,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
for (; layerIndex < layersCount; layerIndex++)
|
||||
{
|
||||
string name = "Layer " + layerIndex;
|
||||
upperRightCell.AddChild(new Label
|
||||
_upperRightCell.AddChild(new Label
|
||||
{
|
||||
Height = labelsHeight,
|
||||
Text = name,
|
||||
HorizontalAlignment = TextAlignment.Near,
|
||||
});
|
||||
bottomLeftCell.AddChild(new Label
|
||||
_bottomLeftCell.AddChild(new Label
|
||||
{
|
||||
Height = labelsHeight,
|
||||
Text = name,
|
||||
@@ -118,7 +139,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
var box = new CheckBox(0, 0, true)
|
||||
{
|
||||
Tag = new Float2(_layersCount - column - 1, row),
|
||||
Parent = grid,
|
||||
Parent = _grid,
|
||||
Checked = GetBit(column, row),
|
||||
};
|
||||
box.StateChanged += OnCheckBoxChanged;
|
||||
@@ -126,7 +147,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
}
|
||||
for (; column < layersCount; column++)
|
||||
{
|
||||
grid.AddChild(new Label());
|
||||
_grid.AddChild(new Label());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,6 +162,18 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
/// <inheritdoc />
|
||||
public override void Refresh()
|
||||
{
|
||||
int selectedColumn = -1;
|
||||
int selectedRow = -1;
|
||||
var style = FlaxEngine.GUI.Style.Current;
|
||||
bool mouseOverGrid = _grid.IsMouseOver;
|
||||
|
||||
// Only hide highlights if mouse is not over the grid to reduce flickering
|
||||
if (!mouseOverGrid)
|
||||
{
|
||||
_horizontalHighlight.Visible = false;
|
||||
_verticalHighlight.Visible = false;
|
||||
}
|
||||
|
||||
// Sync check boxes
|
||||
for (int i = 0; i < _checkBoxes.Count; i++)
|
||||
{
|
||||
@@ -148,6 +181,39 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
int column = (int)((Float2)box.Tag).X;
|
||||
int row = (int)((Float2)box.Tag).Y;
|
||||
box.Checked = GetBit(column, row);
|
||||
|
||||
if (box.IsMouseOver)
|
||||
{
|
||||
selectedColumn = column;
|
||||
selectedRow = row;
|
||||
|
||||
_horizontalHighlight.X = _grid.X - _bottomLeftCell.Width;
|
||||
_horizontalHighlight.Y = _grid.Y + box.Y;
|
||||
_horizontalHighlight.Width = _bottomLeftCell.Width + box.Width + box.X;
|
||||
_horizontalHighlight.Height = box.Height;
|
||||
_horizontalHighlight.Visible = true;
|
||||
|
||||
_verticalHighlight.X = _grid.X + box.X;
|
||||
_verticalHighlight.Y = _grid.Y - _upperRightCell.Height;
|
||||
_verticalHighlight.Width = box.Width;
|
||||
_verticalHighlight.Height = _upperRightCell.Height + box.Height + box.Y;
|
||||
_verticalHighlight.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < _checkBoxes.Count; i++)
|
||||
{
|
||||
var box = _checkBoxes[i];
|
||||
int column = (int)((Float2)box.Tag).X;
|
||||
int row = (int)((Float2)box.Tag).Y;
|
||||
|
||||
if (!mouseOverGrid)
|
||||
box.ImageColor = style.BorderSelected;
|
||||
else if (selectedColumn > -1 && selectedRow > -1)
|
||||
{
|
||||
bool isRowOrColumn = column == selectedColumn || row == selectedRow;
|
||||
box.ImageColor = style.BorderSelected * (isRowOrColumn ? 1.2f : 0.75f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,12 +92,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
// Update add button
|
||||
var update = group.Button("Update").Button;
|
||||
group.Space(0);
|
||||
update.TooltipText = "Refreshes the dashboard statistics";
|
||||
update.Height = 16.0f;
|
||||
update.Clicked += RebuildLayout;
|
||||
|
||||
// New locale add button
|
||||
var addLocale = group.Button("Add Locale...").Button;
|
||||
group.Space(0);
|
||||
addLocale.TooltipText = "Shows a locale picker and creates new localization for it with not translated string tables";
|
||||
addLocale.Height = 16.0f;
|
||||
addLocale.ButtonClicked += delegate(Button button)
|
||||
@@ -167,12 +169,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
// Export button
|
||||
var exportLocalization = group.Button("Export...").Button;
|
||||
group.Space(0);
|
||||
exportLocalization.TooltipText = "Exports the localization strings into .pot file for translation";
|
||||
exportLocalization.Height = 16.0f;
|
||||
exportLocalization.Clicked += () => Export(tableEntries, allKeys);
|
||||
|
||||
// Find localized strings in code button
|
||||
var findStringsCode = group.Button("Find localized strings in code").Button;
|
||||
group.Space(0);
|
||||
findStringsCode.TooltipText = "Searches for localized string usage in inside a project source files";
|
||||
findStringsCode.Height = 16.0f;
|
||||
findStringsCode.Clicked += delegate
|
||||
|
||||
@@ -54,7 +54,8 @@ public class ModelPrefabEditor : GenericEditor
|
||||
}
|
||||
|
||||
// Creates the import path UI
|
||||
Utilities.Utils.CreateImportPathUI(layout, modelPrefab.ImportPath, false);
|
||||
var group = layout.Group("Import Path");
|
||||
Utilities.Utils.CreateImportPathUI(group, modelPrefab.ImportPath);
|
||||
|
||||
var button = layout.Button("Reimport", "Reimports the source asset as prefab.");
|
||||
_reimportButton = button.Button;
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
_infoLabel = playbackGroup.Label(string.Empty).Label;
|
||||
_infoLabel.AutoHeight = true;
|
||||
|
||||
var grid = playbackGroup.CustomContainer<UniformGridPanel>();
|
||||
var grid = playbackGroup.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = Button.DefaultHeight;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
if (ragdoll.Parent is AnimatedModel animatedModel && animatedModel.SkinnedModel)
|
||||
{
|
||||
// Builder
|
||||
var grid = editorGroup.CustomContainer<UniformGridPanel>();
|
||||
var grid = editorGroup.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = Button.DefaultHeight;
|
||||
@@ -53,7 +53,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
if (Presenter.Owner != null)
|
||||
{
|
||||
// Selection
|
||||
var grid = editorGroup.CustomContainer<UniformGridPanel>();
|
||||
var grid = editorGroup.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = Button.DefaultHeight;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection.Emit;
|
||||
using FlaxEditor.CustomEditors.GUI;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
@@ -93,8 +94,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
// Add info box
|
||||
if (IsSingleObject && Values[0] is RigidBody && Editor.IsPlayMode)
|
||||
{
|
||||
_infoLabel = layout.Label(string.Empty).Label;
|
||||
var group = layout.Group("Info");
|
||||
_infoLabel = group.Label(string.Empty).Label;
|
||||
_infoLabel.AutoHeight = true;
|
||||
_infoLabel.Margin = new Margin(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
_infoLabel = playbackGroup.Label(string.Empty).Label;
|
||||
_infoLabel.AutoHeight = true;
|
||||
|
||||
var grid = playbackGroup.CustomContainer<UniformGridPanel>();
|
||||
var grid = playbackGroup.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = Button.DefaultHeight;
|
||||
|
||||
@@ -682,7 +682,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
private CustomElementsContainer<UniformGridPanel> UniformGridTwoByOne(LayoutElementsContainer cont)
|
||||
{
|
||||
var grid = cont.CustomContainer<UniformGridPanel>();
|
||||
var grid = cont.UniformGrid();
|
||||
grid.CustomControl.SlotsHorizontally = 2;
|
||||
grid.CustomControl.SlotsVertically = 1;
|
||||
grid.CustomControl.SlotPadding = Margin.Zero;
|
||||
|
||||
@@ -41,13 +41,9 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
base.Initialize(layout);
|
||||
|
||||
|
||||
if (XElement.ValueBox.Parent is UniformGridPanel ug)
|
||||
{
|
||||
ug.Height += 2;
|
||||
ug.SlotSpacing = new Float2(4);
|
||||
ug.SlotPadding = new Margin(0, 0, 1, 1);
|
||||
}
|
||||
CheckLayout(ug);
|
||||
|
||||
// Override colors
|
||||
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
|
||||
@@ -75,11 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
base.Initialize(layout);
|
||||
|
||||
if (XElement.ValueBox.Parent is UniformGridPanel ug)
|
||||
{
|
||||
ug.Height += 2;
|
||||
ug.SlotSpacing = new Float2(4);
|
||||
ug.SlotPadding = new Margin(0, 0, 1, 1);
|
||||
}
|
||||
CheckLayout(ug);
|
||||
|
||||
// Override colors
|
||||
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
|
||||
@@ -114,7 +106,6 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
|
||||
_linkButton = new Button
|
||||
{
|
||||
BackgroundBrush = new SpriteBrush(Editor.Instance.Icons.Link32),
|
||||
Parent = LinkedLabel,
|
||||
Width = 18,
|
||||
Height = 18,
|
||||
@@ -136,13 +127,9 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
menu.AddButton("Link", ToggleLink).LinkTooltip("Links scale components for uniform scaling");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (XElement.ValueBox.Parent is UniformGridPanel ug)
|
||||
{
|
||||
ug.Height += 2;
|
||||
ug.SlotSpacing = new Float2(4);
|
||||
ug.SlotPadding = new Margin(0, 0, 1, 1);
|
||||
}
|
||||
CheckLayout(ug);
|
||||
|
||||
// Override colors
|
||||
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
|
||||
@@ -201,7 +188,16 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
_linkButton.SetColors(backgroundColor);
|
||||
_linkButton.BorderColor = _linkButton.BorderColorSelected = _linkButton.BorderColorHighlighted = Color.Transparent;
|
||||
_linkButton.TooltipText = LinkValues ? "Unlinks scale components from uniform scaling" : "Links scale components for uniform scaling";
|
||||
_linkButton.BackgroundBrush = new SpriteBrush(LinkValues ? Editor.Instance.Icons.Link32 : Editor.Instance.Icons.BrokenLink32);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CheckLayout(UniformGridPanel ug)
|
||||
{
|
||||
// Enlarge to fix border visibility
|
||||
ug.Height += 2;
|
||||
ug.SlotSpacing += new Float2(2);
|
||||
ug.SlotPadding += new Margin(0, 0, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,9 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
menu.ItemsContainer.RemoveChildren();
|
||||
|
||||
menu.AddButton("Copy", linkedEditor.Copy);
|
||||
var b = menu.AddButton("Paste", linkedEditor.Paste);
|
||||
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||
b = menu.AddButton("Paste", linkedEditor.Paste);
|
||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||
|
||||
menu.AddSeparator();
|
||||
@@ -404,8 +406,10 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
var menu = new ContextMenu();
|
||||
|
||||
menu.AddButton("Copy", linkedEditor.Copy);
|
||||
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||
var paste = menu.AddButton("Paste", linkedEditor.Paste);
|
||||
paste.Enabled = linkedEditor.CanPaste;
|
||||
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||
|
||||
if (_canReorder)
|
||||
{
|
||||
@@ -642,10 +646,10 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
if (_canResize && !_readOnly)
|
||||
{
|
||||
var panel = dragArea.HorizontalPanel();
|
||||
panel.Panel.Size = new Float2(0, 20);
|
||||
panel.Panel.Margin = new Margin(2);
|
||||
panel.Panel.Size = new Float2(0, 18);
|
||||
panel.Panel.Margin = new Margin(0, 0, Utilities.Constants.UIMargin, 0);
|
||||
|
||||
var removeButton = panel.Button("-", "Remove last item");
|
||||
var removeButton = panel.Button("-", "Remove the last item");
|
||||
removeButton.Button.Size = new Float2(16, 16);
|
||||
removeButton.Button.Enabled = size > _minCount;
|
||||
removeButton.Button.AnchorPreset = AnchorPresets.TopRight;
|
||||
@@ -656,7 +660,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
Resize(Count - 1);
|
||||
};
|
||||
|
||||
var addButton = panel.Button("+", "Add new item");
|
||||
var addButton = panel.Button("+", "Add a new item");
|
||||
addButton.Button.Size = new Float2(16, 16);
|
||||
addButton.Button.Enabled = (!NotNullItems || size > 0) && size < _maxCount;
|
||||
addButton.Button.AnchorPreset = AnchorPresets.TopRight;
|
||||
@@ -741,6 +745,34 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
cloned[srcIndex] = tmp;
|
||||
SetValue(cloned);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Duplicates the list item.
|
||||
/// </summary>
|
||||
/// <param name="index">The index to duplicate.</param>
|
||||
public void Duplicate(int index)
|
||||
{
|
||||
if (IsSetBlocked)
|
||||
return;
|
||||
|
||||
var count = Count;
|
||||
var newValues = Allocate(count + 1);
|
||||
var oldValues = (IList)Values[0];
|
||||
|
||||
for (int i = 0; i <= index; i++)
|
||||
{
|
||||
newValues[i] = oldValues[i];
|
||||
}
|
||||
|
||||
newValues[index + 1] = Utilities.Utils.CloneValue(oldValues[index]);
|
||||
|
||||
for (int i = index + 1; i < count; i++)
|
||||
{
|
||||
newValues[i + 1] = oldValues[i];
|
||||
}
|
||||
|
||||
SetValue(newValues);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shifts the specified item at the given index and moves it through the list to the other item. It supports undo.
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
float trackBallSize = 80.0f;
|
||||
float trackBallSize = 100f;
|
||||
float margin = 4.0f;
|
||||
|
||||
// Panel
|
||||
@@ -50,7 +50,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
|
||||
// Scale editor
|
||||
{
|
||||
var grid = masterPanel.CustomContainer<UniformGridPanel>();
|
||||
var grid = masterPanel.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.SlotPadding = new Margin(4, 2, 2, 2);
|
||||
gridControl.ClipChildren = false;
|
||||
|
||||
@@ -22,7 +22,7 @@ internal class UIControlRefPickerControl : FlaxObjectRefPickerControl
|
||||
/// <inheritdoc />
|
||||
protected override bool IsValid(Object obj)
|
||||
{
|
||||
return obj == null || (obj is UIControl control && control.Control.GetType() == ControlType);
|
||||
return obj == null || (obj is UIControl control && ControlType.IsAssignableFrom(control.Control.GetType()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
new OptionType("Texture 9-Slicing", typeof(Texture9SlicingBrush)),
|
||||
new OptionType("Sprite 9-Slicing", typeof(Sprite9SlicingBrush)),
|
||||
new OptionType("Video", typeof(VideoBrush)),
|
||||
new OptionType("UI Brush", typeof(UIBrush)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
public sealed class LocalizedStringEditor : GenericEditor
|
||||
{
|
||||
private TextBoxElement _idElement, _valueElement;
|
||||
private Button _viewStringButton;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DisplayStyle Style => DisplayStyle.Inline;
|
||||
@@ -70,6 +71,21 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
};
|
||||
addString.SetAnchorPreset(AnchorPresets.MiddleRight, false, true);
|
||||
addString.ButtonClicked += OnAddStringClicked;
|
||||
|
||||
var viewString = new Button
|
||||
{
|
||||
Visible = false,
|
||||
Width = 16.0f,
|
||||
BackgroundColor = Color.White,
|
||||
BackgroundColorHighlighted = Color.Gray,
|
||||
BackgroundBrush = new SpriteBrush(Editor.Instance.Icons.Search12),
|
||||
TooltipText = "Find localized text in Localized String Table asset for the current locale...",
|
||||
Parent = valueElement.TextBox,
|
||||
};
|
||||
viewString.SetAnchorPreset(AnchorPresets.MiddleRight, false, true);
|
||||
viewString.LocalX -= 16.0f;
|
||||
viewString.ButtonClicked += OnViewStringClicked;
|
||||
_viewStringButton = viewString;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -80,6 +96,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
if (_valueElement != null)
|
||||
{
|
||||
_valueElement.TextBox.WatermarkText = Localization.GetString(_idElement.Text);
|
||||
_viewStringButton.Visible = !string.IsNullOrEmpty(_valueElement.TextBox.WatermarkText);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,14 +109,21 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
_valueElement = null;
|
||||
}
|
||||
|
||||
private void OnSelectStringClicked(Button button)
|
||||
private bool GetSettings(out LocalizationSettings settings)
|
||||
{
|
||||
var settings = GameSettings.Load<LocalizationSettings>();
|
||||
settings = GameSettings.Load<LocalizationSettings>();
|
||||
if (settings?.LocalizedStringTables == null || settings.LocalizedStringTables.Length == 0)
|
||||
{
|
||||
MessageBox.Show("No valid localization settings setup.");
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void OnSelectStringClicked(Button button)
|
||||
{
|
||||
if (GetSettings(out var settings))
|
||||
return;
|
||||
Profiler.BeginEvent("LocalizedStringEditor.OnSelectStringClicked");
|
||||
var allKeys = new HashSet<string>();
|
||||
for (int i = 0; i < settings.LocalizedStringTables.Length; i++)
|
||||
@@ -136,6 +160,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
menu.Hide();
|
||||
_idElement.TextBox.SetTextAsUser(after[0].Text);
|
||||
_valueElement.TextBox.SetTextAsUser(string.Empty);
|
||||
}
|
||||
};
|
||||
searchBox.TextChanged += delegate
|
||||
@@ -158,12 +183,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
|
||||
private void OnAddStringClicked(Button button)
|
||||
{
|
||||
var settings = GameSettings.Load<LocalizationSettings>();
|
||||
if (settings?.LocalizedStringTables == null || settings.LocalizedStringTables.Length == 0)
|
||||
{
|
||||
MessageBox.Show("No valid localization settings setup.");
|
||||
if (GetSettings(out var settings))
|
||||
return;
|
||||
}
|
||||
Profiler.BeginEvent("LocalizedStringEditor.OnAddStringClicked");
|
||||
var allKeys = new HashSet<string>();
|
||||
for (int i = 0; i < settings.LocalizedStringTables.Length; i++)
|
||||
@@ -231,5 +252,30 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
_idElement.TextBox.SetTextAsUser(newKey);
|
||||
Profiler.EndEvent();
|
||||
}
|
||||
|
||||
private void OnViewStringClicked(Button button)
|
||||
{
|
||||
if (GetSettings(out var settings))
|
||||
return;
|
||||
var id = _idElement.TextBox.Text;
|
||||
var value = _valueElement.TextBox.WatermarkText;
|
||||
for (int i = 0; i < settings.LocalizedStringTables.Length; i++)
|
||||
{
|
||||
var table = settings.LocalizedStringTables[i];
|
||||
if (table && !table.WaitForLoaded())
|
||||
{
|
||||
var entries = table.Entries;
|
||||
if (entries.TryGetValue(id, out var messages))
|
||||
{
|
||||
if (messages.Length != 0 && messages[0] == value)
|
||||
{
|
||||
Editor.Instance.ContentEditing.Open(table);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MessageBox.Show("Unable to find localized string table.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
}
|
||||
|
||||
_element = layout.TextBox(isMultiLine);
|
||||
_defaultWatermarkColor = _element.TextBox.WatermarkTextColor;
|
||||
_watermarkColor = _defaultWatermarkColor = _element.TextBox.WatermarkTextColor;
|
||||
if (watermarkAttribute is WatermarkAttribute watermark)
|
||||
{
|
||||
_watermarkText = watermark.WatermarkText;
|
||||
|
||||
@@ -604,6 +604,9 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
root.SortChildrenRecursive();
|
||||
root.Expand(true);
|
||||
|
||||
if (Input.GetKey(KeyboardKeys.Shift))
|
||||
root.ExpandAll(true);
|
||||
|
||||
return menu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
@@ -131,7 +131,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
@@ -220,7 +220,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
@@ -469,7 +469,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
@@ -783,7 +783,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
@@ -163,7 +163,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
@@ -274,7 +274,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var grid = layout.CustomContainer<UniformGridPanel>();
|
||||
var grid = layout.UniformGrid();
|
||||
var gridControl = grid.CustomControl;
|
||||
gridControl.ClipChildren = false;
|
||||
gridControl.Height = TextBox.DefaultHeight;
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace FlaxEditor.CustomEditors.Elements
|
||||
ArrowImageClosed = new SpriteBrush(Style.Current.ArrowRight),
|
||||
ArrowImageOpened = new SpriteBrush(Style.Current.ArrowDown),
|
||||
EnableDropDownIcon = true,
|
||||
ItemsMargin = new Margin(7, 7, 3, 3),
|
||||
ItemsMargin = new Margin(Utilities.Constants.UIMargin),
|
||||
ItemsSpacing = Utilities.Constants.UIMargin,
|
||||
HeaderHeight = 18.0f,
|
||||
EnableContainmentLines = true,
|
||||
};
|
||||
|
||||
@@ -14,24 +14,21 @@ namespace FlaxEditor.CustomEditors.GUI
|
||||
public class PropertiesList : PanelWithMargins
|
||||
{
|
||||
// TODO: sync splitter for whole presenter
|
||||
|
||||
private const float SplitterPadding = 15;
|
||||
private const float EditorsMinWidthRatio = 0.4f;
|
||||
|
||||
/// <summary>
|
||||
/// The splitter size (in pixels).
|
||||
/// </summary>
|
||||
public const int SplitterSize = 2;
|
||||
|
||||
/// <summary>
|
||||
/// The splitter margin (in pixels).
|
||||
/// </summary>
|
||||
public const int SplitterMargin = 4;
|
||||
|
||||
private const int SplitterSizeHalf = SplitterSize / 2;
|
||||
|
||||
private PropertiesListElement _element;
|
||||
private float _splitterValue;
|
||||
private Rectangle _splitterRect;
|
||||
private bool _splitterClicked, _mouseOverSplitter;
|
||||
private bool _cursorChanged;
|
||||
private bool _hasCustomSplitterValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the splitter value (always in range [0; 1]).
|
||||
@@ -65,16 +62,38 @@ namespace FlaxEditor.CustomEditors.GUI
|
||||
/// <param name="element">The element.</param>
|
||||
public PropertiesList(PropertiesListElement element)
|
||||
{
|
||||
ClipChildren = false;
|
||||
_element = element;
|
||||
_splitterValue = 0.4f;
|
||||
BottomMargin = TopMargin = RightMargin = SplitterMargin;
|
||||
Margin = new Margin();
|
||||
Spacing = Utilities.Constants.UIMargin;
|
||||
UpdateSplitRect();
|
||||
}
|
||||
|
||||
private void AutoSizeSplitter()
|
||||
{
|
||||
if (_hasCustomSplitterValue || !Editor.Instance.Options.Options.Interface.AutoSizePropertiesPanelSplitter)
|
||||
return;
|
||||
|
||||
Font font = Style.Current.FontMedium;
|
||||
|
||||
float largestWidth = 0f;
|
||||
for (int i = 0; i < _element.Labels.Count; i++)
|
||||
{
|
||||
Label currentLabel = _element.Labels[i];
|
||||
Float2 dimensions = font.MeasureText(currentLabel.Text);
|
||||
float width = dimensions.X + currentLabel.Margin.Left + SplitterPadding;
|
||||
|
||||
largestWidth = Mathf.Max(largestWidth, width);
|
||||
}
|
||||
|
||||
SplitterValue = Mathf.Clamp(largestWidth / Width, 0, 1 - EditorsMinWidthRatio);
|
||||
}
|
||||
|
||||
private void UpdateSplitRect()
|
||||
{
|
||||
_splitterRect = new Rectangle(Mathf.Clamp(_splitterValue * Width - SplitterSizeHalf, 0.0f, Width), 0, SplitterSize, Height);
|
||||
LeftMargin = _splitterValue * Width + SplitterMargin;
|
||||
_splitterRect = new Rectangle(Mathf.Clamp(_splitterValue * Width - SplitterSize * 0.5f, 0.0f, Width), 0, SplitterSize, Height);
|
||||
LeftMargin = _splitterValue * Width + _spacing;
|
||||
}
|
||||
|
||||
private void StartTracking()
|
||||
@@ -127,6 +146,7 @@ namespace FlaxEditor.CustomEditors.GUI
|
||||
SplitterValue = location.X / Width;
|
||||
Cursor = CursorType.SizeWE;
|
||||
_cursorChanged = true;
|
||||
_hasCustomSplitterValue = true;
|
||||
}
|
||||
else if (_mouseOverSplitter)
|
||||
{
|
||||
@@ -200,6 +220,7 @@ namespace FlaxEditor.CustomEditors.GUI
|
||||
// Refresh
|
||||
UpdateSplitRect();
|
||||
PerformLayout(true);
|
||||
AutoSizeSplitter();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -222,23 +243,33 @@ namespace FlaxEditor.CustomEditors.GUI
|
||||
/// <inheritdoc />
|
||||
protected override void PerformLayoutAfterChildren()
|
||||
{
|
||||
// Sort controls from up to down into two columns: one for labels and one for the rest of the stuff
|
||||
|
||||
// Place non-label controls from top to down
|
||||
float y = _margin.Top;
|
||||
float w = Width - _margin.Width;
|
||||
bool firstItem = true;
|
||||
for (int i = 0; i < _children.Count; i++)
|
||||
{
|
||||
Control c = _children[i];
|
||||
if (!(c is PropertyNameLabel))
|
||||
{
|
||||
var h = c.Height;
|
||||
c.Bounds = new Rectangle(_margin.Left, y + _spacing, w, h);
|
||||
var rect = new Rectangle(_margin.Left, y, w, c.Height);
|
||||
if (c.Visible)
|
||||
{
|
||||
if (firstItem)
|
||||
firstItem = false;
|
||||
else
|
||||
rect.Y += _spacing;
|
||||
}
|
||||
else if (!firstItem)
|
||||
rect.Y += _spacing;
|
||||
c.Bounds = rect;
|
||||
if (c.Visible)
|
||||
y = c.Bottom;
|
||||
}
|
||||
}
|
||||
y += _margin.Bottom;
|
||||
|
||||
// Place labels accordingly to their respective controls placement
|
||||
float namesWidth = _splitterValue * Width;
|
||||
int count = _element.Labels.Count;
|
||||
float[] yStarts = new float[count + 1];
|
||||
@@ -271,7 +302,9 @@ namespace FlaxEditor.CustomEditors.GUI
|
||||
{
|
||||
var label = _element.Labels[i];
|
||||
|
||||
var rect = new Rectangle(0, yStarts[i] + 1, namesWidth, yStarts[i + 1] - yStarts[i] - 2);
|
||||
var rect = new Rectangle(0, yStarts[i], namesWidth, yStarts[i + 1] - yStarts[i]);
|
||||
if (i != count - 1)
|
||||
rect.Height -= _spacing;
|
||||
//label.Parent = this;
|
||||
label.Bounds = rect;
|
||||
}
|
||||
|
||||
@@ -202,6 +202,17 @@ namespace FlaxEditor.CustomEditors
|
||||
return element;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds new uniform grid control.
|
||||
/// </summary>
|
||||
/// <returns>The created element.</returns>
|
||||
public CustomElementsContainer<UniformGridPanel> UniformGrid()
|
||||
{
|
||||
var grid = CustomContainer<UniformGridPanel>();
|
||||
grid.CustomControl.SlotSpacing = new Float2(Utilities.Constants.UIMargin);
|
||||
return grid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds new custom element.
|
||||
/// </summary>
|
||||
@@ -276,10 +287,7 @@ namespace FlaxEditor.CustomEditors
|
||||
/// <returns>The created element.</returns>
|
||||
public ImageElement Image(SpriteHandle sprite)
|
||||
{
|
||||
var element = new ImageElement();
|
||||
element.Image.Brush = new SpriteBrush(sprite);
|
||||
OnAddElement(element);
|
||||
return element;
|
||||
return Image(new SpriteBrush(sprite));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -289,10 +297,7 @@ namespace FlaxEditor.CustomEditors
|
||||
/// <returns>The created element.</returns>
|
||||
public ImageElement Image(Texture texture)
|
||||
{
|
||||
var element = new ImageElement();
|
||||
element.Image.Brush = new TextureBrush(texture);
|
||||
OnAddElement(element);
|
||||
return element;
|
||||
return Image(new TextureBrush(texture));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -301,9 +306,19 @@ namespace FlaxEditor.CustomEditors
|
||||
/// <param name="texture">The GPU texture.</param>
|
||||
/// <returns>The created element.</returns>
|
||||
public ImageElement Image(GPUTexture texture)
|
||||
{
|
||||
return Image(new GPUTextureBrush(texture));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds brush image to the layout.
|
||||
/// </summary>
|
||||
/// <param name="brush">The brush.</param>
|
||||
/// <returns>The created element.</returns>
|
||||
public ImageElement Image(IBrush brush)
|
||||
{
|
||||
var element = new ImageElement();
|
||||
element.Image.Brush = new GPUTextureBrush(texture);
|
||||
element.Image.Brush = brush;
|
||||
OnAddElement(element);
|
||||
return element;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/ShadowsOfMordor/Builder.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Profiler/ProfilerMemory.h"
|
||||
#include "FlaxEngine.Gen.h"
|
||||
#if PLATFORM_LINUX
|
||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||
@@ -47,6 +48,7 @@ void Editor::CloseSplashScreen()
|
||||
|
||||
bool Editor::CheckProjectUpgrade()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
const auto versionFilePath = Globals::ProjectCacheFolder / TEXT("version");
|
||||
|
||||
// Load version cache file
|
||||
@@ -366,6 +368,8 @@ bool Editor::BackupProject()
|
||||
|
||||
int32 Editor::LoadProduct()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
|
||||
// Flax Editor product
|
||||
Globals::ProductName = TEXT("Flax Editor");
|
||||
Globals::CompanyName = TEXT("Flax");
|
||||
@@ -626,6 +630,7 @@ int32 Editor::LoadProduct()
|
||||
|
||||
Window* Editor::CreateMainWindow()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
Window* window = Managed->GetMainWindow();
|
||||
|
||||
#if PLATFORM_LINUX
|
||||
@@ -662,6 +667,7 @@ bool Editor::Init()
|
||||
return true;
|
||||
}
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(Editor);
|
||||
|
||||
// If during last lightmaps baking engine crashed we could try to restore the progress
|
||||
ShadowsOfMordor::Builder::Instance()->CheckIfRestoreState();
|
||||
@@ -693,11 +699,13 @@ bool Editor::Init()
|
||||
|
||||
void Editor::BeforeRun()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
Managed->BeforeRun();
|
||||
}
|
||||
|
||||
void Editor::BeforeExit()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
CloseSplashScreen();
|
||||
|
||||
Managed->Exit();
|
||||
@@ -708,6 +716,8 @@ void Editor::BeforeExit()
|
||||
|
||||
void EditorImpl::OnUpdate()
|
||||
{
|
||||
PROFILE_MEM(Editor);
|
||||
|
||||
// Update c# editor
|
||||
Editor::Managed->Update();
|
||||
|
||||
|
||||
@@ -528,7 +528,11 @@ namespace FlaxEditor
|
||||
var timeSinceLastSave = Time.UnscaledGameTime - _lastAutoSaveTimer;
|
||||
var timeToNextSave = options.AutoSaveFrequency * 60.0f - timeSinceLastSave;
|
||||
|
||||
if (timeToNextSave <= 0.0f || _autoSaveNow)
|
||||
if (timeToNextSave <= 0.0f && GetWindows().Any(x => x.GUI.Children.Any(c => c is GUI.ContextMenu.ContextMenuBase)))
|
||||
{
|
||||
// Skip aut-save if any context menu is opened to wait for user to end interaction
|
||||
}
|
||||
else if (timeToNextSave <= 0.0f || _autoSaveNow)
|
||||
{
|
||||
Log("Auto save");
|
||||
_lastAutoSaveTimer = Time.UnscaledGameTime;
|
||||
@@ -670,6 +674,8 @@ namespace FlaxEditor
|
||||
{
|
||||
FlaxEngine.Networking.NetworkManager.Stop(); // Shutdown any multiplayer from playmode
|
||||
PlayModeEnding?.Invoke();
|
||||
for (int i = 0; i < _modules.Count; i++)
|
||||
_modules[i].OnPlayEnding();
|
||||
}
|
||||
|
||||
internal void OnPlayEnd()
|
||||
@@ -1031,6 +1037,8 @@ namespace FlaxEditor
|
||||
{
|
||||
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
|
||||
BoundingSphere.FromBox(ref box, out sphere);
|
||||
if (sphere == BoundingSphere.Empty)
|
||||
sphere = new BoundingSphere(actor.Position, sphere.Radius);
|
||||
sphere.Radius = Math.Max(sphere.Radius, 15.0f);
|
||||
}
|
||||
else
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user