From 806c3ed2972a62a7b9620a3149dd7fea534c71cf Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Thu, 11 Jun 2026 12:05:30 +0300 Subject: [PATCH] finished with `PartialEq` impls --- editor/src/asset/item.rs | 8 +- editor/src/asset/menu.rs | 2 +- editor/src/asset/selector.rs | 8 +- editor/src/audio/bus.rs | 2 +- editor/src/interaction/gizmo/move_gizmo.rs | 2 +- editor/src/interaction/gizmo/rotate_gizmo.rs | 4 +- editor/src/interaction/gizmo/scale_gizmo.rs | 4 +- editor/src/interaction/move_mode.rs | 6 +- editor/src/interaction/navmesh/mod.rs | 4 +- editor/src/interaction/plane.rs | 2 +- editor/src/interaction/rotate_mode.rs | 2 +- editor/src/interaction/scale_mode.rs | 2 +- editor/src/interaction/select_mode.rs | 2 +- editor/src/interaction/terrain.rs | 4 +- editor/src/light.rs | 2 +- editor/src/menu/file.rs | 5 +- editor/src/message.rs | 6 ++ editor/src/plugins/absm/blendspace.rs | 8 +- editor/src/plugins/absm/canvas.rs | 2 +- editor/src/plugins/absm/connection.rs | 2 +- editor/src/plugins/absm/node.rs | 5 +- editor/src/plugins/absm/segment.rs | 2 +- editor/src/plugins/absm/socket.rs | 2 +- editor/src/plugins/absm/transition.rs | 2 +- editor/src/plugins/animation/ruler.rs | 8 +- editor/src/plugins/animation/thumb.rs | 2 +- editor/src/plugins/animation/track.rs | 10 +-- editor/src/plugins/collider/mod.rs | 12 ++- editor/src/plugins/curve_editor.rs | 2 +- .../src/plugins/inspector/editors/dyntype.rs | 13 +-- editor/src/plugins/inspector/editors/font.rs | 2 +- .../src/plugins/inspector/editors/handle.rs | 7 +- .../src/plugins/inspector/editors/resource.rs | 3 +- .../src/plugins/inspector/editors/script.rs | 17 ++-- .../plugins/inspector/editors/shader/field.rs | 2 +- .../plugins/inspector/editors/shader/mod.rs | 2 +- .../inspector/editors/spritesheet/mod.rs | 2 +- .../inspector/editors/spritesheet/window.rs | 12 ++- .../src/plugins/inspector/editors/surface.rs | 7 +- .../src/plugins/inspector/editors/texture.rs | 3 +- editor/src/plugins/inspector/mod.rs | 10 ++- editor/src/plugins/material/editor.rs | 3 +- editor/src/plugins/material/mod.rs | 5 +- editor/src/plugins/probe.rs | 4 +- editor/src/plugins/ragdoll.rs | 2 +- editor/src/plugins/settings.rs | 31 ++++--- editor/src/plugins/tilemap/autotile.rs | 6 +- editor/src/plugins/tilemap/brush_macro.rs | 15 +++- editor/src/plugins/tilemap/handle_editor.rs | 2 +- editor/src/plugins/tilemap/handle_field.rs | 2 +- .../src/plugins/tilemap/interaction_mode.rs | 17 ++-- editor/src/plugins/tilemap/macro_inspector.rs | 2 +- editor/src/plugins/tilemap/mod.rs | 2 +- editor/src/plugins/tilemap/palette.rs | 9 ++- editor/src/plugins/tilemap/panel_preview.rs | 7 +- .../src/plugins/tilemap/tile_bounds_editor.rs | 2 +- editor/src/plugins/tilemap/tile_inspector.rs | 8 +- editor/src/plugins/tilemap/wfc.rs | 2 +- editor/src/scene/commands/mod.rs | 7 +- editor/src/scene/nullscene.rs | 2 +- editor/src/scene/property.rs | 14 ++-- editor/src/scene/selector.rs | 25 +++--- editor/src/scene/settings/mod.rs | 4 +- editor/src/ui_scene/commands/mod.rs | 9 +++ editor/src/ui_scene/interaction/mod.rs | 2 +- editor/src/ui_scene/interaction/move_mode.rs | 6 +- editor/src/world/item.rs | 4 +- fyrox-autotile/src/auto.rs | 2 +- fyrox-build-tools/src/export/mod.rs | 2 +- fyrox-impl/Cargo.toml | 2 +- fyrox-impl/src/engine/mod.rs | 17 ++-- fyrox-impl/src/resource/curve/mod.rs | 2 +- fyrox-impl/src/resource/model/mod.rs | 2 +- fyrox-impl/src/scene/animation/absm.rs | 2 +- fyrox-impl/src/scene/animation/mod.rs | 2 +- fyrox-impl/src/scene/base.rs | 80 ++++++++++++------- fyrox-impl/src/scene/camera.rs | 2 +- fyrox-impl/src/scene/collider.rs | 2 +- fyrox-impl/src/scene/debug.rs | 4 +- fyrox-impl/src/scene/decal.rs | 2 +- fyrox-impl/src/scene/dim2/collider.rs | 3 +- fyrox-impl/src/scene/dim2/joint.rs | 6 +- fyrox-impl/src/scene/dim2/physics.rs | 11 ++- fyrox-impl/src/scene/dim2/rectangle.rs | 2 +- fyrox-impl/src/scene/dim2/rigidbody.rs | 44 ++++------ fyrox-impl/src/scene/graph/mod.rs | 8 +- fyrox-impl/src/scene/graph/physics.rs | 6 +- fyrox-impl/src/scene/joint.rs | 6 +- fyrox-impl/src/scene/light/directional.rs | 2 +- fyrox-impl/src/scene/light/mod.rs | 2 +- fyrox-impl/src/scene/light/point.rs | 2 +- fyrox-impl/src/scene/light/spot.rs | 2 +- fyrox-impl/src/scene/mesh/buffer.rs | 8 +- fyrox-impl/src/scene/mesh/mod.rs | 12 ++- fyrox-impl/src/scene/mesh/surface.rs | 4 +- fyrox-impl/src/scene/mod.rs | 4 +- fyrox-impl/src/scene/navmesh.rs | 2 +- fyrox-impl/src/scene/node/container.rs | 2 +- fyrox-impl/src/scene/node/mod.rs | 8 +- fyrox-impl/src/scene/particle_system/mod.rs | 4 +- .../src/scene/particle_system/particle.rs | 2 +- fyrox-impl/src/scene/pivot.rs | 2 +- fyrox-impl/src/scene/probe.rs | 2 +- fyrox-impl/src/scene/ragdoll.rs | 2 +- fyrox-impl/src/scene/rigidbody.rs | 44 ++++------ fyrox-impl/src/scene/sound/listener.rs | 2 +- fyrox-impl/src/scene/sound/mod.rs | 2 +- fyrox-impl/src/scene/sprite.rs | 2 +- .../src/scene/terrain/brushstroke/mod.rs | 10 ++- fyrox-impl/src/scene/terrain/geometry.rs | 2 +- fyrox-impl/src/scene/terrain/mod.rs | 2 +- fyrox-impl/src/scene/tilemap/brush.rs | 8 +- fyrox-impl/src/scene/tilemap/data.rs | 4 +- fyrox-impl/src/scene/tilemap/effect.rs | 18 +++++ fyrox-impl/src/scene/tilemap/mod.rs | 46 +++++++---- fyrox-impl/src/scene/tilemap/property.rs | 6 +- fyrox-impl/src/scene/tilemap/tile_source.rs | 12 +-- fyrox-impl/src/scene/tilemap/tileset.rs | 10 +-- fyrox-impl/src/scene/tilemap/transform.rs | 2 +- fyrox-impl/src/scene/tilemap/update.rs | 2 +- fyrox-impl/src/scene/transform.rs | 2 +- fyrox-impl/src/script/mod.rs | 10 ++- fyrox-impl/src/utils/lightmap.rs | 6 +- fyrox-impl/src/utils/mod.rs | 31 +++++++ fyrox-math/src/aabb.rs | 2 +- fyrox-scripts/src/camera.rs | 2 +- fyrox-ui/src/inspector/editors/enumeration.rs | 1 + fyrox-ui/src/text_box.rs | 1 + fyrox-ui/src/widget.rs | 3 + project-manager/src/settings.rs | 4 +- 130 files changed, 524 insertions(+), 371 deletions(-) diff --git a/editor/src/asset/item.rs b/editor/src/asset/item.rs index d88f9a9f4..b258f78b0 100644 --- a/editor/src/asset/item.rs +++ b/editor/src/asset/item.rs @@ -26,7 +26,7 @@ use crate::{ asset::{manager::ResourceManager, untyped::UntypedResource, Resource, TypedResourceData}, core::{ algebra::Vector2, color::Color, futures::executor::block_on, make_relative_path, - parking_lot::lock_api::Mutex, pool::Handle, reflect::prelude::*, visitor::prelude::*, + pool::Handle, reflect::prelude::*, visitor::prelude::*, }, graph::SceneGraph, gui::{ @@ -54,10 +54,10 @@ use fyrox::core::ok_or_return; use fyrox::gui::border::Border; use fyrox::gui::image::Image; use fyrox::gui::message::MessageData; +use fyrox::gui::widget::UserData; use std::{ ops::{Deref, DerefMut}, path::{Path, PathBuf}, - sync::Arc, }; pub const DEFAULT_SIZE: f32 = 60.0; @@ -79,7 +79,7 @@ pub enum AssetItemMessage { impl MessageData for AssetItemMessage {} #[allow(dead_code)] -#[derive(Debug, Clone, Visit, Reflect)] +#[derive(Debug, Clone, Visit, PartialEq, Reflect)] #[reflect( derived_type = "UiNode", type_uuid = "54f7d9c1-e707-4c8c-a5c9-3fc5cc80b545" @@ -432,7 +432,7 @@ impl AssetItemBuilder { let item = AssetItem { widget: self .widget_builder - .with_user_data(Arc::new(Mutex::new(self.path.clone()))) + .with_user_data(UserData::new(self.path.clone())) .with_margin(Thickness::uniform(1.0)) .with_allow_drag(true) .with_allow_drop(true) diff --git a/editor/src/asset/menu.rs b/editor/src/asset/menu.rs index 41af9adf3..5f0816d25 100644 --- a/editor/src/asset/menu.rs +++ b/editor/src/asset/menu.rs @@ -61,7 +61,7 @@ use std::{ path::PathBuf, }; -#[derive(Clone, Visit, Reflect, Debug)] +#[derive(Clone, Visit, PartialEq, Reflect, Debug)] #[reflect(derived_type = "UiNode")] #[reflect(type_uuid = "8c9934ad-b4e1-4c68-9876-f253e34c6667")] struct AssetRenameDialog { diff --git a/editor/src/asset/selector.rs b/editor/src/asset/selector.rs index d94802312..bd603c4f5 100644 --- a/editor/src/asset/selector.rs +++ b/editor/src/asset/selector.rs @@ -79,7 +79,7 @@ pub enum AssetSelectorMessage { impl MessageData for AssetSelectorMessage {} #[derive(Clone, Debug, Reflect, Visit)] -#[reflect(type_uuid = "aa4f0726-8d25-4c90-add1-92ba392310c6")] +#[reflect(type_uuid = "aa4f0726-8d25-4c90-add1-92ba392310c6", non_comparable)] struct Item { pub widget: Widget, image: Handle, @@ -229,7 +229,7 @@ impl ItemBuilder { } } -#[derive(Clone, Debug, Reflect, Visit)] +#[derive(Clone, Debug, PartialEq, Reflect, Visit)] #[reflect(type_uuid = "970bb83b-51e8-48e7-8050-f97bf0ac470b")] pub struct AssetSelector { pub widget: Widget, @@ -387,7 +387,7 @@ impl<'a> AssetSelectorBuilder<'a> { } } -#[derive(Clone, Debug, Reflect, Visit)] +#[derive(Clone, Debug, PartialEq, Reflect, Visit)] #[reflect(type_uuid = "c348ad3d-52a6-40ad-a5e4-bf63fefe1906")] pub struct AssetSelectorWindow { pub window: Window, @@ -591,7 +591,7 @@ impl<'a> AssetSelectorWindowBuilder<'a> { } #[derive(Reflect, Visit, Debug)] -#[reflect(type_uuid = "7839eb64-1e6e-4e40-a8fb-53c9d0945b16")] +#[reflect(type_uuid = "7839eb64-1e6e-4e40-a8fb-53c9d0945b16", non_comparable)] pub struct AssetSelectorMixin { pub selector: Cell>, pub select: Handle