726 Commits

Author SHA1 Message Date
3d71b3c430 _mac python fix
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-12 20:58:01 +03:00
72dcb7d5dd _freetype 2025-10-12 20:58:01 +03:00
13bbaab1f3 _arm64 fix
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-12 20:02:42 +03:00
4e7889bb24 Update package requirements for Wayland
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-12 18:05:16 +03:00
96cc570e67 Add support for building dependencies with specific architecture
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-10-12 17:50:33 +03:00
e77f12904c Fix CMake compatibility errors with dependencies 2025-10-12 17:50:32 +03:00
b53b1340ad Support Visual Studio 2026 as a generator for CMake dependencies 2025-10-12 17:50:32 +03:00
3ea807468e Update SDL to 3.2.24 2025-10-12 17:18:39 +03:00
0f135597fa Merge remote-tracking branch 'origin/master' into sdl_platform 2025-10-12 11:18:28 +03:00
Wojtek Figat
8da0d2c4ce Merge branch 'xxSeys1-IndustryStandardSettingsShortcut' 2025-10-10 08:31:40 +02:00
Wojtek Figat
20f576783b Merge branch 'IndustryStandardSettingsShortcut' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-IndustryStandardSettingsShortcut 2025-10-10 08:31:32 +02:00
Wojtek Figat
ef2c551cee Fix build 2025-10-08 23:24:15 +02:00
Wojtek Figat
65cf59642c Fix changing Rigid Body center of mass offset
#2325 #3247
2025-10-08 22:16:46 +02:00
Wojtek Figat
e2fc8a6283 Add drawing RigidBody center of mass and attached colliders
#2325 #3247
2025-10-08 22:16:16 +02:00
Wojtek Figat
73976f3ed9 Fix box collider to properly draw small bounds 2025-10-08 22:08:34 +02:00
Wojtek Figat
7ab6bafe39 Fix crash when saving empty json string 2025-10-08 22:02:05 +02:00
Wojtek Figat
deb2ad7c8f Fix font hit test on multi-line text past the line end character
#3503
2025-10-08 16:36:34 +02:00
Wojtek Figat
cd7fc3242e Merge branch 'ZaPx64-ZaPx64-texture-asset-save-fix' 2025-10-08 09:14:59 +02:00
Wojtek Figat
31a0a77e7c Merge branch 'ZaPx64-texture-asset-save-fix' of https://github.com/ZaPx64/FlaxEngine into ZaPx64-ZaPx64-texture-asset-save-fix 2025-10-08 09:14:54 +02:00
Wojtek Figat
f0ec4a901a Merge branch 'xxSeys1-StraightenConnectionFix' 2025-10-08 09:13:45 +02:00
ZaPx64
3682159da6 Fix Save() failing on virtual texture asset 2025-10-05 09:20:54 +02:00
Saas
e9f83f77bb fix "Straighten Connections" to actually straighten all connections 2025-10-04 14:03:02 +02:00
Wojtek Figat
8f3b80492e Fix terrain physics error on end play when it's disabled
#3590 #3603
2025-10-03 22:30:44 +02:00
Wojtek Figat
c61c013517 Merge branch 'xxSeys1-StrokeMyEgo' 2025-10-03 22:22:11 +02:00
Wojtek Figat
a2170ffd8a Merge branch 'StrokeMyEgo' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-StrokeMyEgo 2025-10-03 22:22:07 +02:00
Wojtek Figat
4f1f77fb32 Simplify code of EditorViewport to access editor instance 2025-10-03 22:21:11 +02:00
Wojtek Figat
6ae370f8fc Fix camera cut flag in rendering to not trigger on origin change for smother visuals 2025-10-03 22:20:58 +02:00
Saas
da5c8555e5 add myself to list of Flax authors lol
Mafi said I should do this :)
2025-10-03 21:16:28 +02:00
Saas
c4c7ee941f add industry standard shortcut for editor settings 2025-10-03 14:46:43 +02:00
Wojtek Figat
4f45b3c1d0 Fix missing root motion copy when using input skeleton pose (eg. IK node)
#3445
2025-10-03 11:33:01 +02:00
Wojtek Figat
4c640b915f Fix CheckBox to display check state when created in game without editor icon atlas
#3705
2025-10-03 11:25:25 +02:00
Wojtek Figat
1f3f1ea67e Fix Blend Poses nodes to smoothly blend back when transition goes back
#3595
2025-10-03 10:52:01 +02:00
Wojtek Figat
60c19303f6 Fix duplicating splines with parents
#3531
2025-10-02 23:31:03 +02:00
Wojtek Figat
adcfc50218 Fix stack overflow exception in shader graph recursion to be detected
#3706
2025-10-02 20:49:50 +02:00
Wojtek Figat
9b812ec34a Fix BoundingFrustum::GetPlane in C++ to match C# version (and doc comment) 2025-10-02 18:48:32 +02:00
Wojtek Figat
7e1ac5e167 Fix sky rendering in ortho and oblique projection
#3448
2025-10-02 18:48:14 +02:00
Wojtek Figat
028b5fedec Use right-click only on GPUTextureEditor context menu 2025-09-30 23:37:15 +02:00
Wojtek Figat
9cc2c1da40 Fix terrain exporting to properly calculate size and sample positions
#3534
2025-09-30 22:58:08 +02:00
Wojtek Figat
5ed8564293 Merge branch 'xxSeys1-visjectPanOnNode' 2025-09-30 16:08:37 +02:00
Wojtek Figat
7c87ade12b Merge branch 'visjectPanOnNode' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-visjectPanOnNode 2025-09-30 15:51:17 +02:00
Wojtek Figat
7f87678282 Merge branch 'xxSeys1-IssueTemplateFix' 2025-09-30 15:49:18 +02:00
Wojtek Figat
e429d29d17 Merge branch 'IssueTemplateFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-IssueTemplateFix 2025-09-30 15:49:11 +02:00
Wojtek Figat
537d8b57ca Revert "Merge branch 'NoClearSearchboxesWhenStuffHappens' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoClearSearchboxesWhenStuffHappens"
This reverts commit 1186833b2d, reversing
changes made to bb180b0f59.

#3687 #3701
2025-09-26 22:25:49 +02:00
Saas
4a3fb41035 further fixes and make some stuff a bit nicer 2025-09-25 13:32:21 +02:00
Saas
797cb3c3f2 fix 1.10 becoming 1.1 and some spelling issue in issue template 2025-09-23 20:56:43 +02:00
Wojtek Figat
47670251ef Merge branch 'Tryibion-issue-template' 2025-09-23 17:21:34 +02:00
Wojtek Figat
cf1ef91246 Merge branch 'issue-template' of https://github.com/Tryibion/FlaxEngine into Tryibion-issue-template 2025-09-23 17:21:30 +02:00
Wojtek Figat
7060cb5696 Fix UI Brush editing in prefab regression from a471861e92
#3694
2025-09-23 17:20:18 +02:00
Wojtek Figat
c449833d35 Merge branch 'Tryibion-audio-events' 2025-09-23 17:07:22 +02:00
Wojtek Figat
284aeca51a Merge branch 'audio-events' of https://github.com/Tryibion/FlaxEngine into Tryibion-audio-events 2025-09-23 17:07:18 +02:00
Wojtek Figat
d8f7199c11 Fix importing emissive, roughness, metalness and wireframe properties of materials with Assimp
#3418
2025-09-23 15:42:49 +02:00
Wojtek Figat
dc05bbbbcd Merge branch 'IceReaper-feature/create_project' 2025-09-22 22:45:50 +02:00
Wojtek Figat
3fcc9ed01f Merge branch 'feature/create_project' of https://github.com/IceReaper/FlaxEngine into IceReaper-feature/create_project 2025-09-22 22:32:43 +02:00
Wojtek Figat
70ba750a5e Fix code #3511 2025-09-22 22:31:23 +02:00
Wojtek Figat
50271199ac Merge branch 'xxSeys1-moveVisjectConnection' 2025-09-22 22:30:32 +02:00
Wojtek Figat
d1a99c9396 Merge branch 'moveVisjectConnection' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-moveVisjectConnection
# Conflicts:
#	Source/Editor/Surface/VisjectSurface.cs
2025-09-22 22:30:26 +02:00
Chandler Cox
4ae3d57adc Resolve code suggestions 2025-09-22 11:32:24 -05:00
Wojtek Figat
99b9967806 Merge branch 'xxSeys1-ViewportIconsMoreCustomization' 2025-09-22 18:10:38 +02:00
Wojtek Figat
2f7e84253a Merge branch 'ViewportIconsMoreCustomization' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ViewportIconsMoreCustomization 2025-09-22 18:10:33 +02:00
Wojtek Figat
2f55cb938f Merge branch 'xxSeys1-commandSuggestionImprovements' 2025-09-22 18:08:30 +02:00
Wojtek Figat
a86661a855 Merge branch 'commandSuggestionImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-commandSuggestionImprovements 2025-09-22 18:06:55 +02:00
Wojtek Figat
a68ce6633a Merge branch 'Tryibion-vs-code-plugin-organize' 2025-09-22 18:02:52 +02:00
Wojtek Figat
5d57afe3aa Merge branch 'vs-code-plugin-organize' of https://github.com/Tryibion/FlaxEngine into Tryibion-vs-code-plugin-organize 2025-09-22 18:02:00 +02:00
Wojtek Figat
6705138247 Merge branch 'xxSeys1-SmallVehicleImprovements' 2025-09-22 16:18:17 +02:00
Wojtek Figat
276caf771c Merge branch 'SmallVehicleImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-SmallVehicleImprovements
# Conflicts:
#	Source/Engine/Physics/Actors/WheeledVehicle.h
2025-09-22 16:18:12 +02:00
Wojtek Figat
5eea5a72c9 Fix particle material compilation error when using position offset
#3661
2025-09-22 11:44:11 +02:00
Wojtek Figat
e9a7b1c8eb Fix using enums as Scene Animation Event parameters
#3554
2025-09-22 10:22:32 +02:00
Wojtek Figat
a151c78412 Fix loading projects that have similar path to engine folder
#3565
2025-09-22 08:42:16 +02:00
Wojtek Figat
5f1e905e8f Fix crash when importing model as prefab and handle duplicated object names
#3558
2025-09-21 22:52:57 +02:00
Wojtek Figat
a0f764a774 Add skybox rotation feature
#3592
2025-09-21 21:58:03 +02:00
Wojtek Figat
7da5ce3ed4 Merge branch 'xxSeys1-NoClearSearchboxesWhenStuffHappens' 2025-09-21 21:06:21 +02:00
Wojtek Figat
1186833b2d Merge branch 'NoClearSearchboxesWhenStuffHappens' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoClearSearchboxesWhenStuffHappens 2025-09-21 21:06:16 +02:00
Wojtek Figat
bb180b0f59 Merge branch 'Tryibion-fix-physics-attach-rigid' 2025-09-21 21:04:59 +02:00
Wojtek Figat
5d1c79929a Merge branch 'fix-physics-attach-rigid' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-physics-attach-rigid 2025-09-21 21:04:56 +02:00
Wojtek Figat
3f5a4cc4c9 Merge branch 'Tryibion-fix-dup&remove' 2025-09-21 21:02:22 +02:00
Wojtek Figat
62fd8ac967 Merge branch 'fix-dup&remove' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-dup&remove 2025-09-21 21:02:17 +02:00
Wojtek Figat
d904b92f2e Merge branch 'xxSeys1-LessCreateScriptItems' 2025-09-21 21:01:36 +02:00
Wojtek Figat
87e2b76ffa Merge branch 'LessCreateScriptItems' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-LessCreateScriptItems 2025-09-21 21:01:33 +02:00
Wojtek Figat
c5e11aed15 Merge branch 'xxSeys1-WidgetCreateFilterControlTypes' 2025-09-21 21:00:27 +02:00
Wojtek Figat
85d61b334b Merge branch 'WidgetCreateFilterControlTypes' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-WidgetCreateFilterControlTypes 2025-09-21 21:00:11 +02:00
Wojtek Figat
26e94f6f8e Refactor material instance to not override all public parameters by default (need explicit set)
#3444
2025-09-21 20:59:25 +02:00
Wojtek Figat
902744a0ce Fix model import scale on nodes that could be applied multiple times on the same mesh
#3562
2025-09-21 15:08:35 +02:00
Wojtek Figat
1c581bceaf Fix sun shadows when direction is perfectly vertical
#3614
2025-09-20 23:52:04 +02:00
Wojtek Figat
9cc44825c6 Update engine materials 92f4327fc2 2025-09-20 00:14:51 +02:00
Wojtek Figat
92f4327fc2 Fix missing volumetric fog affecting transparent materials
#3436
2025-09-20 00:13:52 +02:00
Wojtek Figat
47711ec5be Fix Volumetric Fog flicker on camera cuts
#3443
2025-09-19 23:10:03 +02:00
Chandler Cox
d1fbc66cb9 Fix not attaching updated collision data to rigid body. 2025-09-19 15:58:22 -05:00
Saas
7183a3306e fix typo 2025-09-19 16:57:50 +02:00
Saas
fd191f7ffb don't clear content panel folder- and scene tree search box on script reload and enter/ exit play 2025-09-18 23:24:10 +02:00
Saas
2604d58687 no more Linq 2025-09-18 17:37:04 +02:00
Chandler Cox
01d1d634c2 Fix other missing duplicate. 2025-09-16 17:43:55 -05:00
Chandler Cox
c7e403661d Dont allow remove and duplicate options for non-resizing collections. 2025-09-16 17:42:24 -05:00
Saas
1196db6d17 check if control is control meant for gui editor use 2025-09-16 22:54:57 +02:00
Saas
553a007508 Revert "hide TrackLabel control in editor"
This reverts commit 364a523375.
2025-09-16 22:14:22 +02:00
Saas
de2ee36529 fix naming lol 2025-09-16 22:07:42 +02:00
Saas
eea44ac897 remove search query highlights showing on create new script item 2025-09-16 22:06:49 +02:00
Saas
c124713e99 remove create new script items when searchbox is cleared 2025-09-16 22:05:28 +02:00
Saas
364a523375 hide TrackLabel control in editor 2025-09-16 22:04:24 +02:00
Wojtek Figat
afdd264e63 Fix compilation of Editor in Release mode 2025-09-16 16:34:58 +02:00
Wojtek Figat
8ec54f7b1c Merge branch 'cNori-Custom-editor-for-GPUTextures' 2025-09-16 00:16:10 +02:00
Wojtek Figat
521518bde4 Add hack to use GPUTextureEditor on ref pickers 2025-09-16 00:15:58 +02:00
Wojtek Figat
56077a268a SImplify and cleanup GPUTexture editor #3452 #3194 2025-09-16 00:15:48 +02:00
Wojtek Figat
a0ca000793 Merge branch 'Custom-editor-for-GPUTextures' of https://github.com/cNori/FlaxEngineFork into cNori-Custom-editor-for-GPUTextures 2025-09-15 18:08:02 +02:00
Wojtek Figat
ae4ae7a638 Fix rich textbox vertical alignment
#3502
2025-09-15 15:17:18 +02:00
Wojtek Figat
e2a4c8ab03 Merge branch 'Tryibion-fix-viewdistance-light' 2025-09-15 14:14:04 +02:00
Chandler Cox
7a40722964 Fix view distance light property from affecting brightness all of the time. 2025-09-14 17:51:27 -05:00
Wojtek Figat
1de8909d05 Merge branch 'Tryibion-prefab-viewport-scaling' 2025-09-14 23:59:45 +02:00
Wojtek Figat
9749487e24 Move prefab and game UI size context menu to shared UI Module
#3571
2025-09-14 23:59:40 +02:00
Wojtek Figat
55968a8ddc Merge branch 'prefab-viewport-scaling' of https://github.com/Tryibion/FlaxEngine into Tryibion-prefab-viewport-scaling 2025-09-14 23:11:59 +02:00
Wojtek Figat
e325b190ea Merge branch 'xxSeys1-disabledGizmoBrightness' 2025-09-14 22:01:18 +02:00
Wojtek Figat
ada6b9140f Minor adjustments for #3411 2025-09-14 22:00:57 +02:00
Wojtek Figat
5582579173 Merge branch 'disabledGizmoBrightness' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-disabledGizmoBrightness 2025-09-14 21:45:57 +02:00
Wojtek Figat
88773e71e5 Fix warning when cloning actor from prefab that is not a root
#3578
2025-09-14 14:25:19 +02:00
Wojtek Figat
9e1f488f22 Fix prefab window to use UI Mode for empty UI Control prefab
#3574
2025-09-13 14:41:11 +02:00
Wojtek Figat
a471861e92 Fix editing UI Brush in prefabs
#3501
2025-09-12 23:15:13 +02:00
Wojtek Figat
3d182c89f3 Add MaterialShader::BindParameters to usable in game scripts
#3668
2025-09-12 18:04:01 +02:00
Wojtek Figat
e3810a9938 Merge branch 'GoaLitiuM-vs2026' 2025-09-12 18:02:07 +02:00
f0dea9d528 Add support for Visual Studio 2026 and v145 MSVC toolset 2025-09-10 20:05:56 +03:00
d70a003617 Improve tab-less dock window behavior in other platforms
Add checks for #3215 to hide the tab bar only if it doesn't prevent
window dragging in Wayland sessions with native decorations.
2025-09-07 19:27:24 +03:00
b443b74d18 Merge branch 'master' into sdl_platform
# Conflicts:
#	Source/Editor/GUI/Docking/DockHintWindow.cs
#	Source/Editor/Options/InterfaceOptions.cs
2025-09-07 19:02:09 +03:00
Wojtek Figat
eff5f84185 Improve shadow maps sharing in nested scene rendering 2025-09-02 22:14:07 +02:00
Wojtek Figat
ad1163bccc Fix HashSet::Add returning incorrect value 2025-09-02 21:41:54 +02:00
Wojtek Figat
1042ad4e7d Fix object ids remapping inside nested prefabs
#3255
2025-09-02 21:41:36 +02:00
Wojtek Figat
8fdda1a71a Fix scene object reference serialization in C++ to use correct serializer
#3255
2025-08-30 23:52:54 +02:00
Wojtek Figat
3f7fe635d8 Fix 5222f1d35c for inactive preprocessor conditional block 2025-08-29 23:04:46 +02:00
Wojtek Figat
fcebc57ed0 Merge branch 'xxSeys1-addSphere' 2025-08-29 22:32:21 +02:00
Wojtek Figat
c40e447bb7 Merge branch 'addSphere' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-addSphere 2025-08-29 22:31:00 +02:00
Wojtek Figat
e6f94bb154 Merge branch 'fibref-textrender-scaling-fix' 2025-08-29 22:27:41 +02:00
Wojtek Figat
adbc546978 Merge branch 'textrender-scaling-fix' of https://github.com/fibref/FlaxEngine into fibref-textrender-scaling-fix 2025-08-29 22:26:32 +02:00
Wojtek Figat
2d171967e9 Merge branch 'Tryibion-collection-duplicate' 2025-08-29 22:24:58 +02:00
Wojtek Figat
33a0e6ac7d Merge branch 'collection-duplicate' of https://github.com/Tryibion/FlaxEngine into Tryibion-collection-duplicate 2025-08-29 22:24:09 +02:00
Wojtek Figat
848cc38bf1 Fix reverting prefab object reference in nested prefabs
#3255
2025-08-29 22:04:03 +02:00
Wojtek Figat
91cd1e8065 Fix regression from ef7c7f2d30 to ignore unmodified scripts in diff 2025-08-29 21:49:14 +02:00
Wojtek Figat
9fafb47abb Fix debug drawing wheeled vehicle in prefab viewport
#3591
2025-08-29 21:03:44 +02:00
Wojtek Figat
5222f1d35c Add support for parsing inheritance with preprocessor blocks inside it 2025-08-29 21:03:04 +02:00
Wojtek Figat
785649f9d5 Merge branch 'Tryibion-show-prefab-add-delete' 2025-08-28 23:48:33 +02:00
Wojtek Figat
d47ac95681 Modernize the code to use unified scene access #3513 2025-08-28 23:48:25 +02:00
Wojtek Figat
703e0cb7ca Merge branch 'show-prefab-add-delete' of https://github.com/Tryibion/FlaxEngine into Tryibion-show-prefab-add-delete 2025-08-28 22:56:22 +02:00
Wojtek Figat
ef7c7f2d30 Fix script fields prefab diff showing and reverting with undo
#3594
2025-08-28 22:52:46 +02:00
Wojtek Figat
f3d375e356 Fix prefab root name and transform being changed when applying local changes of sub-object
#3235
2025-08-28 22:26:50 +02:00
frank
a3073321cf fix scaling for TextRender 2025-08-28 17:24:06 +08:00
Chandler Cox
824b49dd88 Better duplication of collection. 2025-08-26 20:25:02 -05:00
Wojtek Figat
d0e7bff03a Merge branch 'Tryibion-add-collision-v&t' 2025-08-26 18:05:46 +02:00
Wojtek Figat
d314d5b324 Format memory usage to human-readable format
#3495
2025-08-26 18:05:42 +02:00
Wojtek Figat
a027ed3b63 Merge branch 'add-collision-v&t' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-collision-v&t 2025-08-26 17:57:01 +02:00
Wojtek Figat
bcedb05a2c Fix regression from 6a8553a277 on local lights 2025-08-26 17:55:32 +02:00
Wojtek Figat
b36be95947 Fix Editor undo on collection properties that return different object on get
#3256
2025-08-26 14:59:10 +02:00
Wojtek Figat
4ca399af71 Add model import options auto-restore from model prefab 2025-08-25 23:15:37 +02:00
Wojtek Figat
c1f022520d Update ReSharper settings 2025-08-25 22:15:44 +02:00
Wojtek Figat
2efd20f223 Merge branch 'xxSeys1-ToolboxSearchFilterAndControls' 2025-08-25 22:15:08 +02:00
Wojtek Figat
00dd432fbc Simplify code #3360 2025-08-25 22:15:00 +02:00
Wojtek Figat
f707508d70 Merge branch 'ToolboxSearchFilterAndControls' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ToolboxSearchFilterAndControls 2025-08-25 14:49:00 +02:00
Wojtek Figat
b965ca6c8c Fix Content Window navigation bar to expand toolstrip for proper scroll bar display
#3326
2025-08-25 14:38:55 +02:00
Wojtek Figat
6fea9eefaa Merge branch 'xxSeys1-BrokenLink' 2025-08-24 21:11:39 +02:00
Wojtek Figat
47caa6af28 Add BrokenLink32/BrokenLink64 icons
#3218
2025-08-24 21:11:32 +02:00
Wojtek Figat
9aedb37ac2 Merge branch 'BrokenLink' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-BrokenLink 2025-08-24 21:10:26 +02:00
Wojtek Figat
e4bc2c69c7 Merge branch 'Zode-customeditorwindow-expose-constructor' 2025-08-24 14:00:20 +02:00
Wojtek Figat
6db9265112 Merge branch 'customeditorwindow-expose-constructor' of https://github.com/Zode/FlaxEngine into Zode-customeditorwindow-expose-constructor 2025-08-24 14:00:13 +02:00
Wojtek Figat
21a84c5b84 Merge branch 'xxSeys1-AutoSizePropertiesSplitter' 2025-08-24 13:59:20 +02:00
Wojtek Figat
633b5857c9 Merge branch 'AutoSizePropertiesSplitter' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-AutoSizePropertiesSplitter 2025-08-24 13:59:16 +02:00
Wojtek Figat
9f9dac1543 Merge branch 'Tryibion-layer-methods' 2025-08-24 13:46:56 +02:00
Wojtek Figat
df6f8fd8ae Codestyle adjustments #3343 2025-08-24 13:46:53 +02:00
Wojtek Figat
4bd8ce37ac Merge branch 'layer-methods' of https://github.com/Tryibion/FlaxEngine into Tryibion-layer-methods 2025-08-24 13:43:35 +02:00
Wojtek Figat
40e204839f Merge branch 'Tryibion-splash-image' 2025-08-24 13:37:55 +02:00
Wojtek Figat
d6c75b3f86 Simplify code in #3119 2025-08-24 13:37:48 +02:00
Wojtek Figat
687c283533 Merge branch 'splash-image' of https://github.com/Tryibion/FlaxEngine into Tryibion-splash-image 2025-08-24 13:24:35 +02:00
Wojtek Figat
70ee8501a5 Merge branch 'xxSeys1-TabHeight' 2025-08-24 13:21:15 +02:00
Wojtek Figat
2c34bd2308 Merge branch 'TabHeight' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-TabHeight 2025-08-24 13:21:12 +02:00
fc341a86e7 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-08-24 09:44:28 +03:00
Wojtek Figat
5023e3277b Merge branch 'Swiggies-animated-model-additions' 2025-08-22 23:04:00 +02:00
Wojtek Figat
9003d855b3 Merge branch 'animated-model-additions' of https://github.com/Swiggies/FlaxEngine into Swiggies-animated-model-additions 2025-08-22 23:03:54 +02:00
Wojtek Figat
75906719d4 Merge branch 'xxSeys1-SimplifyListCtrlScrolling' 2025-08-22 22:34:09 +02:00
Wojtek Figat
9a59925a36 Merge branch 'SimplifyListCtrlScrolling' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-SimplifyListCtrlScrolling 2025-08-22 22:34:05 +02:00
Wojtek Figat
d5ca80c2c1 Merge branch 'Tryibion-fix-particle-effect-params-overide-update' 2025-08-22 22:31:12 +02:00
Wojtek Figat
cb07ee77aa Change #3588 to be editor-only 2025-08-22 22:31:08 +02:00
Wojtek Figat
680783f2b0 Merge branch 'fix-particle-effect-params-overide-update' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-particle-effect-params-overide-update 2025-08-22 22:29:59 +02:00
Zode
4a28b4bd6c Expose hideOnClose and scrollBars in constructor for CustomEditorWindows. 2025-08-22 01:26:34 +03:00
Wojtek Figat
4bf36f3467 Merge branch 'Tryibion-shift-select-nodes' 2025-08-19 23:00:43 +02:00
Wojtek Figat
2c1713d300 Fix rare issues with shift tree selection 2025-08-19 23:00:29 +02:00
Wojtek Figat
8136691914 Merge branch 'shift-select-nodes' of https://github.com/Tryibion/FlaxEngine into Tryibion-shift-select-nodes
# Conflicts:
#	Source/Editor/GUI/Tree/Tree.cs
2025-08-19 18:45:33 +02:00
Wojtek Figat
da23e287c0 Merge branch 'Tryibion-cookandrun-buildconfig' 2025-08-19 18:22:49 +02:00
Wojtek Figat
e0825d870d Merge branch 'cookandrun-buildconfig' of https://github.com/Tryibion/FlaxEngine into Tryibion-cookandrun-buildconfig 2025-08-19 18:22:44 +02:00
Wojtek Figat
86dbe6b93d Merge branch 'Tryibion-add-gamewin-audio-events' 2025-08-19 18:21:42 +02:00
Wojtek Figat
e71b74c625 Merge branch 'add-gamewin-audio-events' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-gamewin-audio-events 2025-08-19 18:21:32 +02:00
Wojtek Figat
45f6ef29e9 Merge branch 'xxSeys1-MoreSearchableCM' 2025-08-19 18:20:04 +02:00
Wojtek Figat
0fabca19cd Merge branch 'MoreSearchableCM' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-MoreSearchableCM 2025-08-19 18:20:01 +02:00
Wojtek Figat
0bc242c738 Merge branch 'MrCapy0-Color-Gradient-Node' 2025-08-19 13:22:34 +02:00
Wojtek Figat
8c548ceff2 Merge branch 'Color-Gradient-Node' of https://github.com/MrCapy0/FlaxEngine into MrCapy0-Color-Gradient-Node 2025-08-19 13:21:32 +02:00
Wojtek Figat
46fda05000 Merge branch 'xxSeys1-VjStraightenConnections' 2025-08-19 13:20:44 +02:00
Wojtek Figat
1fee95be1c Merge branch 'VjStraightenConnections' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-VjStraightenConnections 2025-08-19 13:20:41 +02:00
Wojtek Figat
8c66ae99a3 Merge branch 'Tryibion-initial-nuget' 2025-08-19 13:18:54 +02:00
Wojtek Figat
1cf98e2188 Merge branch 'initial-nuget' of https://github.com/Tryibion/FlaxEngine into Tryibion-initial-nuget 2025-08-19 13:18:51 +02:00
Wojtek Figat
6a8553a277 Fix incorrect Lambert Diffuse shadowing to use just N dot L for accurate lighting
#3615 #3616
2025-08-18 11:03:50 +02:00
Chandler Cox
a02b7d4a1a Add events for when audio settings are changed for the game window. 2025-08-17 11:58:42 -05:00
Wojtek Figat
606dfa4e2e Merge branch 'Tryibion-add-ctor-matbrush-inst' 2025-08-15 14:41:08 +02:00
Wojtek Figat
b6f853a01c Merge branch 'add-ctor-matbrush-inst' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-ctor-matbrush-inst 2025-08-15 14:41:05 +02:00
Wojtek Figat
fc2112ec93 Fix SSAO artifacts with "flat normals" look
#3617
2025-08-15 14:34:02 +02:00
Wojtek Figat
6ccfbfeff1 Fix saving skinned models with blend shapes
#3612
2025-08-15 14:20:16 +02:00
Wojtek Figat
f21accd466 Fix crash when memory stream reading fails and perform soft error handling
#3612
2025-08-15 14:19:59 +02:00
Chandler Cox
38b4ace1a8 Use material base as ctor parameter. 2025-08-15 07:01:48 -05:00
Wojtek Figat
774b6bd72c Update engine materials 2025-08-15 13:09:05 +02:00
Wojtek Figat
9c4606fefc Merge branch 'GoaLitiuM-linux_hotreload_cleanup_fix' 2025-08-14 22:47:05 +02:00
Wojtek Figat
0e50e47cce Merge branch 'linux_hotreload_cleanup_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-linux_hotreload_cleanup_fix 2025-08-14 22:46:45 +02:00
Wojtek Figat
285fa870d0 Merge branch 'Tryibion-fix-anim-event-backwards' 2025-08-14 22:41:24 +02:00
Wojtek Figat
69ed0bf56f Merge branch 'fix-anim-event-backwards' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-anim-event-backwards 2025-08-14 22:41:20 +02:00
Wojtek Figat
237b9bccd5 Merge branch 'xxSeys1-PauseOnErrorInfo' 2025-08-14 22:23:39 +02:00
Wojtek Figat
f5fd7319e1 Merge branch 'PauseOnErrorInfo' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-PauseOnErrorInfo
# Conflicts:
#	Source/Editor/Windows/DebugLogWindow.cs
2025-08-14 22:23:32 +02:00
Wojtek Figat
e04c0c4ace Merge branch 'Tryibion-fix-not-finised-tag-richtextbox' 2025-08-14 22:21:31 +02:00
Wojtek Figat
f6d0b073da Merge branch 'fix-not-finised-tag-richtextbox' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-not-finised-tag-richtextbox 2025-08-14 22:21:27 +02:00
Wojtek Figat
68a7cf4f18 Merge branch 'Tryibion-make-empty-stringview-const' 2025-08-14 22:15:58 +02:00
Wojtek Figat
a91360529f Merge branch 'make-empty-stringview-const' of https://github.com/Tryibion/FlaxEngine into Tryibion-make-empty-stringview-const 2025-08-14 22:15:53 +02:00
Wojtek Figat
bf9ca14deb Fix sampling textures in decals to use custom mip-level
#3599
2025-08-14 22:14:03 +02:00
Wojtek Figat
cb92a2b8cb Optimize decals rendering with depth test
#3599
2025-08-14 13:04:57 +02:00
Wojtek Figat
8a73d79936 Update engine materials 2025-08-14 12:24:12 +02:00
Wojtek Figat
2f7d7a0f2a Allow pasting State nodes in Anim Graph
#3596
2025-08-14 12:24:02 +02:00
Wojtek Figat
d43c0c593f Merge branch 'Tryibion-add-scaled-time-node' 2025-08-14 11:54:34 +02:00
Wojtek Figat
1087bd2445 Fix #3342 to properly place new param in Constant Buffer
#3299
2025-08-14 11:53:25 +02:00
Wojtek Figat
5e19a9729b Merge branch 'add-scaled-time-node' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-scaled-time-node 2025-08-14 11:37:09 +02:00
Wojtek Figat
69e12d77be Add preventing autosave when using editor context menus
#3220
2025-08-13 23:25:57 +02:00
Saas
169d3e964d Switch from Debug.Write to Editor.Log 2025-08-13 13:29:13 +02:00
Chandler Cox
cf503cf921 Add material instance ctor for MaterialBrush 2025-08-12 21:03:35 -05:00
Wojtek Figat
6fd4ef735e Add InvokeOnUpdate to C++ scripting api 2025-08-12 23:35:12 +02:00
Wojtek Figat
303087c4c4 Fix regression in renaming textbox placement of newly added actor to prefab 2025-08-12 23:18:18 +02:00
68da28ffe8 Update SDL to 3.2.20 2025-08-12 15:39:19 +03:00
Wojtek Figat
427e76e76e Update volk to version 1.4.304 2025-08-12 15:24:48 +03:00
b183b5bcfc Merge remote-tracking branch 'origin/master' into sdl_platform 2025-08-12 15:22:34 +03:00
Chandler Cox
e27880c1e6 Make plugins into their own folders in VSCode. Order VSCode plugin folders with Engine at the bottom. 2025-08-02 09:28:49 -05:00
Chandler Cox
6f15ef7690 Fix location of clip start call. 2025-08-01 15:15:54 -05:00
Chandler Cox
0e3a22faa0 Fix spelling in comment. 2025-08-01 15:11:06 -05:00
Chandler Cox
0dc1e04c89 Add slider to audio debug editor for selecting time. 2025-08-01 15:07:49 -05:00
Chandler Cox
5c7712daad Add audio clip started and finished events to audio source 2025-08-01 15:07:25 -05:00
Wojtek Figat
f37b75df7b Add support for using shadow maps from linked scene rendering (eg. for 1p weapons) 2025-07-25 19:59:58 +02:00
Wojtek Figat
6132e45e25 Fix shadow lights checking loop if shadows are disabled 2025-07-25 16:00:44 +02:00
Chandler Cox
753035c452 Fix issue with infinite loop if \ is used instead of / for tag closing. 2025-07-24 18:04:39 -05:00
Chandler Cox
2dc44ac1a6 Fix infinite loop on rich text box tag parsing with incomplete end of tag. 2025-07-23 19:52:42 -05:00
Chandler Cox
d6a33d5a1c Add const to String::Empty 2025-07-23 10:23:30 -05:00
Chandler Cox
6cbd40e6d8 Make StringView::Empty const to fix issues with user accidentally changing the value. 2025-07-22 22:01:55 -05:00
Chandler Cox
b8e00f2ed1 Change checking max to use ceiltoint 2025-07-19 21:30:49 -05:00
Chandler Cox
b6e18ccae5 Fix edge case for anim event on min or max frame when looping. Fix anim event playback when is running negative. 2025-07-19 21:05:57 -05:00
Chandler Cox
1fb6586dff Add collection item duplication. 2025-07-19 16:09:33 -05:00
Chandler Cox
e6265105b5 Move to interface options. 2025-07-19 15:39:11 -05:00
Olly Rybak
f8dadac453 Fixed up some names and added docs 2025-07-19 22:37:35 +10:00
Chandler Cox
fc46219a82 Add support for multi-select disable. 2025-07-17 23:09:36 -05:00
Chandler Cox
2546e19d65 Add shift selection for tree nodes 2025-07-17 23:07:06 -05:00
Wojtek Figat
bb37f980ed Fix regression in debug draw from 4af26a5516 2025-07-14 20:25:49 +02:00
Wojtek Figat
10e9aee8ce Add particle data layout debugger tab 2025-07-14 10:28:43 +02:00
Wojtek Figat
4af26a5516 SImplify editor code for actors debug shapes drawing 2025-07-11 23:00:53 +02:00
Wojtek Figat
3e82e550f3 Add option for debug shapes drawing for particle emitters
#3267
2025-07-11 23:00:41 +02:00
Saas
33b540ed9e fix naming and treat unfolded category items as normal items 2025-07-10 20:07:52 +02:00
Saas
50871d8885 simplify and fix edge case in item list scrolling while holding control 2025-07-09 18:41:41 +02:00
xxSeys1
83374164db haha I did not copy paste that comment 2025-07-06 21:31:26 +02:00
xxSeys1
c5bfc6bc3d add option to add sphere in add colliders menu 2025-07-06 21:28:01 +02:00
Chandler Cox
d698bf96cc Apply particle effect parameter overrides when emitter is changed and when activated in the tree. 2025-07-05 19:36:45 -05:00
Chandler Cox
b3f88e156c Small change to out variable that is not used anymore. 2025-07-05 18:11:26 -05:00
Chandler Cox
7418d60f24 Add editor option for build configuration when using cook and run. 2025-07-05 18:09:30 -05:00
MrCapy0
3981d5090c change color gradiant node 8 to 11 stops 2025-07-05 10:27:45 -04:00
Wojtek Figat
0bc595f16f Disable terarin normals smoothening 2025-07-04 12:04:36 +02:00
Wojtek Figat
7abed93972 Optimize terrain heightmap decoding to use shared code 2025-07-04 11:31:27 +02:00
51feaa0730 Release mouse relative mode when focus changes during mouse tracking
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-07-03 23:21:42 +03:00
8e69aa8bd6 Fix error while closing Editor
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-07-03 22:57:07 +03:00
90b2fded48 Merge remote-tracking branch 'origin/master' into sdl_platform
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
# Conflicts:
#	Source/Editor/Windows/SceneTreeWindow.cs
2025-07-03 22:05:29 +03:00
9125ffeb9e Update third-party label in About dialog 2025-07-03 22:02:37 +03:00
28980e5fbf Cleanup 2025-07-03 22:02:36 +03:00
aab0d772a4 Implement client-side window decorations for Editor windows 2025-07-03 22:02:36 +03:00
Wojtek Figat
4b10d7057a Fix crash when using material instance that has more parameters that base due to material error 2025-07-03 20:33:14 +02:00
Wojtek Figat
85aed8c4d7 Fix using material VS to PS node directly within material input 2025-07-03 20:32:41 +02:00
Wojtek Figat
da08be42b4 Fix deadlock in Debug builds on object dtor 2025-07-03 20:32:12 +02:00
a93a940630 Fix hot-reload files not getting cleaned up during startup
Implements minimal required filter support for `FileSystem::DirectoryGetFiles`
in order to support removing hot-reload files on Linux/Apple systems.
2025-07-03 19:41:43 +03:00
3e353db1fa Refactor UnixFileSystem 2025-07-03 19:41:43 +03:00
Wojtek Figat
056fea9a8c Fix forward shading compilation when using fog inside unlit material 2025-07-03 14:48:38 +02:00
Wojtek Figat
7f783bb7da Fix crash when importing mesh with incorrect triangulation 2025-07-02 17:23:04 +02:00
Wojtek Figat
b08f218f30 Merge branch 'Zode-tageditor-quickexpand' 2025-07-01 16:47:07 +02:00
Wojtek Figat
c6640be04a Merge branch 'tageditor-quickexpand' of https://github.com/Zode/FlaxEngine into Zode-tageditor-quickexpand 2025-07-01 16:47:04 +02:00
Wojtek Figat
eff3c50d9c Merge branch 'xxSeys1-ContentSearchMouseOverFocusFix' 2025-07-01 16:34:42 +02:00
Wojtek Figat
3fa099ad06 Merge branch 'ContentSearchMouseOverFocusFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ContentSearchMouseOverFocusFix 2025-07-01 16:27:08 +02:00
Wojtek Figat
5e47a861f3 Merge branch 'xxSeys1-VisjectConnectionCmPolish' 2025-07-01 16:06:22 +02:00
Wojtek Figat
37b4b25ead Merge branch 'VisjectConnectionCmPolish' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-VisjectConnectionCmPolish 2025-07-01 16:06:13 +02:00
Wojtek Figat
edfd145226 Merge branch 'xxSeys1-FixCloseButtonAfterIBrokeIt' 2025-07-01 15:58:46 +02:00
Wojtek Figat
763ede4bd9 Merge branch 'FixCloseButtonAfterIBrokeIt' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-FixCloseButtonAfterIBrokeIt 2025-07-01 15:58:36 +02:00
Wojtek Figat
284da341e1 Merge branch 'xxSeys1-ItemsListExpandOnNavigate' 2025-07-01 15:56:53 +02:00
Wojtek Figat
53ed2431b5 Merge branch 'ItemsListExpandOnNavigate' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ItemsListExpandOnNavigate 2025-07-01 15:48:24 +02:00
Wojtek Figat
b4ab39b3bf Merge branch 'Tryibion-keep-scroll-scene-play' 2025-07-01 15:34:27 +02:00
Wojtek Figat
de61e3efb5 Merge branch 'keep-scroll-scene-play' of https://github.com/Tryibion/FlaxEngine into Tryibion-keep-scroll-scene-play 2025-07-01 15:34:07 +02:00
Wojtek Figat
29fb36fcd6 Merge branch 'Tryibion-fix-log-clear-play' 2025-07-01 10:52:39 +02:00
Wojtek Figat
78f0ff75f2 Move debug log clearing to handle pending entries too in publci api 2025-07-01 10:52:14 +02:00
Wojtek Figat
6efd456eaf Merge branch 'fix-log-clear-play' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-log-clear-play 2025-07-01 10:50:58 +02:00
Wojtek Figat
e0c96c0cde Merge branch 'Tryibion-fix-tooltip-scene' 2025-07-01 10:48:34 +02:00
Wojtek Figat
ada269568a Merge branch 'fix-tooltip-scene' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-tooltip-scene 2025-07-01 10:48:26 +02:00
Wojtek Figat
dd256ad518 Fix typo 2025-07-01 10:37:39 +02:00
Wojtek Figat
12c8bb4f31 Fix scene lightmaps removal clearing actors linkage to lightmaps 2025-07-01 08:27:29 +02:00
Wojtek Figat
4e4d380267 Fix fog to draw Fog Cutoff Distance via a plane, not sphere test
Add support for negative Fog Cutoff Distance on fog to draw it in front of the camera Far Plane, no matter the setup.
Fix hot-reloading Fog shader in Editor.
2025-06-29 20:02:54 +02:00
xxSeys1
75647d149a make visual script editor method override cm searchable 2025-06-28 19:40:03 +02:00
Chandler Cox
52b64540ab Add extra index guard logic 2025-06-28 10:46:11 -05:00
xxSeys1
d7ab497b0e fix adding empty multi action to undo stack 2025-06-28 16:22:29 +02:00
xxSeys1
683a48a6e3 add default shortcuts to distribute node options 2025-06-28 16:02:44 +02:00
xxSeys1
a41fc51f92 add visject node formatting option to straighten node connections
Also fixes a bunch of missing trailing "." in doc comments and changes "Node editors" category in the input options to "Node Editors" to match the case of all other categories.
2025-06-28 15:53:32 +02:00
Chandler Cox
b9cfd054c1 Remove unused variable 2025-06-27 21:38:10 -05:00
Chandler Cox
53d4ea51af Add prefab UI viewport scaling. 2025-06-27 21:18:53 -05:00
6296e1a9eb Fix linker errors 2025-06-26 15:32:38 +03:00
1586bb0702 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-26 15:31:59 +03:00
xxSeys1
bf10d0949e add a bit of spacing to the left edge of the popup to reduce colors bleeding into the background 2025-06-26 12:47:31 +02:00
edeaf6af09 Fix compilation without SDL 2025-06-24 22:57:49 +03:00
Wojtek Figat
dbd8297612 Add SortOrder to Environment Probe 2025-06-24 19:25:18 +02:00
Wojtek Figat
8d62a13cbc Add LayoutElementsContainer.Image with IBrush 2025-06-24 18:32:20 +02:00
951edd95db Cleanup 2025-06-24 16:47:45 +03:00
9951211596 Fix mono glib.h wrapper compilation error 2025-06-24 16:47:20 +03:00
6d337464f7 Support XDG Desktop Portal as color picker provider
Wayland and XWayland fallback implementation uses XDP in
order to query picked color from desktop.
2025-06-24 16:41:32 +03:00
Wojtek Figat
5a05038a9b Add new UIBrush that uses UIBrushAsset json resource with a brush data 2025-06-24 13:08:25 +02:00
xxSeys1
109d4423bb add accent color strip to search item icons 2025-06-23 20:14:18 +02:00
d0b552d74a Use logo as an icon in Linux windows 2025-06-23 18:58:02 +03:00
xxSeys1
6c1e380a3e fix search item hover auto focusing item
Change what happens when search items get focused to prevent focus being taken away from search box.
Also adds a highlight to mouse hovered search item.
2025-06-23 17:24:53 +02:00
83512822b1 Support clipboard actions in Content Browser and Scene tree on Wayland
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-06-23 17:50:02 +03:00
ccb78103ec Support clipboard actions in Content Browser and Scene tree on X11 2025-06-23 17:07:10 +03:00
6e79ffea34 Fix clipboard not working on X11 2025-06-23 17:07:10 +03:00
4f03d37a17 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-23 12:03:41 +03:00
Wojtek Figat
c57a1a7205 Fix particle emitters to wait for used textures to be loaded and streamed in for proper usage in a graph 2025-06-23 09:31:58 +02:00
Wojtek Figat
867ae2ceaa Add Texture Size node to particles 2025-06-23 09:31:15 +02:00
Chandler Cox
169db79b2a Fix issue with tooltip not updating on scene reload. 2025-06-20 20:12:43 -05:00
Chandler Cox
9e4c1da032 Clear entries and pending entries before play for debug log. 2025-06-20 19:42:30 -05:00
Chandler Cox
c8622d1801 Change method name from add to restore. 2025-06-20 15:26:58 -05:00
Chandler Cox
fdd22c3380 Remove extra code. 2025-06-19 22:09:33 -05:00
Chandler Cox
53761df85e Add utility methods for redundant code. 2025-06-19 22:07:28 -05:00
Chandler Cox
ecaae2b458 Add downloading nuget package if needed. 2025-06-19 21:34:55 -05:00
Chandler Cox
3cb74d48ca Convert using event to using window method overrides. 2025-06-19 20:01:27 -05:00
Chandler Cox
8633ed2124 Merge branch 'master' into keep-scroll-scene-play 2025-06-19 19:58:04 -05:00
Wojtek Figat
6479a3d3c6 Fix log spam in task when waiting for task to end 2025-06-18 22:41:42 +02:00
Wojtek Figat
e41c48f9e5 Optimize NavMesh builder when updating a large number of tiles 2025-06-18 22:41:26 +02:00
Wojtek Figat
9cfcbfa9d2 Fix memory leak on recast objects when building NavMesh tile 2025-06-17 23:28:15 +02:00
Wojtek Figat
bcd2b1f0f2 Fix Array::RemoveAt to move element and avoid data copies 2025-06-17 23:27:26 +02:00
6fb8419b3c Disable window flashing on Wayland to fix focus issues 2025-06-17 14:23:20 +03:00
a4272d6ca9 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-17 14:19:46 +03:00
Wojtek Figat
eb6010cba7 Fix BitArray again 2025-06-16 23:20:20 +02:00
Wojtek Figat
5a23060e05 Add GPUTexture.UploadData for changing texture contents via TextureData container 2025-06-16 22:35:50 +02:00
Wojtek Figat
b92c18cf25 Fix missing/incorrect toolchain exception to log only once 2025-06-16 19:10:35 +02:00
Wojtek Figat
6a82eb114d Fix BitArray bit indexing 2025-06-16 19:05:44 +02:00
Wojtek Figat
97b37b3ce4 Add PRAGMA_DISABLE_OPTIMIZATION/PRAGMA_ENABLE_OPTIMIZATION 2025-06-16 18:00:26 +02:00
xxSeys1
bbe54969b0 fix close visject surface was_ flags to properly reset to false 2025-06-16 16:51:30 +02:00
4654117d5e Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-16 17:09:22 +03:00
xxSeys1
8164ce924f fix unfolding to actually work 2025-06-16 15:30:51 +02:00
Wojtek Figat
22911bbc45 Merge branch 'xxSeys1-VisjectCloseButtonFix' 2025-06-16 15:02:37 +02:00
Wojtek Figat
cae2720585 Merge branch 'VisjectCloseButtonFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-VisjectCloseButtonFix 2025-06-16 15:02:32 +02:00
Wojtek Figat
90b6293bc2 Add OnPlayEnding to editor modules and windows
#3514
2025-06-16 14:56:35 +02:00
xxSeys1
d110237423 fix GetVisibleItems() to only get visible items 2025-06-16 14:51:29 +02:00
Wojtek Figat
117f890612 Merge branch 'Zode-scenetree-scroll' 2025-06-16 14:50:14 +02:00
Wojtek Figat
a6a2fd2c66 Format code
#3526
2025-06-16 14:48:18 +02:00
Wojtek Figat
a05ca12770 Merge branch 'scenetree-scroll' of https://github.com/Zode/FlaxEngine into Zode-scenetree-scroll 2025-06-16 14:44:54 +02:00
Wojtek Figat
abe7785e94 Merge branch 'xxSeys1-PrefabEditorScrollToSelectionFix' 2025-06-16 14:43:40 +02:00
Wojtek Figat
2cedac8d96 Merge branch 'PrefabEditorScrollToSelectionFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-PrefabEditorScrollToSelectionFix 2025-06-16 14:43:34 +02:00
Wojtek Figat
ea854a0f7b Fix potential Grid shader accuracy issues
#3229
2025-06-16 14:41:43 +02:00
Wojtek Figat
d0817809ff Merge branch 'xxSeys1-ContentFinderImprovements' 2025-06-16 14:34:25 +02:00
Wojtek Figat
95f2216f97 Merge branch 'ContentFinderImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ContentFinderImprovements 2025-06-16 14:32:31 +02:00
Wojtek Figat
7e5edf1b33 Merge branch 'xxSeys1-ClearSearchOnAssetReferenceNavigate' 2025-06-16 14:30:58 +02:00
Wojtek Figat
c649a4f4b2 Merge branch 'ClearSearchOnAssetReferenceNavigate' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ClearSearchOnAssetReferenceNavigate 2025-06-16 14:30:53 +02:00
xxSeys1
cd7233d559 allow the user to unfold folded categories when scrolling with keyboard 2025-06-16 14:10:44 +02:00
6ff260d052 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-16 14:09:29 +03:00
88d2b72822 Update SDL to 3.3.x
Fixes popup focus issues on Linux
2025-06-16 14:09:04 +03:00
Wojtek Figat
3c74b315a8 Merge branch 'Zode-console-hotkey' 2025-06-15 23:47:29 +02:00
Wojtek Figat
f841575378 Merge branch 'console-hotkey' of https://github.com/Zode/FlaxEngine into Zode-console-hotkey 2025-06-15 23:25:09 +02:00
Wojtek Figat
d90377ed62 Merge branch 'Zode-import-export-warnings' 2025-06-15 23:23:22 +02:00
Wojtek Figat
c8d622bda9 Merge branch 'import-export-warnings' of https://github.com/Zode/FlaxEngine into Zode-import-export-warnings 2025-06-15 23:23:18 +02:00
Wojtek Figat
fbf2d8f567 Merge branch 'xxSeys1-ItemListImprovedKeyboardNav' 2025-06-15 23:06:26 +02:00
Wojtek Figat
42687a792c Merge branch 'ItemListImprovedKeyboardNav' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ItemListImprovedKeyboardNav 2025-06-15 22:59:20 +02:00
Wojtek Figat
5c43d35146 Merge branch 'Zode-node-alignment' 2025-06-15 22:32:29 +02:00
Wojtek Figat
c1e1dee975 Merge branch 'node-alignment' of https://github.com/Zode/FlaxEngine into Zode-node-alignment 2025-06-15 22:32:24 +02:00
Wojtek Figat
742d74a2d0 Merge branch 'xxSeys1-ModelSliders' 2025-06-15 21:43:04 +02:00
Wojtek Figat
614ffa70a0 Merge branch 'ModelSliders' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ModelSliders 2025-06-15 21:43:00 +02:00
Wojtek Figat
4b4331fd70 Merge branch 'Zode-visject-better-selection' 2025-06-15 21:28:42 +02:00
Wojtek Figat
e221f7204b Merge branch 'visject-better-selection' of https://github.com/Zode/FlaxEngine into Zode-visject-better-selection 2025-06-15 21:22:27 +02:00
Wojtek Figat
18fa8e1c47 Merge branch 'Zode-particles-sourcecode' 2025-06-15 20:48:22 +02:00
Wojtek Figat
2f02ec52ed Cleanup code
#3546
2025-06-15 20:48:19 +02:00
Wojtek Figat
9464f97e16 Merge branch 'particles-sourcecode' of https://github.com/Zode/FlaxEngine into Zode-particles-sourcecode 2025-06-15 20:45:18 +02:00
Wojtek Figat
54467a4a5e Merge branch 'Zode-layers-matrix-improvements' 2025-06-15 20:41:23 +02:00
Wojtek Figat
3a9e175043 Merge branch 'layers-matrix-improvements' of https://github.com/Zode/FlaxEngine into Zode-layers-matrix-improvements 2025-06-15 20:40:22 +02:00
Wojtek Figat
9dff048cb5 Merge branch 'Tryibion-main-menu-get-add' 2025-06-15 20:36:37 +02:00
Wojtek Figat
f376fd50a9 Merge branch 'main-menu-get-add' of https://github.com/Tryibion/FlaxEngine into Tryibion-main-menu-get-add 2025-06-15 20:36:32 +02:00
Wojtek Figat
e27cf04f91 Merge branch 'Zode-debug-quicktoggle' 2025-06-15 20:32:00 +02:00
Wojtek Figat
648504ceb1 Format code
#3544
2025-06-15 20:31:04 +02:00
xxSeys1
a4d3ede368 fix context menu on reroute node 2025-06-15 02:08:47 +02:00
xxSeys1
92edb996f2 properly handle connecting to a box that already has a connection 2025-06-14 17:20:28 +02:00
xxSeys1
2e0c35e6e4 fix out of range error when searching visject cm 2025-06-14 01:04:35 +02:00
xxSeys1
baba151d8a fix context menu 2025-06-14 00:54:16 +02:00
xxSeys1
b44d4107c0 fixes 2025-06-13 22:25:02 +02:00
xxSeys1
f40c67ddf0 add support to move visject socket connections 2025-06-13 22:05:57 +02:00
xxSeys1
ec154b4998 remove unnecessary returns xml doc comment 2025-06-12 19:31:32 +02:00
xxSeys1
e2f741cab9 adjust model window and animated model slider speeds 2025-06-12 18:45:02 +02:00
xxSeys1
47e1547d29 improve behaviour of visject node cm menu 2025-06-12 18:12:06 +02:00
Chandler Cox
28eaac37dc Initial work on nuget packages. 2025-06-11 18:17:19 -05:00
xxSeys1
214ec9f2b1 fix node delete button not checking if the user is performing certain actions on the surface before deleting node 2025-06-12 00:49:39 +02:00
Zode
27ac755bbe Make particle emitter editor window source code button disable itself is no source code is available 2025-06-11 23:15:11 +03:00
Zode
bed1f6e9cc Make tag editor expand all if holding shift while clicking the ... button 2025-06-11 19:06:23 +03:00
Zode
00055ef663 Make tool strip buttons more responsive by also reaction to double left clicks 2025-06-11 17:47:27 +03:00
Zode
aa59a6faf7 Extract function to lessen repeat code for debug group buttons, add shift functionality to quick toggle others. 2025-06-11 17:46:37 +03:00
xxSeys1
6997cbeb47 add options for viewport icons 2025-06-11 13:08:59 +02:00
Chandler Cox
fc561b5ec5 Merge pull request #2 from xxSeys1/noScrollOnScriptsReload
Dont scroll to node after scripts compilation
2025-06-10 10:03:06 -05:00
xxSeys1
dacc0068e0 dont scroll to node after scripts compilation 2025-06-10 16:49:30 +02:00
Zode
e7d2025010 Merge less flicker pr, and snatch the badge
Co-authored-by: Zode <jonzqzode@gmail.com>
Co-authored-by: Saas <kaktusreiniger@gmail.com>
2025-06-10 16:45:02 +03:00
xxSeys1
b418ab5275 reduce flickering in highlights and boxes 2025-06-10 14:58:31 +02:00
Zode
c1e782bb32 Add hotkey to quick focus debug console input 2025-06-09 23:34:02 +03:00
Chandler Cox
e1a2a36978 Add GetOrAddButton utility for MainMenu. 2025-06-09 15:02:43 -05:00
xxSeys1
793bc33b2f fix right clicking on item reset search and scroll 2025-06-09 18:40:33 +02:00
xxSeys1
2109a2d261 update content finder popup to wrap on keyboard navigation
- Fixes auto scroll
- Make it wrap
- Add pressing backspace to focus search bar and select all text
2025-06-09 18:40:12 +02:00
Zode
9e50a39ebf Add define guards so that the messagebox only appears in editor builds 2025-06-09 16:19:39 +03:00
Zode
7fc564a0ac Pop error box on lightmap UV generation also 2025-06-09 15:07:52 +03:00
Zode
8dfb564fb3 Add messagebox to windows import too 2025-06-09 15:04:34 +03:00
Zode
f8daff273a Add import & export warning messageboxes. 2025-06-09 14:56:54 +03:00
xxSeys1
112e728465 fix scroll to node on selection in prefab editor 2025-06-09 13:56:41 +02:00
29868531ad SDL workaround for window size and position not updating
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-06-08 18:57:57 +03:00
95dfb6fdc6 Reduce minimum default window size for CommandLineBox popup 2025-06-08 18:57:12 +03:00
Zode
9c9d560ce5 Add hotkeys to visject formatting 2025-06-08 03:32:51 +03:00
Zode
f1945552ab Add horizontal and vertical distribution 2025-06-08 02:42:28 +03:00
Zode
ecd5559aad Clean up a bit code after moving it around. 2025-06-08 00:41:02 +03:00
Zode
1fa83639c2 Fix update order inconsistencies between machines by exposing an action for when defered layout happens. 2025-06-08 00:38:59 +03:00
Zode
568719b615 Fix scroll issue caused by tree's defered layout update 2025-06-07 23:21:41 +03:00
Zode
74000fa766 Expand tree if necessary, so the selected node will be shown 2025-06-07 22:53:07 +03:00
Zode
1d63067614 Add ability to do additive and subtractive selections in visject surfaces using ctrl and shift during selection. 2025-06-07 21:04:59 +03:00
xxSeys1
85fd1389db clear content panel search when selecting asset picker asset 2025-06-07 18:17:40 +02:00
xxSeys1
cce042045e wrap scrolling items with arrow keys and simplify scrolling logic 2025-06-07 17:34:01 +02:00
Zode
53e3cee196 Scroll selected to view when emptying out search box 2025-06-07 17:15:54 +03:00
Zode
6ee3b23261 Add highlighting to layers matrix editor to improve UX 2025-06-07 16:57:28 +03:00
Zode
1a77ba4552 Add node alignment formatting options to visject 2025-06-07 13:15:39 +03:00
Wojtek Figat
eee4e55cf0 Fix debug shapes change 2025-06-05 22:26:45 +02:00
Wojtek Figat
c2cbaeed30 Add option to change Character Controller capsule origin to start at feet location 2025-06-05 17:48:07 +02:00
Wojtek Figat
e982a23ed3 Add CharacterController.Resize for quick crouching implementation for characters 2025-06-05 15:07:51 +02:00
Wojtek Figat
f6feae5cf2 Optimize collider cached scale 2025-06-05 15:06:03 +02:00
Wojtek Figat
ba75fd5882 Fix crash regression when textbox watermak is null 2025-06-05 12:47:45 +02:00
Wojtek Figat
1eaf40f2f7 Fix changing CharacterController center at runtime to maintain actor placement 2025-06-05 12:40:47 +02:00
Wojtek Figat
fe98a23cb4 Merge branch 'GoaLitiuM-update_tracy' 2025-06-05 00:01:04 +02:00
Wojtek Figat
77bf03128e Merge branch 'update_tracy' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-update_tracy 2025-06-04 23:53:32 +02:00
Wojtek Figat
8f49a492d8 Fix duplicating json assets to properly remap object IDs
#3441
2025-06-04 23:49:19 +02:00
8df3999f85 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-04 19:30:30 +03:00
Chandler Cox
dd4bb2f7f1 Dont scroll to node when play is starting or ending. 2025-06-04 11:16:01 -05:00
Chandler Cox
6b78b498f7 Use direct count from internal call. 2025-06-04 10:17:41 -05:00
xxSeys1
c4130aa20f fix and improve show all commands on " " behavior 2025-06-04 15:23:42 +02:00
Wojtek Figat
496856d12e Add shader header proxy for easy .hlsl files creation within Editor 2025-06-04 00:12:43 +02:00
Wojtek Figat
e97d683545 Fix regression from #3389 2025-06-03 23:37:37 +02:00
Chandler Cox
71991ff8c7 Show added and removed actors in prefab diff view. 2025-06-03 15:25:45 -05:00
Wojtek Figat
ae44d47043 Merge branch 'GoaLitiuM-float_equality' 2025-06-03 18:08:12 +02:00
Wojtek Figat
8b88def9d0 Revert some changes from #3389 that are not relevant for world units 2025-06-03 17:43:01 +02:00
Wojtek Figat
fa97229830 Merge branch 'float_equality' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-float_equality 2025-06-03 17:26:12 +02:00
Wojtek Figat
1946caac6e Fix compilation with Large Worlds 2025-06-03 17:26:04 +02:00
Wojtek Figat
6f5308126b Fix focus issue after closing context menu 2025-06-03 14:52:45 +02:00
Wojtek Figat
6a0c734cec Fix Visject surface select with Control to toggle selection of the node 2025-06-03 14:51:31 +02:00
Wojtek Figat
13b8863f0c Fix some material nodes height 2025-06-03 14:51:04 +02:00
Wojtek Figat
f2aaad0048 Add viewport icons scale relative to the distance and editor control over it
#2944 #2644
2025-06-03 14:50:47 +02:00
Wojtek Figat
55b441e9fa Fix transparency-related material options when using material with deferred shading 2025-06-03 12:55:54 +02:00
Wojtek Figat
6fece4ca38 Fix automatic collision importing from mode to remove unused material slots
#3475
2025-06-03 12:48:31 +02:00
Wojtek Figat
2fd9b4a62a Fix loading models with no meshes 2025-06-03 12:28:17 +02:00
Wojtek Figat
077f7a3cd1 Add PositionFormat and TexCoordFormat to model import option for mesh data encoding 2025-06-03 11:18:03 +02:00
xxSeys1
c9fe9213b3 add showing all commands if prompt is whitespace(s) 2025-06-02 23:25:50 +02:00
xxSeys1
608839b6a5 set width of command suggestions based on longest command 2025-06-02 22:33:22 +02:00
Wojtek Figat
7da69f18d4 Add button to quickly jump into Localized String Table that contains it
#3301
2025-06-02 22:01:06 +02:00
6c63c2f650 Update tracy to 0.12.0 2025-06-02 20:00:06 +03:00
149b189629 Update SDL to 3.2.16 2025-06-02 19:23:34 +03:00
Wojtek Figat
fd8a8b5a4d Fix missing default value of localized string in editor 2025-06-02 18:02:34 +02:00
b1fd86e6b5 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-06-02 18:15:16 +03:00
5e8fdf879d Fix logging in gamepad related events 2025-06-02 18:15:10 +03:00
Wojtek Figat
fa89e710d8 Fix Terrain shader error when using Position Offset
#3479
2025-06-02 15:05:20 +02:00
Wojtek Figat
b51ba58063 Fix crash on invalid particle data to be a soft check instead 2025-06-02 14:56:51 +02:00
Wojtek Figat
057489e5b9 Fix Output Log scroll when using search
#3442 #3456
2025-06-02 14:42:18 +02:00
Wojtek Figat
5bae695ae9 Merge branch 'Tryibion-fix-unpause-no-game-win' 2025-06-02 14:05:23 +02:00
Wojtek Figat
5b3ed1fbc3 Merge branch 'fix-unpause-no-game-win' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-unpause-no-game-win 2025-06-02 14:05:19 +02:00
Wojtek Figat
f5092e5262 Merge branch 'Tryibion-skip-setting-prefab-root-name' 2025-06-02 14:03:50 +02:00
Wojtek Figat
3bd6160c3b Merge branch 'skip-setting-prefab-root-name' of https://github.com/Tryibion/FlaxEngine into Tryibion-skip-setting-prefab-root-name 2025-06-02 14:03:47 +02:00
Wojtek Figat
1d0a0a409d Fix panel scroll bars update to be performed once again if controls are gets changed during layout
#3470 #3486
2025-06-02 13:40:27 +02:00
Wojtek Figat
eb90ab84f2 Fix performing layout after changing selected tab
#3467 #3487
2025-06-02 13:17:51 +02:00
Wojtek Figat
6f37525674 Merge branch 'alsed-master' 2025-06-02 12:39:17 +02:00
Wojtek Figat
eeb8a7ea41 Merge branch 'master' of https://github.com/alsed/FlaxEngine into alsed-master 2025-06-02 12:39:13 +02:00
Wojtek Figat
df0b571c50 Merge branch 'xxSeys1-UnifyZoomBehavior' 2025-06-02 12:37:41 +02:00
Wojtek Figat
ec22427acd Merge branch 'UnifyZoomBehavior' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-UnifyZoomBehavior 2025-06-02 12:25:18 +02:00
Wojtek Figat
6c499e877f Fix prefab diff in Editor on mesh reference 2025-06-02 11:50:10 +02:00
Wojtek Figat
4d9407e4e9 Merge code on properties objects locking to use the same path for prefab and scene properties panels 2025-06-02 11:03:16 +02:00
Wojtek Figat
28c70f5078 Fix some editor UI
#3460 #3491
2025-06-02 11:00:33 +02:00
Wojtek Figat
14806a1ac7 Merge branch 'Tryibion-add-root-tree-line-option' 2025-06-02 10:19:35 +02:00
Wojtek Figat
1ebb3e67d6 Merge branch 'add-root-tree-line-option' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-root-tree-line-option 2025-06-02 10:17:34 +02:00
Wojtek Figat
991cdbb9a0 Merge branch 'Tryibion-fix-node-filter-prefab' 2025-06-02 10:16:28 +02:00
Wojtek Figat
278b177c46 Merge branch 'fix-node-filter-prefab' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-node-filter-prefab 2025-06-02 10:16:25 +02:00
Wojtek Figat
0630b6257a Merge branch 'Tryibion-better-prefab-dif-name' 2025-06-02 09:30:51 +02:00
Wojtek Figat
f86d9c47b7 Merge branch 'better-prefab-dif-name' of https://github.com/Tryibion/FlaxEngine into Tryibion-better-prefab-dif-name 2025-06-02 09:30:46 +02:00
Wojtek Figat
ae2088bb9d Fix Android NDK version parsing when using beta build
#3504
2025-06-02 00:06:13 +02:00
Wojtek Figat
9340c42f2b Merge branch 'xxSeys1-CrammedGradingFixed' 2025-06-01 23:54:40 +02:00
Wojtek Figat
8d7dfd5946 Merge branch 'CrammedGradingFixed' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-CrammedGradingFixed 2025-06-01 23:53:15 +02:00
Wojtek Figat
894cb273aa Merge branch 'xxSeys1-WindowShortcuts' 2025-06-01 23:32:43 +02:00
Wojtek Figat
2996e0c53c Merge branch 'WindowShortcuts' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-WindowShortcuts 2025-06-01 23:26:46 +02:00
Wojtek Figat
79ce82d8a0 Merge branch 'Weyzu-fix_dotnet_version_detection' 2025-06-01 22:43:56 +02:00
Wojtek Figat
3c8e59c114 Merge branch 'fix_dotnet_version_detection' of https://github.com/Weyzu/FlaxEngine into Weyzu-fix_dotnet_version_detection 2025-06-01 22:43:53 +02:00
Wojtek Figat
1493571810 Merge branch 'GoaLitiuM-fix_tree_performance' 2025-06-01 21:59:13 +02:00
Wojtek Figat
a613d89f47 Merge branch 'fix_tree_performance' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-fix_tree_performance 2025-06-01 21:55:58 +02:00
Wojtek Figat
5471c59d5f Merge branch 'xxSeys1-Atan2DefaultValueFix' 2025-06-01 21:39:16 +02:00
Wojtek Figat
ac42223f9e Merge branch 'Atan2DefaultValueFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-Atan2DefaultValueFix 2025-06-01 21:39:03 +02:00
Wojtek Figat
c21c9c13ad Merge branch 'xxSeys1-gravityTypoFix' 2025-06-01 21:23:42 +02:00
Wojtek Figat
8251509607 Merge branch 'gravityTypoFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-gravityTypoFix
# Conflicts:
#	Source/Engine/Physics/PhysicsSettings.h
2025-06-01 21:23:35 +02:00
xxSeys1
3083e3f611 fix wrong unit in physics settings 2025-06-01 16:04:30 +02:00
xxSeys1
66add1f3bd fix missing whitespaces 2025-06-01 16:01:55 +02:00
Wojtek Figat
b8a680df57 Merge branch 'xxSeys1-TerrainLayerWeightNodeWidth' 2025-06-01 15:55:10 +02:00
Wojtek Figat
e969b7fffb Merge branch 'TerrainLayerWeightNodeWidth' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-TerrainLayerWeightNodeWidth 2025-06-01 15:55:07 +02:00
Wojtek Figat
5d9657781a Merge branch 'Weyzu-fix_timeouts_in_task_wait' 2025-06-01 15:51:07 +02:00
Wojtek Figat
2cd03787cd Merge branch 'fix_timeouts_in_task_wait' of https://github.com/Weyzu/FlaxEngine into Weyzu-fix_timeouts_in_task_wait 2025-06-01 15:50:03 +02:00
Wojtek Figat
619c5ac3b0 Fix unit of gravity in doc comment
#3509
2025-06-01 15:45:27 +02:00
Wojtek Figat
89baa91552 Don't sue 2025-06-01 09:20:11 +02:00
Wojtek Figat
83b3b1af76 Fix terrain collision debug draw flickering when moving camera in Large Worlds
#3260
2025-06-01 09:19:49 +02:00
Wojtek Figat
19148f21ac Merge branch 'Tryibion-fix-anim-preview-bounds' 2025-05-31 23:59:22 +02:00
Wojtek Figat
2da8e392db Merge branch 'fix-anim-preview-bounds' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-anim-preview-bounds 2025-05-31 23:58:54 +02:00
Wojtek Figat
a812b8b108 Merge branch 'xxSeys1-ViewFlagAndDebugModeShortcuts' 2025-05-31 23:56:06 +02:00
Wojtek Figat
3dc96352e6 Merge branch 'ViewFlagAndDebugModeShortcuts' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ViewFlagAndDebugModeShortcuts 2025-05-31 23:51:10 +02:00
Wojtek Figat
c2b590d2cf Merge branch 'Tryibion-engine-play-mode' 2025-05-31 23:37:16 +02:00
Wojtek Figat
842d6969fe Merge branch 'engine-play-mode' of https://github.com/Tryibion/FlaxEngine into Tryibion-engine-play-mode 2025-05-31 23:37:11 +02:00
Wojtek Figat
0f3044ae72 Optimize debug drawing of terrain shape in Physics Colliders view mode
#3469
2025-05-31 23:27:51 +02:00
Wojtek Figat
11dec8e868 Fix incorrectly rendered transparency in Physics Colliders view mode
#3474
2025-05-30 15:51:35 +02:00
Wojtek Figat
d6b1f06721 Fix deprecated asset saving to skip temporary or virtual assets 2025-05-30 15:31:10 +02:00
Wojtek Figat
14fcc593c7 Fix various margins and spacings between UI elements in Editor to be consistent 2025-05-30 15:28:56 +02:00
Wojtek Figat
08ed5ae483 Add SCOPE_EXIT macro and use it in prefab tests to cleanup assets on test fail 2025-05-30 11:16:17 +02:00
Wojtek Figat
b065e6c989 Fix regression from 294dd3d363 2025-05-30 11:15:47 +02:00
Wojtek Figat
372a23cf3a Merge branch 'Tryibion-focus-actor-no-box' 2025-05-30 00:47:18 +02:00
Wojtek Figat
4721e8109f Merge branch 'focus-actor-no-box' of https://github.com/Tryibion/FlaxEngine into Tryibion-focus-actor-no-box 2025-05-30 00:47:05 +02:00
Wojtek Figat
b58aaccc53 Fix missing Physics Colliders view if Debug Draw is disabled
#3498
2025-05-30 00:46:09 +02:00
Wojtek Figat
294dd3d363 Fix json guid parsing to check for correct hex characters
#3476
2025-05-30 00:42:55 +02:00
Wojtek Figat
e00f552baf Fix missing xml comment 2025-05-30 00:39:20 +02:00
Chandler Cox
ae9ded504d Add utility for if in play mode that returns true for shipped applications. 2025-05-23 23:21:45 -05:00
Chandler Cox
9753e579c1 Check for Game window before usage to avoid errors in trying to unplay. 2025-05-23 18:16:48 -05:00
Chandler Cox
954cf3eb5b Add option to show verticies and triangles of collision model in a collider data window. 2025-05-23 17:57:14 -05:00
Chandler Cox
2e996c8e91 Remove redundant call to scene. Fixes error in prefab node filtering. 2025-05-23 17:11:45 -05:00
Chandler Cox
545a43de32 Add drawing root tree lines except for in scene and prefab tree. 2025-05-23 16:50:55 -05:00
Chandler Cox
e606c35093 Add node tree to show changes to whole prefab. 2025-05-23 16:23:22 -05:00
Chandler Cox
21ae2d5d40 Focus Actor position if no Actor bounding box. 2025-05-23 14:44:53 -05:00
Chandler Cox
4649298605 Dont allow setting prefab root name from scene instance. 2025-05-23 14:06:21 -05:00
Chandler Cox
ae9622d271 Re-add colors back in for nodes. 2025-05-23 13:29:05 -05:00
Chandler Cox
4366976015 Add better prefab diff viewing naming for actors 2025-05-23 13:27:01 -05:00
Chandler Cox
5b2a966ac6 Fix animation preview bounds scale. 2025-05-23 10:37:30 -05:00
xxSeys1
59308df250 add shortcuts for viewflags and debug view modes 2025-05-18 16:28:16 +02:00
Wojtek Figat
9ba1c4c338 Fix typo in ec2957bf38 2025-05-16 20:24:01 +02:00
Wojtek Figat
ec2957bf38 Fix memory leak on sequential mesh buffers update
#3449
2025-05-16 20:23:16 +02:00
Wojtek Figat
8bb5655b2f Fix error when using invalid camera ray 2025-05-16 20:22:52 +02:00
xxSeys1
c24ecaaab1 fix crammed color grading editor value boxes 2025-05-15 19:27:48 +02:00
xxSeys1
483a33996f fix atan2 to use default box value 2025-05-15 11:43:38 +02:00
Olly Rybak
245d7de818 Fixed renamed parameters 2025-05-14 19:45:29 +10:00
Olly
49e0cc937e Added SetNodeTransformation with ModelBoneNode
To get and set a series of bones based on their ID

(cherry picked from commit e0a113483e910660e45c53e059502733ce1d6ad6)
2025-05-14 19:29:39 +10:00
Wiktor Żurawik
6be8158209 Fix timeout calculation in Task::Wait 2025-05-13 23:10:57 +02:00
Wojtek Figat
8e7fcd3cad Merge branch 'xxSeys1-ItemsListNoSelectionAutoFirst' 2025-05-13 20:16:56 +02:00
Wojtek Figat
a792a8a533 Merge branch 'ItemsListNoSelectionAutoFirst' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ItemsListNoSelectionAutoFirst 2025-05-13 20:16:51 +02:00
Wojtek Figat
25d8c4645e Merge branch 'GoaLitiuM-fontlinecache_alloc' 2025-05-13 20:09:08 +02:00
Wojtek Figat
64c552d69d Merge branch 'fontlinecache_alloc' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-fontlinecache_alloc 2025-05-13 20:06:31 +02:00
Wojtek Figat
fafa400db0 Merge branch 'xxSeys1-documentationInReadme' 2025-05-13 19:59:21 +02:00
xxSeys1
0b20a5342e add info on docs source being available to readme 2025-05-13 16:00:16 +02:00
Norite SC
f71bdd0962 Create GPUTextureEditor.cs 2025-05-13 01:13:16 +02:00
xxSeys1
fa4e56a32a unify zoom behavior when zooming in and out 2025-05-12 20:26:33 +02:00
xxSeys1
212bd7a011 adjust width of terrain related nodes and node elements 2025-05-12 20:11:08 +02:00
alsed
943864004f Update README.md
removed spirv-tools, since Flax build it during compilation.
2025-05-09 15:17:20 -04:00
Wiktor Żurawik
8ce4d94a96 Refactor .NET version detection error reporting 2025-05-09 17:04:41 +02:00
xxSeys1
6be193bfbf fix tooltip 2025-05-09 11:39:40 +02:00
Wojtek Figat
5d3947f117 Merge branch 'xxSeys1-improvedImportPath' 2025-05-08 14:38:25 +02:00
Wojtek Figat
c7bb7be20f Merge branch 'improvedImportPath' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-improvedImportPath 2025-05-08 14:38:20 +02:00
Wojtek Figat
f74b96bcb6 Merge branch 'xxSeys1-DisableCreateButton' 2025-05-08 14:32:54 +02:00
Wojtek Figat
cecfea1ecf Merge branch 'DisableCreateButton' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-DisableCreateButton 2025-05-08 14:32:48 +02:00
Wojtek Figat
09ce2b5a6d Merge branch 'xxSeys1-RigidbodyInfoGroup' 2025-05-08 14:29:12 +02:00
Wojtek Figat
2f9cdadb11 Merge branch 'RigidbodyInfoGroup' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-RigidbodyInfoGroup 2025-05-08 14:29:07 +02:00
Wojtek Figat
e218ce2d85 Merge branch 'Tryibion-fix-group-scene' 2025-05-08 14:28:13 +02:00
Wojtek Figat
5ec6993342 Merge branch 'fix-group-scene' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-group-scene 2025-05-08 14:28:01 +02:00
xxSeys1
87787cb5bf replace Todo doc comments 2025-05-05 15:15:32 +02:00
xxSeys1
5b618b4f31 add icons to more commonly used editor windows 2025-05-05 13:24:21 +02:00
xxSeys1
08a86066d0 add window shortcuts 2025-05-05 13:24:01 +02:00
xxSeys1
388eb654a5 update doc comment to reflect get only parameter 2025-05-05 09:58:36 +02:00
xxSeys1
d8059c3db3 disable create file dialog create button if asset can't be created 2025-05-04 20:08:12 +02:00
559d17e6c3 Reduce allocations in text rendering related functions 2025-05-04 15:05:46 +03:00
xxSeys1
dfe177447c add auto selecting first item in item list context menu if no selection 2025-05-03 22:11:38 +02:00
Chandler Cox
2a5aed6c15 Fix trying to add scene to actor group. 2025-05-02 21:58:02 -05:00
xxSeys1
f5ad8566eb make path creation method more generalized 2025-05-02 13:29:01 +02:00
7c5628d47e Fix crash caused by conflicting tracy DbgHelp lock helper names 2025-05-02 14:20:18 +03:00
9645008460 Update tracy to 0.11.1 2025-05-02 14:20:18 +03:00
12dbf09164 Fix tests 2025-05-02 14:19:55 +03:00
f09fd7ad34 Use exact value comparison in caching related functions
(cherry picked from commit 9d7c6b26422e127719836944d8d473910190e7d4)
2025-05-02 14:19:55 +03:00
8986290b12 Use exact component value equality checks in equality comparisons
(cherry picked from commit 2cddf3de97943844512b2d84aa6be122c6f0d409)
2025-05-02 14:19:54 +03:00
9a4d3a56a3 Fix slow Tree expansion/collapsion with large amount of tree nodes 2025-05-02 13:31:13 +03:00
xxSeys1
b0048d6540 add margin around info label 2025-05-01 22:32:28 +02:00
xxSeys1
b1b36ea1a3 move rigidbody info to dedicated info group in Properties Panel 2025-05-01 22:29:37 +02:00
xxSeys1
e568e6e17b improve import path ui 2025-05-01 19:15:43 +02:00
Wojtek Figat
af955ba418 Merge branch 'xxSeys1-prefabSearchOperatorTooltip' 2025-04-29 09:22:00 +02:00
Wojtek Figat
a56e2e7b1e Merge branch 'prefabSearchOperatorTooltip' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-prefabSearchOperatorTooltip 2025-04-29 09:21:55 +02:00
Wojtek Figat
a0cdb08893 Merge branch 'Zode-fix-profiler-memory' 2025-04-29 09:17:37 +02:00
Wojtek Figat
fbb829a915 Merge branch 'fix-profiler-memory' of https://github.com/Zode/FlaxEngine into Zode-fix-profiler-memory 2025-04-29 09:17:30 +02:00
Wojtek Figat
5790da6167 Merge branch 'Tryibion-fix-input-edit-ui' 2025-04-29 09:15:53 +02:00
Wojtek Figat
c6e4fbd966 Merge branch 'fix-input-edit-ui' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-input-edit-ui 2025-04-29 09:15:04 +02:00
Wojtek Figat
101ea44051 Merge branch 'Tryibion-fix-skel-mask-create' 2025-04-29 09:12:24 +02:00
Wojtek Figat
d6c6936f6d Merge branch 'fix-skel-mask-create' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-skel-mask-create 2025-04-29 09:12:19 +02:00
Wojtek Figat
4929e8172c Merge branch 'Tryibion-fix-scrollbar-drag' 2025-04-29 09:10:54 +02:00
Wojtek Figat
8c83156133 Merge branch 'fix-scrollbar-drag' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-scrollbar-drag 2025-04-29 09:09:42 +02:00
Wojtek Figat
d587921a83 Merge branch 'Tryibion-fix-add-blend-tooltip-spell' 2025-04-29 09:05:50 +02:00
xxSeys1
47a6da9e40 add editor option for disabled transform gizmo brightness 2025-04-27 15:56:34 +02:00
Zode
6fe6ba20fb Fix profiler memory propagation 2025-04-26 21:40:12 +03:00
xxSeys1
2ea3cde203 add search operator tooltip to prefab editor search bar
somewhat of a follow up to #3300
2025-04-26 16:33:49 +02:00
Chandler Cox
059fe98c67 Fix scroll bars not updating when dragging. 2025-04-26 07:38:18 -05:00
Chandler Cox
1ab05b620a Another small grammer mistake. 2025-04-26 07:08:49 -05:00
Chandler Cox
4b387d040d Fix spelling on Additive Blend node tooltip. 2025-04-26 07:07:27 -05:00
Chandler Cox
9d527ab4a6 Remove editable from check for enabling inputs for game window GUI. 2025-04-25 20:36:53 -05:00
Chandler Cox
bbc221086a Fix GUI input when edit GUI option is false and game is being played. 2025-04-25 17:55:07 -05:00
Chandler Cox
e5b7e58a07 Fix newly created skeleton mask from being able to be opened. 2025-04-25 17:11:36 -05:00
xxSeys1
1704cfba4d do not clear user search on script reload 2025-04-25 18:32:05 +02:00
Chandler Cox
40dae18b76 Add new issue and request templates. 2025-04-24 18:48:29 -05:00
alsed
cfef93134e Added Fedora instructions in Readme 2025-04-22 17:16:12 -04:00
84ada18299 Fix unlock mouse hotkey not unlocking CursorLockMode.Locked cursor 2025-04-21 23:13:23 +03:00
635fe8017e Fix EditorViewport buttons activating items on scene 2025-04-21 23:13:23 +03:00
834380ff05 Cleanup 2025-04-21 23:13:23 +03:00
dd65fc2289 Implement Wayland text clipboard data handling 2025-04-21 23:13:23 +03:00
86125bb625 Add support for VK_EXT_metal_surface extension 2025-04-21 23:13:23 +03:00
09a9d8b380 Update volk to 1.4.304 2025-04-21 23:13:23 +03:00
86b223ec93 Fix mouse relative mode activation triggering mouse move events on Mac 2025-04-21 23:13:23 +03:00
78f6080321 Initial support for building and running SDL platform on macOS 2025-04-21 23:13:23 +03:00
c7be6f6e0e Fix VC++ project file building on macOS Rider 2025-04-20 01:14:51 +03:00
c40c31fbb7 Reduce lock usage during window events 2025-04-19 21:14:13 +03:00
f5fbc1e32d Fix handling of WindowsManager locks 2025-04-19 21:14:13 +03:00
0a20378acd Handle Wayland dragging actions ending prematurely 2025-04-19 21:14:12 +03:00
d4e87877b6 Fix editor viewport activating while dragging a window 2025-04-19 21:14:12 +03:00
7eb7236b8a Fix occluded or hidden windows causing the engine to freeze on Wayland 2025-04-19 21:14:11 +03:00
dc0e4ffce2 Allow context menu to show when activating scene tree with right click 2025-04-19 21:14:11 +03:00
86fe93943d Fix crash when relative mode was left active on removed window 2025-04-19 21:14:10 +03:00
3258113ef8 Ensure mouse position is up-to-date during button down events 2025-04-19 21:14:10 +03:00
ebf3999cfe Fix rubber band selector activating outside of the viewport
This usually happens while trying to drag the window from window handle
2025-04-19 21:14:09 +03:00
a1ccbbb5b9 Use sensible window minimum size limits in editor windows 2025-04-19 21:14:09 +03:00
35072c40d8 Fix build on Linux 2025-04-19 21:14:08 +03:00
5c51021388 Fix merge 2025-04-19 21:14:08 +03:00
95fd527515 Apply drag and drop styling on refactored WindowDragHelper
Reapplies changes from commit 38b00f458c
2025-04-19 21:14:07 +03:00
113d851cea Fix cursor escaping constrained area when initially outside on Windows 2025-04-19 21:14:07 +03:00
72f0c460f9 Refix dragged maximized window generating wrong mouse position events 2025-04-19 21:14:06 +03:00
13ddd15b44 Focus viewports earlier to fix CursorLockMode not always activating 2025-04-19 21:14:06 +03:00
c9e24aaf5f Fix documentation generation 2025-04-19 21:14:05 +03:00
68c0ac0ffc Fix cursor locking bounds calculation 2025-04-19 21:14:05 +03:00
bebda275a9 Fix crash when Game viewport was hidden 2025-04-19 21:14:04 +03:00
287eaae850 Fix X11 external drag and drop not releasing consistently 2025-04-19 21:14:04 +03:00
7e59c3b9a7 Fix restoring locked cursor state when window gains focus again 2025-04-19 21:14:03 +03:00
38658a5b8c Fix CursorLockMode.Locked not working 2025-04-19 21:14:02 +03:00
88c75b8672 Fix dragged maximized window generating wrong mouse position events 2025-04-19 21:14:02 +03:00
17ab1e6830 Fix window handle clicking to not restore window from maximized state 2025-04-19 21:14:01 +03:00
1f45110e5f Fix rubber band selector activating when using Alt-key to orbit 2025-04-19 21:14:01 +03:00
5401166a07 Fix error when entering playmode while holding right mouse button 2025-04-19 21:14:00 +03:00
bfa8188782 Fix accepting drag and drop for files in Wayland 2025-04-19 21:14:00 +03:00
e777a71784 Fix error while dragging files around Content window 2025-04-19 21:13:59 +03:00
c13e91a0d0 Release rubber band selection when viewport starts controlling the view 2025-04-19 21:13:59 +03:00
aac5d57352 Update SDL to 3.2.10 2025-04-19 21:13:58 +03:00
ceca13c7b6 Avoid showing tooltips in inactive windows 2025-04-19 21:13:58 +03:00
2905470330 Update SDL3 to 3.2.4 2025-04-19 21:13:57 +03:00
2c17033822 Fix window dragging when not supported by Wayland compositor
(cherry picked from commit 3554747a67)
2025-04-19 21:13:57 +03:00
0a4cb9e9b1 Show current display server in Editor window tooltip
(cherry picked from commit 62968dd437)
2025-04-19 21:13:56 +03:00
096651f4c1 Properly mark floating windows with transparency support
(cherry picked from commit c660fac524)
2025-04-19 21:13:56 +03:00
275a08506b Enable transparency support in Vulkan swapchains
(cherry picked from commit 431a69e357)
2025-04-19 21:13:55 +03:00
4cd61cb381 Fix compilation for game builds
(cherry picked from commit f4fcc07288)
2025-04-19 21:13:54 +03:00
9ad1147581 Fix cloning SDL repository 2025-04-19 21:13:54 +03:00
35e09def1b Fix text input not working on X11 2025-04-19 21:13:53 +03:00
0469607a71 Fix button latching on Windows after drag and drop operation 2025-04-19 21:13:53 +03:00
d115d22ee6 Implement new window dragging system 2025-04-19 21:13:52 +03:00
8120ae621d Fix mouse resetting issues after ending relative mode 2025-04-19 21:13:52 +03:00
f873c2fa9f Fix frame stutter when window is focused 2025-04-19 21:13:51 +03:00
c3ffbe2f42 Fix error when docking to sides of tabbed panel 2025-04-19 21:13:51 +03:00
55a0a39881 Cleanup Linux SDL implementation 2025-04-19 21:13:50 +03:00
592215dd30 Support compiling third party library C files as C code 2025-04-19 21:13:50 +03:00
ef0c2a2785 Implement Wayland protocols module and file generation 2025-04-19 21:13:49 +03:00
37979e452a Fix mouse warping after ending relative mode 2025-04-19 21:13:49 +03:00
e9671bb727 Add git fetch method for dependencies 2025-04-19 21:13:48 +03:00
aa328bd591 Fix window ShowInTaskbar setting 2025-04-19 21:13:48 +03:00
188e4313f9 Fix various issues with child window positioning 2025-04-19 21:13:47 +03:00
df02c70e31 Add Window.IsAlwaysOnTop property 2025-04-19 21:13:47 +03:00
257f54b323 Use SDL locale 2025-04-19 21:13:46 +03:00
fb4b5b2575 Allow window with single tab to be dragged from tab area 2025-04-19 21:13:46 +03:00
4e1251276d Fix ValueBox mouse position resetting after releasing the button 2025-04-19 21:13:45 +03:00
a7b200dc57 Fix SDL build process on Linux 2025-04-19 21:13:44 +03:00
8cadbae80e Update SDL to 3.2.0 2025-04-19 21:13:44 +03:00
c3bae49aae Force cursor to center of Game Window when tab handle is clicked 2025-04-19 21:13:43 +03:00
Chandler Cox
6fa4fc6149 Fix rotation using SDL 2025-04-19 21:13:43 +03:00
f1ffe1acaa Fix Linux compilation without SDL 2025-04-19 21:13:42 +03:00
5c9ddf7f00 Fix compilation 2025-04-19 21:13:42 +03:00
431767a150 Update SDL3 2025-04-19 21:13:41 +03:00
8ba4e442a6 Fix compilation issues 2025-04-19 21:13:41 +03:00
2f8d19c267 Fix windows not being hidden initially 2025-04-19 21:13:40 +03:00
f2fd98f742 Fix parent window position handling with popup/tooltip windows 2025-04-19 21:13:40 +03:00
3ce35d6e81 Fix compilation errors in other platforms 2025-04-19 21:13:39 +03:00
796dbaa836 Fix CI for Linux 2025-04-19 21:13:39 +03:00
84b209ec7f Prevent building with SDL in unsupported platforms 2025-04-19 21:13:38 +03:00
fa976b34dc Fallback to X11 message box implementation when SDL fails 2025-04-19 21:13:38 +03:00
e7cda362b7 Fix popup and context menus not working on Wayland 2025-04-19 21:13:37 +03:00
a41a09c162 Hide warnings for unsupported SDL operations on Wayland 2025-04-19 21:13:37 +03:00
e82f84f0ab Log a warning for not implemented Wayland functionality 2025-04-19 21:13:36 +03:00
f1d387ceea Fix compilation in Linux 2025-04-19 21:13:36 +03:00
3893d4d1f8 Enable warning sound in question dialogs 2025-04-19 21:13:35 +03:00
cf7ac50faf Enable modern Windows dialog boxes 2025-04-19 21:13:35 +03:00
3f6bf15554 Implement relative mouse mode (raw input) for SDL platform 2025-04-19 21:13:34 +03:00
dac74829b4 Add flag for Window types 2025-04-19 21:13:34 +03:00
94d6f213a0 Enable native windowing system settings with SDL platform 2025-04-19 21:13:33 +03:00
8f2550ef61 Add command-line switches to force X11 and Wayland SDL drivers 2025-04-19 21:13:33 +03:00
b622a1cc5e Implement SDL platform, windowing and input handling 2025-04-19 21:13:32 +03:00
c83a3c32c7 Refactor application window class name 2025-04-19 21:13:32 +03:00
e7dcf7f7e7 Move Window related enums to separate header file 2025-04-19 21:13:31 +03:00
398785a2be Refactor Windows drag and drop implementation 2025-04-19 21:13:31 +03:00
05dba0f1f5 Refactor ScreenUtilities 2025-04-19 21:13:30 +03:00
39dbd32b2e Add more helper methods for managing Git repos 2025-04-19 21:13:30 +03:00
23a34a455a Fix centered window location on X11 2025-04-19 21:13:29 +03:00
4308328b48 Fix initial position of Tooltips 2025-04-19 21:13:29 +03:00
xxSeys1
4e44831bbe fix searchbox width 2025-04-11 19:07:39 +02:00
xxSeys1
0c1e0e48d4 always sort the search results alphabetically 2025-04-10 22:12:47 +02:00
xxSeys1
6884df02fd remove trailing . on message 2025-04-10 21:34:00 +02:00
xxSeys1
63655d18c5 add a info message on Debug Log pause on warning 2025-04-10 21:31:12 +02:00
xxSeys1
4170699348 add hint if there are no search results 2025-04-10 09:25:52 +02:00
xxSeys1
d58a9beb3d why was this not in the last commit? 2025-04-09 23:45:43 +02:00
xxSeys1
5049f3b2d8 add hint if no filters are active 2025-04-09 23:45:00 +02:00
xxSeys1
6e44eebb9e another fix 2025-04-09 17:01:17 +02:00
xxSeys1
aecbab5613 more fixes 2025-04-09 14:30:08 +02:00
xxSeys1
6bf90f29c5 fixes 2025-04-09 14:29:19 +02:00
xxSeys1
19edce1770 add controls and filter to actor toolbox search 2025-04-09 10:43:52 +02:00
Chandler Cox
e17b96b2d6 Add additional methods for layers. 2025-04-07 11:14:33 -05:00
Chandler Cox
9b6feb9367 Add Scaled Time to Material Time node. 2025-04-07 10:02:20 -05:00
xxSeys1
1dfd717093 serialize display info and color 2025-04-02 23:38:04 +02:00
xxSeys1
68ef6f08c6 minor style fixes 2025-04-02 19:40:27 +02:00
xxSeys1
a0b80c6096 add getters for more commonly used vehicle fields 2025-04-02 19:29:11 +02:00
xxSeys1
59ac8a3f60 move anti roll bars into Vehicle display group 2025-04-02 19:21:24 +02:00
xxSeys1
dd281bbca8 add wheel information debug draw 2025-04-02 19:12:36 +02:00
xxSeys1
2e48be97b6 add getter for steering 2025-04-02 17:24:13 +02:00
Andre Mohren
0b7550e5ca Implement creation of new projects from within the editor gui. 2025-04-02 15:10:11 +02:00
xxSeys1
391c67b1a9 add visibility options for the tab close button 2025-03-23 14:09:59 +01:00
xxSeys1
975cc79085 code style fixes 2025-03-16 22:18:21 +01:00
xxSeys1
468babae87 auto resize PropertiesList splitter bar based on longest text 2025-03-16 20:32:20 +01:00
xxSeys1
516d4263c9 add broken link icon 2025-02-11 23:56:28 +01:00
xxSeys1
ba35123420 add minimum tab width 2025-02-11 18:15:46 +01:00
xxSeys1
409703d675 add editor option for tab height 2025-02-11 16:39:33 +01:00
xxSeys1
570c3f7462 add option for single tab tab header bar visibility 2025-02-11 16:39:15 +01:00
Chandler Cox
42d02a9e63 Add small fade to bottom bar. 2025-02-08 18:49:04 -06:00
Chandler Cox
819c93f6fb Increase margins. 2024-12-24 14:26:59 -06:00
Chandler Cox
0c645cbc78 Allow user to add splash image to splash screen. 2024-12-24 12:12:59 -06:00
xxSeys1
e665cc7500 add safe margin
4 pixels seemed a bit much, smaller adjustments could lead to the menu still showing
2024-09-16 15:43:46 +02:00
xxSeys1
0a516ac98d make it possible to pan editor when rmb down on node 2024-09-14 15:33:07 +02:00
752 changed files with 111270 additions and 7510 deletions

42
.github/ISSUE_TEMPLATE/1-bug.yaml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please attach any minimal reproduction projects!
- type: textarea
id: description-area
attributes:
label: Description
description: Please provide a description of the bug and what you expected to happen.
validations:
required: true
- type: textarea
id: steps-area
attributes:
label: Steps to reproduce
description: Please provide reproduction steps if possible.
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of Flax are you running?
options:
- '1.8'
- '1.9'
- '1.10'
- '1.11'
- master branch
default: 2
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant logs
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell

View File

@@ -0,0 +1,22 @@
name: Feature Request
description: File a feature request.
title: "[Request]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out a feature request!
- type: textarea
id: description-area
attributes:
label: Description
description: Please provide a description of the feature!
validations:
required: true
- type: textarea
id: benefits-area
attributes:
label: Benefits
description: Please provide what benefits this feature would provide to the engine!
validations:
required: true

View File

@@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
- name: Setup Vulkan
uses: ./.github/actions/vulkan
- name: Setup .NET
@@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev libwayland-dev
- name: Setup Vulkan
uses: ./.github/actions/vulkan
- name: Setup .NET

View File

@@ -28,7 +28,7 @@ jobs:
git lfs pull
- name: Install dependencies
run: |
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
- name: Build
run: |
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8

BIN
Content/Editor/Camera/M_Camera.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/DefaultFontMaterial.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Gizmo/Material.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Gizmo/MaterialWire.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Highlight Material.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Editor/Icons/IconsMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Editor/IconsAtlas.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@@ -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);

View File

@@ -27,6 +27,7 @@ TextureCube EnvProbe : register(t__SRV__);
TextureCube SkyLightTexture : register(t__SRV__);
Buffer<float4> ShadowsBuffer : register(t__SRV__);
Texture2D<float> ShadowMap : register(t__SRV__);
Texture3D VolumetricFogTexture : register(t__SRV__);
@4// Forward Shading: Utilities
@5// Forward Shading: Shaders
@@ -143,9 +144,21 @@ 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);
if (ExponentialHeightFog.VolumetricFogMaxDistance > 0)
{
// Sample volumetric fog and mix it in
float2 screenUV = materialInput.SvPosition.xy * ScreenSize.zw;
float3 viewVector = materialInput.WorldPosition - ViewPos;
float sceneDepth = length(viewVector);
float depthSlice = sceneDepth / ExponentialHeightFog.VolumetricFogMaxDistance;
float3 volumeUV = float3(screenUV, depthSlice);
float4 volumetricFog = VolumetricFogTexture.SampleLevel(SamplerLinearClamp, volumeUV, 0);
fog = CombineVolumetricFog(fog, volumetricFog);
}
// Apply fog to the output color
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE

View File

@@ -20,6 +20,8 @@ float TimeParam;
float4 ViewInfo;
float4 ScreenSize;
float4 ViewSize;
float3 ViewPadding0;
float UnscaledTimeParam;
@1META_CB_END
// Shader resources

View File

@@ -645,7 +645,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
materialInput.TBN = output.TBN;
materialInput.TwoSidedSign = 1;
materialInput.SvPosition = output.Position;
materialInput.PreSkinnedPosition = Position;
materialInput.PreSkinnedPosition = position;
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
materialInput.InstanceOrigin = output.InstanceOrigin;
materialInput.InstanceParams = output.InstanceParams;

View File

@@ -19,6 +19,8 @@ float4 ViewInfo;
float4 ScreenSize;
float4 TemporalAAJitter;
float4x4 InverseViewProjectionMatrix;
float3 ViewPadding0;
float UnscaledTimeParam;
@1META_CB_END
// Shader resources

View File

@@ -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

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/SpriteMaterial.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/TexturePreviewMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Editor/Wires Debug Material.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Engine/DefaultMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/DefaultRadialMenu.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/DefaultTerrainMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/SingleColorMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/SkyboxMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Editor/Grid.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Fog.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SSAO.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Sky.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -13,6 +13,7 @@
"Configuration": {
"UseCSharp": true,
"UseLargeWorlds": false,
"UseDotNet": true
"UseDotNet": true,
"UseSDL": true
}
}

View File

@@ -73,6 +73,24 @@
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=TYPEDEF/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=UNION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNaming/UserRules/=UNION_005FMEMBER/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /&gt;</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">&lt;NamingElement Priority="11" Title="Class and struct public fields"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="PUBLIC"&gt;&lt;type Name="class field" /&gt;&lt;type Name="struct field" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=32EB6D69783B3E4481A733193E338089/@EntryIndexedValue">&lt;NamingElement Priority="9" Title="Class and struct methods"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="member function" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=3C4E0D59F298854F9608A9B454E8FF5E/@EntryIndexedValue">&lt;NamingElement Priority="17" Title="Typedefs"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="type alias" /&gt;&lt;type Name="typedef" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=499C9026DADA2B448BCD0B2C54746A59/@EntryIndexedValue">&lt;NamingElement Priority="14" Title="Other constants"&gt;&lt;Descriptor Static="True" Constexpr="Indeterminate" Const="True" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="class field" /&gt;&lt;type Name="local variable" /&gt;&lt;type Name="struct field" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=50D2535711CE1A43A3B06EF841C36CFD/@EntryIndexedValue">&lt;NamingElement Priority="13" Title="Enum members"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="scoped enumerator" /&gt;&lt;type Name="unscoped enumerator" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=6AD3BADA1260CC4D840AB26323C51827/@EntryIndexedValue">&lt;NamingElement Priority="15" Title="Global constants"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="True" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="global variable" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=904CDCA174AACE4AA52660A247CDF9A0/@EntryIndexedValue">&lt;NamingElement Priority="7" Title="Global variables"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="global variable" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=95BCDE767C97B64DB3DAE800DBBBC758/@EntryIndexedValue">&lt;NamingElement Priority="5" Title="Parameters"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="function parameter" /&gt;&lt;type Name="lambda parameter" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=C03AE454FC2CBA43819AC75E4D6C9C8C/@EntryIndexedValue">&lt;NamingElement Priority="1" Title="Classes and structs"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="__interface" /&gt;&lt;type Name="class" /&gt;&lt;type Name="struct" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=D49E31C610641E4CAD0407DB79ACC851/@EntryIndexedValue">&lt;NamingElement Priority="8" Title="Global functions"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="global function" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=D73FBB3529BC5449B6C85BB37B26A8D4/@EntryIndexedValue">&lt;NamingElement Priority="16" Title="Namespaces"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="namespace" /&gt;&lt;type Name="namespace alias" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DA41807CE47AEB4CBE1724C44D0B786E/@EntryIndexedValue">&lt;NamingElement Priority="6" Title="Local variables"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="local variable" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DDF30C9A1DA74B4DBBC56D25FDF886AA/@EntryIndexedValue">&lt;NamingElement Priority="10" Title="Class and struct fields"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="class field" /&gt;&lt;type Name="struct field" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="_" Suffix="" Style="aaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=EF70A6BF54ACE446971DDB32344C25A3/@EntryIndexedValue">&lt;NamingElement Priority="12" Title="Union members"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="union member" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=F37818C54C323A4A80B1A478629985AE/@EntryIndexedValue">&lt;NamingElement Priority="2" Title="Enums"&gt;&lt;Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"&gt;&lt;type Name="enum" /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/NamingElement&gt;</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">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"&gt;&lt;ExtraRule Prefix="_" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</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>

View File

@@ -1,19 +0,0 @@
<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/flaxengine/FlaxEngine/issues?q=is%3Aissue
-->
**Issue description:**
<!-- What happened, and what was expected. -->
<!-- Log file, can be found in the project directory's `Logs` folder (optional) -->
**Steps to reproduce:**
<!-- Enter minimal reproduction steps if available. -->
**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
**Flax version:**
<!-- Specify version number. -->

View File

@@ -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`
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib`
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev zenity wayland-protocols libportal-dev`
* Fedora: `sudo dnf install libX11-devel libXcursor-devel libXinerama-devel ghc-zlib-devel zenity wayland-protocols-devel libportal`
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib zenity wayland-protocols libportal`
* 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`)

View File

@@ -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>

View File

@@ -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 />

View File

@@ -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>

View File

@@ -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>
@@ -111,7 +117,8 @@ namespace FlaxEditor.Content.Create
private static bool IsValid(Type type)
{
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
var controlTypes = Editor.Instance.CodeEditing.Controls.Get();
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType && controlTypes.Contains(new ScriptType(type));
}
}

View File

@@ -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.")]

View File

@@ -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>

View File

@@ -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();

View File

@@ -282,7 +282,7 @@ namespace FlaxEditor.Content
if (data is DragDataFiles)
return DragDropEffect.Copy;
return _dragOverItems.Effect;
return _dragOverItems?.Effect ?? DragDropEffect.None;
}
/// <inheritdoc />

View File

@@ -20,7 +20,7 @@ namespace FlaxEditor.Content
}
/// <inheritdoc />
public override string TypeDescription => Path.EndsWith(".h") ? "C++ Header File" : "C++ Source Code";
public override string TypeDescription => Path.EndsWith(".h") || Path.EndsWith(".hpp") ? "C++ Header File" : "C++ Source Code";
/// <inheritdoc />
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CPPScript128;

View File

@@ -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>

View File

@@ -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;
}
}
}

View File

@@ -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;
}

View File

@@ -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.");

View File

@@ -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();
}

View File

@@ -87,8 +87,11 @@ namespace FlaxEditor.CustomEditors
var targetTypeType = TypeUtils.GetType(targetType);
if (canUseRefPicker)
{
// TODO: add generic way of CustomEditor for ref pickers (use it on AssetRefEditor/GPUTextureEditor/...)
if (typeof(Asset).IsAssignableFrom(targetTypeType))
return new AssetRefEditor();
if (typeof(GPUTexture).IsAssignableFrom(targetTypeType))
return new GPUTextureEditor();
if (typeof(FlaxEngine.Object).IsAssignableFrom(targetTypeType))
return new FlaxObjectRefEditor();
}

View File

@@ -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();
}
}
}
}

View File

@@ -13,6 +13,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
public class AudioSourceEditor : ActorEditor
{
private Label _infoLabel;
private Slider _slider;
private AudioSource.States _slideStartState;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
@@ -28,7 +30,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
_infoLabel = playbackGroup.Label(string.Empty).Label;
_infoLabel.AutoHeight = true;
var grid = playbackGroup.CustomContainer<UniformGridPanel>();
// Play back slider
var sliderElement = playbackGroup.CustomContainer<Slider>();
_slider = sliderElement.CustomControl;
_slider.ThumbSize = new Float2(_slider.ThumbSize.X * 0.5f, _slider.ThumbSize.Y);
_slider.SlidingStart += OnSlidingStart;
_slider.SlidingEnd += OnSlidingEnd;
var grid = playbackGroup.UniformGrid();
var gridControl = grid.CustomControl;
gridControl.ClipChildren = false;
gridControl.Height = Button.DefaultHeight;
@@ -40,6 +49,38 @@ namespace FlaxEditor.CustomEditors.Dedicated
}
}
private void OnSlidingEnd()
{
foreach (var value in Values)
{
if (value is AudioSource audioSource && audioSource.Clip)
{
switch (_slideStartState)
{
case AudioSource.States.Playing:
audioSource.Play();
break;
case AudioSource.States.Paused:
case AudioSource.States.Stopped:
audioSource.Pause();
break;
default: break;
}
}
}
}
private void OnSlidingStart()
{
foreach (var value in Values)
{
if (value is AudioSource audioSource && audioSource.Clip)
{
_slideStartState = audioSource.State;
}
}
}
/// <inheritdoc />
public override void Refresh()
{
@@ -51,7 +92,29 @@ namespace FlaxEditor.CustomEditors.Dedicated
foreach (var value in Values)
{
if (value is AudioSource audioSource && audioSource.Clip)
{
text += $"Time: {audioSource.Time:##0.0}s / {audioSource.Clip.Length:##0.0}s\n";
_slider.Maximum = audioSource.Clip.Length;
_slider.Minimum = 0;
if (_slider.IsSliding)
{
if (audioSource.State != AudioSource.States.Playing)
{
// Play to move slider correctly
audioSource.Play();
audioSource.Time = _slider.Value;
}
else
{
audioSource.Time = _slider.Value;
}
}
else
{
_slider.Value = audioSource.Time;
}
}
}
_infoLabel.Text = text;
}

View File

@@ -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;

View File

@@ -0,0 +1,68 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEditor.GUI.ContextMenu;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Basic editor/viewer for <see cref="GPUTexture"/>.
/// </summary>
[CustomEditor(typeof(GPUTexture)), DefaultEditor]
public class GPUTextureEditor : CustomEditor
{
private Image _image;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
_image = new Image
{
Brush = new GPUTextureBrush(),
Size = new Float2(200, 100),
Parent = layout.ContainerControl,
};
_image.Clicked += OnImageClicked;
}
private void OnImageClicked(Image image, MouseButton button)
{
var texture = Values[0] as GPUTexture;
if (!texture || button != MouseButton.Right)
return;
var menu = new ContextMenu();
menu.AddButton("Save...", () => Screenshot.Capture(Values[0] as GPUTexture));
menu.AddButton("Enlarge", () => _image.Size *= 2);
menu.AddButton("Shrink", () => _image.Size /= 2).Enabled = _image.Height > 32;
var location = image.PointFromScreen(Input.MouseScreenPosition);
menu.Show(image, location);
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
var texture = Values[0] as GPUTexture;
((GPUTextureBrush)_image.Brush).Texture = texture;
if (texture)
{
var desc = texture.Description;
#if BUILD_RELEASE
var name = string.Empty;
#else
var name = texture.Name;
#endif
_image.TooltipText = $"{name}\nType: {texture.ResourceType}\nSize: {desc.Width}x{desc.Height}\nFormat: {desc.Format}\nMemory: {Utilities.Utils.FormatBytesCount(texture.MemoryUsage)}";
}
else
{
_image.TooltipText = "None";
}
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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
@@ -186,12 +190,12 @@ namespace FlaxEditor.CustomEditors.Dedicated
foreach (var file in files)
FindNewKeysCSharp(file, newKeys, allKeys);
// C++
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.cpp", SearchOption.AllDirectories);
// C/C++
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.cpp", SearchOption.AllDirectories).Concat(Directory.GetFiles(Globals.ProjectSourceFolder, "*.c", SearchOption.AllDirectories)).ToArray();
filesCount += files.Length;
foreach (var file in files)
FindNewKeysCpp(file, newKeys, allKeys);
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.h", SearchOption.AllDirectories);
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.h", SearchOption.AllDirectories).Concat(Directory.GetFiles(Globals.ProjectSourceFolder, "*.hpp", SearchOption.AllDirectories)).ToArray();;
filesCount += files.Length;
foreach (var file in files)
FindNewKeysCpp(file, newKeys, allKeys);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);
}
}
}

View File

@@ -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;

View File

@@ -36,6 +36,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
{
ScriptName = scriptName;
TooltipText = "Create a new script";
DrawHighlights = false;
}
}
@@ -70,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4;
_addScriptsButton = new Button
{
TooltipText = "Add new scripts to the actor",
TooltipText = "Add new scripts to the actor.",
AnchorPreset = AnchorPresets.MiddleCenter,
Text = buttonText,
Parent = this,
@@ -114,7 +115,16 @@ namespace FlaxEditor.CustomEditors.Dedicated
cm.TextChanged += text =>
{
if (!IsValidScriptName(text))
{
// Remove NewScriptItems
List<Control> newScriptItems = cm.ItemsPanel.Children.FindAll(c => c is NewScriptItem);
foreach (var item in newScriptItems)
{
cm.ItemsPanel.RemoveChild(item);
}
return;
}
if (!cm.ItemsPanel.Children.Any(x => x.Visible && x is not NewScriptItem))
{
// If there are no visible items, that means the search failed so we can find the create script button or create one if it's the first time
@@ -876,7 +886,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Add drag button to the group
var scriptDrag = new DragImage
{
TooltipText = "Script reference",
TooltipText = "Script reference.",
AutoFocus = true,
IsScrollable = false,
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,

View File

@@ -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;

View File

@@ -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);
}
}
}

View File

@@ -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 && Editor._canResize;
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 && Editor._canResize;
var paste = menu.AddButton("Paste", linkedEditor.Paste);
paste.Enabled = linkedEditor.CanPaste;
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
if (_canReorder)
{
@@ -418,7 +422,8 @@ namespace FlaxEditor.CustomEditors.Editors
moveDownButton.Enabled = Index + 1 < Editor.Count;
}
menu.AddButton("Remove", OnRemoveClicked);
b = menu.AddButton("Remove", OnRemoveClicked);
b.Enabled = !Editor._readOnly && Editor._canResize;
menu.Show(panel, location);
}
@@ -642,10 +647,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 +661,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 +746,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.

View File

@@ -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;

View File

@@ -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)),
};
}
}

View File

@@ -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.");
}
}
}

View File

@@ -3,6 +3,7 @@
using System;
using FlaxEditor.GUI;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.Utilities;
namespace FlaxEditor.CustomEditors.Editors
@@ -81,9 +82,13 @@ namespace FlaxEditor.CustomEditors.Editors
private OptionType[] _options;
private ScriptType _type;
private Elements.PropertiesListElement _typeItem;
private ScriptType Type => Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]);
/// <inheritdoc />
public override bool RevertValueWithChildren => false; // Always revert value for a whole object
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
@@ -98,7 +103,8 @@ namespace FlaxEditor.CustomEditors.Editors
_type = type;
// Type
var typeEditor = layout.ComboBox(TypeComboBoxName, "Type of the object value. Use it to change the object.");
_typeItem = layout.AddPropertyItem(TypeComboBoxName, "Type of the object value. Use it to change the object.");
var typeEditor = _typeItem.ComboBox();
for (int i = 0; i < _options.Length; i++)
{
typeEditor.ComboBox.AddItem(_options[i].Name);
@@ -126,6 +132,8 @@ namespace FlaxEditor.CustomEditors.Editors
// Value
var values = new CustomValueContainer(type, (instance, index) => instance);
if (Values.HasReferenceValue)
values.SetReferenceValue(Values.ReferenceValue);
values.AddRange(Values);
var editor = CustomEditorsUtil.CreateEditor(type);
var style = editor.Style;
@@ -170,6 +178,12 @@ namespace FlaxEditor.CustomEditors.Editors
{
base.Refresh();
// Show prefab diff when reference value type is different
var color = Color.Transparent;
if (Values.HasReferenceValue && CanRevertReferenceValue && Values[0]?.GetType() != Values.ReferenceValue?.GetType())
color = FlaxEngine.GUI.Style.Current.BackgroundSelected;
_typeItem.Labels[0].HighlightStripColor = color;
// Check if type has been modified outside the editor (eg. from code)
if (Type != _type)
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -604,6 +604,9 @@ namespace FlaxEditor.CustomEditors.Editors
root.SortChildrenRecursive();
root.Expand(true);
if (Input.GetKey(KeyboardKeys.Shift))
root.ExpandAll(true);
return menu;
}
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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,
};

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -51,6 +51,7 @@ namespace FlaxEditor
private readonly List<EditorModule> _modules = new List<EditorModule>(16);
private bool _isAfterInit, _areModulesInited, _areModulesAfterInitEnd, _isHeadlessMode, _autoExit;
private string _projectToOpen;
private bool _projectIsNew;
private float _lastAutoSaveTimer, _autoExitTimeout = 0.1f;
private Button _saveNowButton;
private Button _cancelSaveButton;
@@ -528,7 +529,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 +675,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()
@@ -731,11 +738,12 @@ namespace FlaxEditor
var procSettings = new CreateProcessSettings
{
FileName = Platform.ExecutableFilePath,
Arguments = string.Format("-project \"{0}\"", _projectToOpen),
Arguments = string.Format("-project \"{0}\"" + (_projectIsNew ? " -new" : string.Empty), _projectToOpen),
ShellExecute = true,
WaitForEnd = false,
HiddenWindow = false,
};
_projectIsNew = false;
_projectToOpen = null;
Platform.CreateProcess(ref procSettings);
}
@@ -784,6 +792,24 @@ namespace FlaxEditor
}
}
/// <summary>
/// Creates the given project. Afterwards closes this project with running editor and opens the given project.
/// </summary>
/// <param name="projectFilePath">The project file path.</param>
public void NewProject(string projectFilePath)
{
if (projectFilePath == null)
{
MessageBox.Show("Missing project");
return;
}
// Cache project path and start editor exit (it will open new instance on valid closing)
_projectToOpen = StringUtils.NormalizePath(Path.GetDirectoryName(projectFilePath));
_projectIsNew = true;
Windows.MainWindow.Close(ClosingReason.User);
}
/// <summary>
/// Closes this project with running editor and opens the given project.
/// </summary>
@@ -1031,6 +1057,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

View File

@@ -39,6 +39,7 @@ namespace FlaxEditor
public SpriteHandle Globe32;
public SpriteHandle CamSpeed32;
public SpriteHandle Link32;
public SpriteHandle BrokenLink32;
public SpriteHandle Add32;
public SpriteHandle Left32;
public SpriteHandle Right32;
@@ -94,6 +95,7 @@ namespace FlaxEditor
public SpriteHandle Search64;
public SpriteHandle Bone64;
public SpriteHandle Link64;
public SpriteHandle BrokenLink64;
public SpriteHandle Build64;
public SpriteHandle Add64;
public SpriteHandle ShipIt64;

View File

@@ -299,6 +299,7 @@ namespace FlaxEditor.GUI
{
// Select asset
Editor.Instance.Windows.ContentWin.Select(Validator.SelectedItem);
Editor.Instance.Windows.ContentWin.ClearItemsSearch();
}
}
else if (Button1Rect.Contains(location))
@@ -312,6 +313,7 @@ namespace FlaxEditor.GUI
{
// Select asset
Editor.Instance.Windows.ContentWin.Select(Validator.SelectedItem);
Editor.Instance.Windows.ContentWin.ClearItemsSearch();
}
else if (Button3Rect.Contains(location))
{

View File

@@ -1,7 +1,10 @@
#if PLATFORM_WINDOWS
#if PLATFORM_WINDOWS || PLATFORM_SDL
#define USE_IS_FOREGROUND
#else
#endif
#if PLATFORM_SDL
#define USE_SDL_WORKAROUNDS
#endif
// Copyright (c) Wojciech Figat. All rights reserved.
using System.Collections.Generic;
@@ -121,7 +124,7 @@ namespace FlaxEditor.GUI.ContextMenu
}
/// <summary>
/// Shows the empty menu popup o na screen.
/// Shows the empty menu popup on a screen.
/// </summary>
/// <param name="control">The target control.</param>
/// <param name="area">The target control area to cover.</param>
@@ -256,7 +259,9 @@ namespace FlaxEditor.GUI.ContextMenu
desc.AllowMaximize = false;
desc.AllowDragAndDrop = false;
desc.IsTopmost = true;
desc.IsRegularWindow = false;
desc.Type = WindowType.Popup;
desc.Parent = parentWin.Window;
desc.Title = "ContextMenu";
desc.HasSizingFrame = false;
OnWindowCreating(ref desc);
_window = Platform.CreateWindow(ref desc);
@@ -265,6 +270,12 @@ namespace FlaxEditor.GUI.ContextMenu
_window.GotFocus += OnWindowGotFocus;
_window.LostFocus += OnWindowLostFocus;
}
#if USE_IS_FOREGROUND && USE_SDL_WORKAROUNDS
// The focus between popup and parent windows doesn't change, force hide the popup when clicked on parent
parentWin.Window.MouseDown += OnWindowMouseDown;
_window.Closed += () => parentWin.Window.MouseDown -= OnWindowMouseDown;
#endif
// Attach to the window
_parentCM = parent as ContextMenuBase;
@@ -285,6 +296,17 @@ namespace FlaxEditor.GUI.ContextMenu
}
}
private static void ForceDefocus(ContainerControl c)
{
foreach (var cc in c.Children)
{
if (cc.ContainsFocus)
cc.Defocus();
if (cc is ContainerControl ccc)
ForceDefocus(ccc);
}
}
/// <summary>
/// Hide popup menu and all child menus.
/// </summary>
@@ -299,6 +321,9 @@ namespace FlaxEditor.GUI.ContextMenu
// Close child
HideChild();
// Force defocus
ForceDefocus(this);
// Unlink from window
Parent = null;
@@ -426,6 +451,17 @@ namespace FlaxEditor.GUI.ContextMenu
}
}
#if USE_SDL_WORKAROUNDS
private void OnWindowGotFocus()
{
}
private void OnWindowMouseDown(ref Float2 mousePosition, MouseButton button, ref bool handled)
{
// The user clicked outside the popup window
Hide();
}
#else
private void OnWindowGotFocus()
{
var child = _childCM;
@@ -439,6 +475,7 @@ namespace FlaxEditor.GUI.ContextMenu
});
}
}
#endif
private void OnWindowLostFocus()
{
@@ -537,7 +574,12 @@ namespace FlaxEditor.GUI.ContextMenu
// Let root context menu to check if none of the popup windows
if (_parentCM == null && UseVisibilityControl && !IsForeground)
{
#if USE_SDL_WORKAROUNDS
if (!IsMouseOver)
Hide();
#else
Hide();
#endif
}
}
#endif

View File

@@ -326,8 +326,11 @@ namespace FlaxEditor.GUI.Dialogs
// Update eye dropper tool
if (_activeEyedropper)
{
// Try reading the color under the cursor in realtime if supported by the platform
Float2 mousePosition = Platform.MousePosition;
SelectedColor = ScreenUtilities.GetColorAt(mousePosition);
Color color = ScreenUtilities.GetColorAt(mousePosition);
if (color != Color.Transparent)
SelectedColor = color;
}
}

View File

@@ -1,545 +0,0 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.GUI.Docking
{
/// <summary>
/// Helper class used to handle docking windows dragging and docking.
/// </summary>
public class DockHintWindow
{
private FloatWindowDockPanel _toMove;
private Float2 _dragOffset;
private Float2 _defaultWindowSize;
private Rectangle _rectDock;
private Rectangle _rectWindow;
private Float2 _mouse;
private DockState _toSet;
private DockPanel _toDock;
private bool _lateDragOffsetUpdate;
private Rectangle _rLeft, _rRight, _rBottom, _rUpper, _rCenter;
private DockHintWindow(FloatWindowDockPanel toMove)
{
_toMove = toMove;
_toSet = DockState.Float;
var window = toMove.Window.Window;
// Remove focus from drag target
_toMove.Focus();
_toMove.Defocus();
// Focus window
window.Focus();
// Check if window is maximized and restore window.
if (window.IsMaximized)
{
// Restore window and set position to mouse.
var mousePos = window.MousePosition;
var previousSize = window.Size;
window.Restore();
window.Position = Platform.MousePosition - mousePos * window.Size / previousSize;
}
// Calculate dragging offset and move window to the destination position
var mouseScreenPosition = Platform.MousePosition;
// If the _toMove window was not focused when initializing this window, the result vector only contains zeros
// and to prevent a failure, we need to perform an update for the drag offset at later time which will be done in the OnMouseMove event handler.
if (mouseScreenPosition != Float2.Zero)
CalculateDragOffset(mouseScreenPosition);
else
_lateDragOffsetUpdate = true;
// Get initial size
_defaultWindowSize = window.Size;
// Init proxy window
Proxy.Init(ref _defaultWindowSize);
// Bind events
Proxy.Window.MouseUp += OnMouseUp;
Proxy.Window.MouseMove += OnMouseMove;
Proxy.Window.LostFocus += OnLostFocus;
// Start tracking mouse
Proxy.Window.StartTrackingMouse(false);
// Update window GUI
Proxy.Window.GUI.PerformLayout();
// Update rectangles
UpdateRects();
// Hide base window
window.Hide();
// Enable hit window presentation
Proxy.Window.RenderingEnabled = true;
Proxy.Window.Show();
Proxy.Window.Focus();
}
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
public void Dispose()
{
// End tracking mouse
Proxy.Window.EndTrackingMouse();
// Disable rendering
Proxy.Window.RenderingEnabled = false;
// Unbind events
Proxy.Window.MouseUp -= OnMouseUp;
Proxy.Window.MouseMove -= OnMouseMove;
Proxy.Window.LostFocus -= OnLostFocus;
// Hide the proxy
Proxy.Hide();
if (_toMove == null)
return;
// Check if window won't be docked
if (_toSet == DockState.Float)
{
var window = _toMove.Window?.Window;
if (window == null)
return;
var mouse = Platform.MousePosition;
// Move base window
window.Position = mouse - _dragOffset;
// Show base window
window.Show();
}
else
{
bool hasNoChildPanels = _toMove.ChildPanelsCount == 0;
// Check if window has only single tab
if (hasNoChildPanels && _toMove.TabsCount == 1)
{
// Dock window
_toMove.GetTab(0).Show(_toSet, _toDock);
}
// Check if dock as tab and has no child panels
else if (hasNoChildPanels && _toSet == DockState.DockFill)
{
// Dock all tabs
while (_toMove.TabsCount > 0)
{
_toMove.GetTab(0).Show(DockState.DockFill, _toDock);
}
}
else
{
var selectedTab = _toMove.SelectedTab;
// Dock the first tab into the target location
var firstTab = _toMove.GetTab(0);
firstTab.Show(_toSet, _toDock);
// Dock rest of the tabs
while (_toMove.TabsCount > 0)
{
_toMove.GetTab(0).Show(DockState.DockFill, firstTab);
}
// Keep selected tab being selected
selectedTab?.SelectTab();
}
// Focus target window
_toDock.Root.Focus();
}
_toMove = null;
}
/// <summary>
/// Creates the new dragging hit window.
/// </summary>
/// <param name="toMove">Floating dock panel to move.</param>
/// <returns>The dock hint window object.</returns>
public static DockHintWindow Create(FloatWindowDockPanel toMove)
{
if (toMove == null)
throw new ArgumentNullException();
return new DockHintWindow(toMove);
}
/// <summary>
/// Creates the new dragging hit window.
/// </summary>
/// <param name="toMove">Dock window to move.</param>
/// <returns>The dock hint window object.</returns>
public static DockHintWindow Create(DockWindow toMove)
{
if (toMove == null)
throw new ArgumentNullException();
// Show floating
toMove.ShowFloating();
// Move window to the mouse position (with some offset for caption bar)
var window = (WindowRootControl)toMove.Root;
var mouse = Platform.MousePosition;
window.Window.Position = mouse - new Float2(8, 8);
// Get floating panel
var floatingPanelToMove = window.GetChild(0) as FloatWindowDockPanel;
return new DockHintWindow(floatingPanelToMove);
}
/// <summary>
/// Calculates window rectangle in the dock window.
/// </summary>
/// <param name="state">Window dock state.</param>
/// <param name="rect">Dock panel rectangle.</param>
/// <returns>Calculated window rectangle.</returns>
public static Rectangle CalculateDockRect(DockState state, ref Rectangle rect)
{
Rectangle result = rect;
switch (state)
{
case DockState.DockFill:
result.Location.Y += DockPanel.DefaultHeaderHeight;
result.Size.Y -= DockPanel.DefaultHeaderHeight;
break;
case DockState.DockTop:
result.Size.Y *= DockPanel.DefaultSplitterValue;
break;
case DockState.DockLeft:
result.Size.X *= DockPanel.DefaultSplitterValue;
break;
case DockState.DockBottom:
result.Location.Y += result.Size.Y * (1 - DockPanel.DefaultSplitterValue);
result.Size.Y *= DockPanel.DefaultSplitterValue;
break;
case DockState.DockRight:
result.Location.X += result.Size.X * (1 - DockPanel.DefaultSplitterValue);
result.Size.X *= DockPanel.DefaultSplitterValue;
break;
}
return result;
}
private void CalculateDragOffset(Float2 mouseScreenPosition)
{
var baseWinPos = _toMove.Window.Window.Position;
_dragOffset = mouseScreenPosition - baseWinPos;
}
private void UpdateRects()
{
// Cache mouse position
_mouse = Platform.MousePosition;
// Check intersection with any dock panel
var uiMouse = _mouse;
_toDock = _toMove.MasterPanel.HitTest(ref uiMouse, _toMove);
// Check dock state to use
bool showProxyHints = _toDock != null;
bool showBorderHints = showProxyHints;
bool showCenterHint = showProxyHints;
if (showProxyHints)
{
// If moved window has not only tabs but also child panels disable docking as tab
if (_toMove.ChildPanelsCount > 0)
showCenterHint = false;
// Disable docking windows with one or more dock panels inside
if (_toMove.ChildPanelsCount > 0)
showBorderHints = false;
// Get dock area
_rectDock = _toDock.DockAreaBounds;
// Cache dock rectangles
var size = _rectDock.Size;
var offset = _rectDock.Location;
var borderMargin = 4.0f;
var hintWindowsSize = Proxy.HintWindowsSize * Platform.DpiScale;
var hintWindowsSize2 = hintWindowsSize * 0.5f;
var centerX = size.X * 0.5f;
var centerY = size.Y * 0.5f;
_rUpper = new Rectangle(centerX - hintWindowsSize2, borderMargin, hintWindowsSize, hintWindowsSize) + offset;
_rBottom = new Rectangle(centerX - hintWindowsSize2, size.Y - hintWindowsSize - borderMargin, hintWindowsSize, hintWindowsSize) + offset;
_rLeft = new Rectangle(borderMargin, centerY - hintWindowsSize2, hintWindowsSize, hintWindowsSize) + offset;
_rRight = new Rectangle(size.X - hintWindowsSize - borderMargin, centerY - hintWindowsSize2, hintWindowsSize, hintWindowsSize) + offset;
_rCenter = new Rectangle(centerX - hintWindowsSize2, centerY - hintWindowsSize2, hintWindowsSize, hintWindowsSize) + offset;
// Hit test
DockState toSet = DockState.Float;
if (showBorderHints)
{
if (_rUpper.Contains(_mouse))
toSet = DockState.DockTop;
else if (_rBottom.Contains(_mouse))
toSet = DockState.DockBottom;
else if (_rLeft.Contains(_mouse))
toSet = DockState.DockLeft;
else if (_rRight.Contains(_mouse))
toSet = DockState.DockRight;
}
if (showCenterHint && _rCenter.Contains(_mouse))
toSet = DockState.DockFill;
_toSet = toSet;
// Show proxy hint windows
Proxy.Down.Position = _rBottom.Location;
Proxy.Left.Position = _rLeft.Location;
Proxy.Right.Position = _rRight.Location;
Proxy.Up.Position = _rUpper.Location;
Proxy.Center.Position = _rCenter.Location;
}
else
{
_toSet = DockState.Float;
}
// Update proxy hint windows visibility
Proxy.Down.IsVisible = showProxyHints & showBorderHints;
Proxy.Left.IsVisible = showProxyHints & showBorderHints;
Proxy.Right.IsVisible = showProxyHints & showBorderHints;
Proxy.Up.IsVisible = showProxyHints & showBorderHints;
Proxy.Center.IsVisible = showProxyHints & showCenterHint;
// Calculate proxy/dock/window rectangles
if (_toDock == null)
{
// Floating window over nothing
_rectWindow = new Rectangle(_mouse - _dragOffset, _defaultWindowSize);
}
else
{
if (_toSet == DockState.Float)
{
// Floating window over dock panel
_rectWindow = new Rectangle(_mouse - _dragOffset, _defaultWindowSize);
}
else
{
// Use only part of the dock panel to show hint
_rectWindow = CalculateDockRect(_toSet, ref _rectDock);
}
}
// Update proxy window
Proxy.Window.ClientBounds = _rectWindow;
}
private void OnMouseUp(ref Float2 location, MouseButton button, ref bool handled)
{
if (button == MouseButton.Left)
{
Dispose();
}
}
private void OnMouseMove(ref Float2 mousePos)
{
// Recalculate the drag offset because the current mouse screen position was invalid when we initialized the window
if (_lateDragOffsetUpdate)
{
// Calculate dragging offset and move window to the destination position
CalculateDragOffset(mousePos);
// Reset state
_lateDragOffsetUpdate = false;
}
UpdateRects();
}
private void OnLostFocus()
{
Dispose();
}
/// <summary>
/// Contains helper proxy windows shared across docking panels. They are used to visualize docking window locations.
/// </summary>
public static class Proxy
{
/// <summary>
/// The drag proxy window.
/// </summary>
public static Window Window;
/// <summary>
/// The left hint proxy window.
/// </summary>
public static Window Left;
/// <summary>
/// The right hint proxy window.
/// </summary>
public static Window Right;
/// <summary>
/// The up hint proxy window.
/// </summary>
public static Window Up;
/// <summary>
/// The down hint proxy window.
/// </summary>
public static Window Down;
/// <summary>
/// The center hint proxy window.
/// </summary>
public static Window Center;
/// <summary>
/// The hint windows size.
/// </summary>
public const float HintWindowsSize = 32.0f;
/// <summary>
/// Initializes the hit proxy windows. Those windows are used to indicate drag target areas (left, right, top, bottom, etc.).
/// </summary>
public static void InitHitProxy()
{
CreateProxy(ref Left, "DockHint.Left");
CreateProxy(ref Right, "DockHint.Right");
CreateProxy(ref Up, "DockHint.Up");
CreateProxy(ref Down, "DockHint.Down");
CreateProxy(ref Center, "DockHint.Center");
}
/// <summary>
/// Initializes the hint window.
/// </summary>
/// <param name="initSize">Initial size of the proxy window.</param>
public static void Init(ref Float2 initSize)
{
if (Window == null)
{
var settings = CreateWindowSettings.Default;
settings.Title = "DockHint.Window";
settings.Size = initSize;
settings.AllowInput = true;
settings.AllowMaximize = false;
settings.AllowMinimize = false;
settings.HasBorder = false;
settings.HasSizingFrame = false;
settings.IsRegularWindow = false;
settings.SupportsTransparency = true;
settings.ShowInTaskbar = false;
settings.ShowAfterFirstPaint = false;
settings.IsTopmost = true;
Window = Platform.CreateWindow(ref settings);
Window.Opacity = 0.6f;
Window.GUI.BackgroundColor = Style.Current.Selection;
Window.GUI.AddChild<DragVisuals>();
}
else
{
// Resize proxy
Window.ClientSize = initSize;
}
InitHitProxy();
}
private sealed class DragVisuals : Control
{
public DragVisuals()
{
AnchorPreset = AnchorPresets.StretchAll;
Offsets = Margin.Zero;
}
public override void Draw()
{
Render2D.DrawRectangle(new Rectangle(Float2.Zero, Size), Style.Current.SelectionBorder);
}
}
private static void CreateProxy(ref Window win, string name)
{
if (win != null)
return;
var settings = CreateWindowSettings.Default;
settings.Title = name;
settings.Size = new Float2(HintWindowsSize * Platform.DpiScale);
settings.AllowInput = false;
settings.AllowMaximize = false;
settings.AllowMinimize = false;
settings.HasBorder = false;
settings.HasSizingFrame = false;
settings.IsRegularWindow = false;
settings.SupportsTransparency = true;
settings.ShowInTaskbar = false;
settings.ActivateWhenFirstShown = false;
settings.IsTopmost = true;
settings.ShowAfterFirstPaint = false;
win = Platform.CreateWindow(ref settings);
win.Opacity = 0.6f;
win.GUI.BackgroundColor = Style.Current.Selection;
win.GUI.AddChild<DragVisuals>();
}
/// <summary>
/// Hides proxy windows.
/// </summary>
public static void Hide()
{
HideProxy(ref Window);
HideProxy(ref Left);
HideProxy(ref Right);
HideProxy(ref Up);
HideProxy(ref Down);
HideProxy(ref Center);
}
private static void HideProxy(ref Window win)
{
if (win)
{
win.Hide();
}
}
/// <summary>
/// Releases proxy data and windows.
/// </summary>
public static void Dispose()
{
DisposeProxy(ref Window);
DisposeProxy(ref Left);
DisposeProxy(ref Right);
DisposeProxy(ref Up);
DisposeProxy(ref Down);
DisposeProxy(ref Center);
}
private static void DisposeProxy(ref Window win)
{
if (win)
{
win.Close(ClosingReason.User);
win = null;
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More