diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/CHANGELOG.md b/Aspid.FastTools/Assets/Aspid/FastTools/CHANGELOG.md index 3ca8b5b5..1c0d0e4d 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/CHANGELOG.md +++ b/Aspid.FastTools/Assets/Aspid/FastTools/CHANGELOG.md @@ -7,12 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- Per-type `SetLabel` overloads for `BaseField` covering 29 Unity types (`Quaternion`, `AnimationCurve`, `Bounds`, `BoundsInt`, `Color`, `Color32`, `Gradient`, `Hash128`, `Rect`, `Vector2/3/4`, `Vector2Int/3Int`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `decimal`, `short`, `ushort`, `byte`, `sbyte`, `char`, `string`, `Enum`, `Object`). ([#33]) +- Raw-enum overloads for all `StyleEnum` setters on `IStyleExtensions` and `VisualElementExtensions.Style` (e.g. `SetFlexWrap(Wrap)` alongside `SetFlexWrap(StyleEnum)`). ([#33]) +- Conditional `*If` variants (`AddChildIf`, `InsertChildIf`, `AddChildrenIf`, `InsertChildrenIf`) for all child management methods across `VisualElement`, `IEnumerable`, array and `List` sources. ([#33]) +- `BindTo(SerializedObject)` and `UnbindFrom()` editor-side fluent extensions for `VisualElement`. ([#33]) +- `SetLabel` for `PropertyField`, `SetBindingPath` for `IBindable` (editor-side). ([#33]) +- Extended `INotifyValueChanged` `ValueChanged` with per-type overloads for common Unity types. ([#33]) +- Extended `Button` (`SetText`), `Focusable`, `Manipulators` (`RemoveManipulator`), `ProgressBar` (`SetTitle`), `BaseListView`, `MultiColumnListView`, `MultiColumnTreeView` with new fluent methods. ([#33]) +- Math-assembly `SetValue` extensions for `float2/3/4`, `int2/3/4` types. ([#33]) + +### Changed +- Reorganized `BaseFieldExtensions` into `BaseFields/` subdirectory. ([#33]) +- Renamed `Unbind` extension to `UnbindFrom` for consistency with `BindTo`. ([#33]) +- Tightened `BindPropertyTo` generic constraint from `where T : IBindable` to `where T : VisualElement, IBindable`. ([#33]) + +### Fixed +- `SetMinSize` parameter naming bug (`maxHeight` → `minHeight`). ([#33]) +- Null-safety in `FocusableExtensions.IsFocus` — `focusController` is now null-checked to prevent `NullReferenceException`. ([#33]) +- `AddStyleSheetsFromResource` / `RemoveStyleSheetsFromResource` now log a warning and return gracefully instead of throwing when the stylesheet path is not found. ([#33]) + +[#33]: https://github.com/VPDPersonal/Aspid.FastTools/pull/33 + ## [1.0.0-rc.2] — 2026-05-18 Release-workflow validation build. No functional changes versus `1.0.0-rc.1`. ### Changed -- Integration URL in all four READMEs now points at the dedicated `upm` branch / `upm/` tag published by the release workflow (no `?path=` query needed). +- Integration URL in all four READMEs now points at the dedicated `upm` branch / `upm/` tag published by the release workflow (no `?path=` query needed). ([#30]) ## [1.0.0-rc.1] — 2026-05-18 @@ -21,74 +43,76 @@ First release candidate for `1.0.0`. Marketed as a preview while the **ID System ### Added #### ProfilerMarkers -- `this.Marker()` extension method that resolves to a `ProfilerMarker` unique to the call-site (enclosing type + method/field/property + line number). -- `ProfilerMarkersGenerator` (Roslyn incremental source generator) that emits one `ProfilerMarker` field per call-site and a per-type dispatcher. Walks through lambdas and local functions; supports `.WithName(literal)` and plain `$"..."` interpolated names; deduplicates fields when several call-sites share a line. -- Semantic gating: only `ProfilerMarkerExtensionsForGenerator.Marker` is rewritten, user-defined `Marker()` extensions are left untouched. -- The generated dispatcher is wrapped in `#if ENABLE_PROFILER` and falls back to `return default;`, so non-development builds carry no per-call cost. +- `this.Marker()` extension method that resolves to a `ProfilerMarker` unique to the call-site (enclosing type + method/field/property + line number). ([#8]) +- `ProfilerMarkersGenerator` (Roslyn incremental source generator) that emits one `ProfilerMarker` field per call-site and a per-type dispatcher. Walks through lambdas and local functions; supports `.WithName(literal)` and plain `$"..."` interpolated names; deduplicates fields when several call-sites share a line. ([#8]) +- Semantic gating: only `ProfilerMarkerExtensionsForGenerator.Marker` is rewritten, user-defined `Marker()` extensions are left untouched. ([#8]) +- The generated dispatcher is wrapped in `#if ENABLE_PROFILER` and falls back to `return default;`, so non-development builds carry no per-call cost. ([#8]) #### Serializable Type System -- `SerializableType` — `[Serializable]` wrapper around `System.Type` that stores the assembly-qualified name and resolves the type lazily on first access; implicit conversion to `Type`. -- `SerializableType` — generic variant with a base-type constraint enforced both at compile time and in the editor picker. -- `TypeSelectorAttribute` — `PropertyAttribute` (editor-only via `[Conditional("UNITY_EDITOR")]`) that drives the type picker on `string` fields and lets you constrain the picker to one or more base types. -- `TypeAllow` — `[Flags]` enum that opts the picker into abstract classes (`Abstract`), interfaces (`Interface`) or both (`All`); defaults to concrete classes only. -- `ComponentTypeSelector` — `[Serializable]` helper that surfaces a `Component`-typed sibling on the same `GameObject` through the inspector. -- `TypeSelectorWindow` — `EditorWindow`-based hierarchical type picker with namespace tree, fuzzy search, keyboard navigation and a public `Show(...)` API for invoking it from custom editors. -- Property drawers for `SerializableType`, `SerializableType`, `ComponentTypeSelector` and `[TypeSelector]` strings (IMGUI + UI Toolkit). UI Toolkit drawer renders a reusable `TypeField` / `InspectorTypeField` element. +- `SerializableType` — `[Serializable]` wrapper around `System.Type` that stores the assembly-qualified name and resolves the type lazily on first access; implicit conversion to `Type`. ([#8]) +- `SerializableType` — generic variant with a base-type constraint enforced both at compile time and in the editor picker. ([#8]) +- `TypeSelectorAttribute` — `PropertyAttribute` (editor-only via `[Conditional("UNITY_EDITOR")]`) that drives the type picker on `string` fields and lets you constrain the picker to one or more base types. ([#8]) +- `TypeAllow` — `[Flags]` enum that opts the picker into abstract classes (`Abstract`), interfaces (`Interface`) or both (`All`); defaults to concrete classes only. ([#8]) +- `ComponentTypeSelector` — `[Serializable]` helper that surfaces a `Component`-typed sibling on the same `GameObject` through the inspector. ([#8]) +- `TypeSelectorWindow` — `EditorWindow`-based hierarchical type picker with namespace tree, fuzzy search, keyboard navigation and a public `Show(...)` API for invoking it from custom editors. ([#8]) +- Property drawers for `SerializableType`, `SerializableType`, `ComponentTypeSelector` and `[TypeSelector]` strings (IMGUI + UI Toolkit). UI Toolkit drawer renders a reusable `TypeField` / `InspectorTypeField` element. ([#8]) #### Enum System -- `EnumValues` — `[Serializable]` enum-keyed dictionary that survives Unity serialization and handles `[Flags]` enums. -- `EnumValue` — single-entry building block used by the dictionary and exposed for standalone use. -- Custom property drawers for both types with inline editing in the inspector. +- `EnumValues` — `[Serializable]` enum-keyed dictionary that survives Unity serialization and handles `[Flags]` enums. ([#8]) +- `EnumValue` — single-entry building block used by the dictionary and exposed for standalone use. ([#8]) +- Custom property drawers for both types with inline editing in the inspector. ([#8]) #### ID System (Beta) -- `IId` marker interface and `[UniqueId]` attribute for ID-struct types (one struct ↔ one `IdRegistry`). -- `IdRegistry` (`ScriptableObject`) holding the canonical `int ↔ string` map; runtime lookups via `TryGetId`, `TryGetName`, `Contains(int)`, `Contains(string)`. -- `IdRegistryResolver` — lazily builds a `Type AQN → registry` index on first lookup and keeps it incrementally up to date through an `AssetPostprocessor`; `IdRegistry.OnEnable` marks the cache dirty so re-imports are picked up. -- `UniqueIdIndex` — sibling index used by the editor to detect `[UniqueId]` field-value collisions across registries. -- `IdStructGenerator` (Roslyn incremental source generator) emits the struct-side boilerplate (`_id`, `Id`, `__stringId`, equality, conversions) and supports generic target structs as well as generic containing types. -- Analyzer diagnostics: `AFID001` (the target `IId` struct must be `partial`) and `AFID002` (one of the generated members is already declared by the user). -- Editor UI driven by `RegistryEditorCore`: C#-identifier name validation, full Undo, explicit clean-up flow for invalid/duplicate entries, Sort/Group toolbar, manual next-id entry with backward-step warning, Open-Registry shortcut from the `IdStruct` property drawer. -- `Assets → Create → Aspid/Id Registry/Id Registry` menu entry for creating registry assets. +- `IId` marker interface and `[UniqueId]` attribute for ID-struct types (one struct ↔ one `IdRegistry`). ([#8]) +- `IdRegistry` (`ScriptableObject`) holding the canonical `int ↔ string` map; runtime lookups via `TryGetId`, `TryGetName`, `Contains(int)`, `Contains(string)`. ([#8]) +- `IdRegistryResolver` — lazily builds a `Type AQN → registry` index on first lookup and keeps it incrementally up to date through an `AssetPostprocessor`; `IdRegistry.OnEnable` marks the cache dirty so re-imports are picked up. ([#8]) +- `UniqueIdIndex` — sibling index used by the editor to detect `[UniqueId]` field-value collisions across registries. ([#8]) +- `IdStructGenerator` (Roslyn incremental source generator) emits the struct-side boilerplate (`_id`, `Id`, `__stringId`, equality, conversions) and supports generic target structs as well as generic containing types. ([#8]) +- Analyzer diagnostics: `AFID001` (the target `IId` struct must be `partial`) and `AFID002` (one of the generated members is already declared by the user). ([#8]) +- Editor UI driven by `RegistryEditorCore`: C#-identifier name validation, full Undo, explicit clean-up flow for invalid/duplicate entries, Sort/Group toolbar, manual next-id entry with backward-step warning, Open-Registry shortcut from the `IdStruct` property drawer. ([#8]) +- `Assets → Create → Aspid/Id Registry/Id Registry` menu entry for creating registry assets. ([#8]) #### VisualElement fluent extensions -- Extensive UI Toolkit fluent API on `VisualElement` and friends — layout, sizing, style, borders, colors, transitions, callbacks, USS classes/sheets, child management. -- Per-element helper sets: `Button`, `Field`, `Focusable`, `Foldout`, `HelpBox`, `Image`, `IMGUIContainer`, `IMixedValueSupport`, `INotifyValueChanged`, `IStyle`, `List`, `Manipulators`, `ProgressBar`, `Slider`, `TextElement`, `CallbackEventHandler`, `ICustomStyle`. -- Style preset helpers via `VisualElementExtensions.Style.Preset.cs` and reusable `ICustomStyle.TryGetByEnum` extension for USS-driven enum bindings. -- Editor-side `VisualElement` command extensions in `Unity.Editor/Scripts/VisualElements/Extensions/`. +- Extensive UI Toolkit fluent API on `VisualElement` and friends — layout, sizing, style, borders, colors, transitions, callbacks, USS classes/sheets, child management. ([#8]) +- Per-element helper sets: `Button`, `Field`, `Focusable`, `Foldout`, `HelpBox`, `Image`, `IMGUIContainer`, `IMixedValueSupport`, `INotifyValueChanged`, `IStyle`, `List`, `Manipulators`, `ProgressBar`, `Slider`, `TextElement`, `CallbackEventHandler`, `ICustomStyle`. ([#8]) +- Style preset helpers via `VisualElementExtensions.Style.Preset.cs` and reusable `ICustomStyle.TryGetByEnum` extension for USS-driven enum bindings. ([#8]) +- Editor-side `VisualElement` command extensions in `Unity.Editor/Scripts/VisualElements/Extensions/`. ([#8]) #### Optional Mathematics integration -- Satellite assembly `Aspid.FastTools.Unity.VisualElements.Math` adds `INotifyValueChanged` extensions (`SetValue`, `ValueChanged`) for `Unity.Mathematics` types (`float2/3/4`, `int2/3/4`, etc.). -- Compiled only when `com.unity.mathematics` is installed (`versionDefines` gate, define symbol `ASPID_FASTTOOLS_UNITY_MATHEMATICS_INTEGRATION`). +- Satellite assembly `Aspid.FastTools.Unity.VisualElements.Math` adds `INotifyValueChanged` extensions (`SetValue`, `ValueChanged`) for `Unity.Mathematics` types (`float2/3/4`, `int2/3/4`, etc.). ([#8]) +- Compiled only when `com.unity.mathematics` is installed (`versionDefines` gate, define symbol `ASPID_FASTTOOLS_UNITY_MATHEMATICS_INTEGRATION`). ([#8]) #### Internal editor components Shared UI Toolkit elements used across the package's editor surfaces, all built on the base palette `Aspid-FastTools-Default-Dark.uss`: -- `AspidLabel`, `AspidBox`, `AspidGradientButton`, `AspidHelpBox`, `AspidInspectorHeader`, `AspidDividingLine`, `AspidAnimatedLogo`, `AspidAnimatedTitle`, `AspidAnimatedDotsBackground`, `AspidHoverGradientOverlay`. -- USS-driven style structs (`AspidLabelSizeStyle`, `AspidLabelFontStyle`, `AspidDividingLineSizeStyle`, `AspidDividingLineDirectionStyle`, `AspidAnimatedLogoPulseSpeedStyle`, `AspidAnimatedLogoPulseHoverAmplitudeStyle`, `AspidAnimatedLogoLayerImageStyle`, `StatusStyle`, `ThemeStyle`, …). -- Shared helpers: `AspidStyles` (single source of truth for USS class/property names), `InlineStyle` (USS-vs-code precedence helper), `DoubleClickTracker`. +- `AspidLabel`, `AspidBox`, `AspidGradientButton`, `AspidHelpBox`, `AspidInspectorHeader`, `AspidDividingLine`, `AspidAnimatedLogo`, `AspidAnimatedTitle`, `AspidAnimatedDotsBackground`, `AspidHoverGradientOverlay`. ([#8]) +- USS-driven style structs (`AspidLabelSizeStyle`, `AspidLabelFontStyle`, `AspidDividingLineSizeStyle`, `AspidDividingLineDirectionStyle`, `AspidAnimatedLogoPulseSpeedStyle`, `AspidAnimatedLogoPulseHoverAmplitudeStyle`, `AspidAnimatedLogoLayerImageStyle`, `StatusStyle`, `ThemeStyle`, …). ([#8]) +- Shared helpers: `AspidStyles` (single source of truth for USS class/property names), `InlineStyle` (USS-vs-code precedence helper), `DoubleClickTracker`. ([#8]) #### SerializedProperty extensions -- Fluent chainable helpers in `SerializePropertyExtensions` (`SetValue`, `Apply`, `Persistent`) and a `Reflection` partial that exposes the backing field/value behind a `SerializedProperty`. +- Fluent chainable helpers in `SerializePropertyExtensions` (`SetValue`, `Apply`, `Persistent`) and a `Reflection` partial that exposes the backing field/value behind a `SerializedProperty`. ([#8]) #### IMGUI scopes -- Disposable `VerticalScope`, `HorizontalScope`, `ScrollViewScope` wrappers that expose the layout `Rect` for hit-testing. +- Disposable `VerticalScope`, `HorizontalScope`, `ScrollViewScope` wrappers that expose the layout `Rect` for hit-testing. ([#8]) #### Editor helper extensions -- `MonoScript.GetScriptName()` and `MonoScript.GetScriptNameWithIndex()` — respect `[AddComponentMenu]` and append an index suffix when several copies of the same component live on one `GameObject`. +- `MonoScript.GetScriptName()` and `MonoScript.GetScriptNameWithIndex()` — respect `[AddComponentMenu]` and append an index suffix when several copies of the same component live on one `GameObject`. ([#8]) #### Welcome window -- `WelcomeWindow` editor window (menu `Tools/Aspid FastTools/Welcome`) listing the package's installable samples by parsing `package.json`. -- `WelcomeWindowStartup` shows the window automatically on first import. +- `WelcomeWindow` editor window (menu `Tools/Aspid FastTools/Welcome`) listing the package's installable samples by parsing `package.json`. ([#8]) +- `WelcomeWindowStartup` shows the window automatically on first import. ([#8]) #### Samples Five installable samples shipped under `Samples~/` (UPM convention, imported via Package Manager): -- `Types`, `EnumValues`, `Ids`, `ProfilerMarkers`, `VisualElements`. +- `Types`, `EnumValues`, `Ids`, `ProfilerMarkers`, `VisualElements`. ([#8]) #### Documentation -- EN and RU READMEs at the package root and at `Documentation/EN/` and `Documentation/RU/`, mirroring the same content with language-appropriate image paths. -- Per-feature reference documents next to each README: `SerializedPropertyExtensions.md`, `VisualElementExtensions.md`. +- EN and RU READMEs at the package root and at `Documentation/EN/` and `Documentation/RU/`, mirroring the same content with language-appropriate image paths. ([#8]) +- Per-feature reference documents next to each README: `SerializedPropertyExtensions.md`, `VisualElementExtensions.md`. ([#8]) +[#8]: https://github.com/VPDPersonal/Aspid.FastTools/pull/8 +[#30]: https://github.com/VPDPersonal/Aspid.FastTools/pull/30 [Unreleased]: https://github.com/VPDPersonal/Aspid.FastTools/compare/v1.0.0-rc.2...HEAD [1.0.0-rc.2]: https://github.com/VPDPersonal/Aspid.FastTools/compare/v1.0.0-rc.1...v1.0.0-rc.2 [1.0.0-rc.1]: https://github.com/VPDPersonal/Aspid.FastTools/releases/tag/v1.0.0-rc.1 diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/Field/EnumFlagsFieldExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/Field/EnumFlagsFieldExtensions.cs index bf1de129..011a9724 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/Field/EnumFlagsFieldExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/Field/EnumFlagsFieldExtensions.cs @@ -7,7 +7,7 @@ namespace Aspid.FastTools.UIElements.Editors public static class EnumFlagsFieldExtensions { /// - /// Initializes the field with a default enum flags value. + /// Initializes the field with a default enum flags value via . /// /// The element to modify. /// The default enum flags value to display. diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/IBindableExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/IBindableExtensions.cs index 71617e54..3b0e752d 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/IBindableExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/IBindableExtensions.cs @@ -23,16 +23,30 @@ public static T BindTo(this T element, SerializedObject serializedObject, str } /// - /// Binds the bindable to the specified . + /// Binds the element to the specified . /// - /// The bindable to bind. + /// The element to bind. /// The serialized property to bind to. - /// The bindable, for chaining. + /// The element, for chaining. public static T BindPropertyTo(this T element, SerializedProperty property) - where T : IBindable + where T : VisualElement, IBindable { element.BindProperty(property); return element; } + + /// + /// Sets the binding path of the element. + /// + /// The element type. + /// The element to modify. + /// The binding path to set. + /// The element, for chaining. + public static T SetBindingPath(this T element, string value) + where T : VisualElement, IBindable + { + element.bindingPath = value; + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/PropertyFieldExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/PropertyFieldExtensions.cs index 119e3216..fd2cd5f0 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/PropertyFieldExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/PropertyFieldExtensions.cs @@ -31,5 +31,19 @@ public static T RemoveValueChanged(this T element, EventCallback + /// Sets the label of the property field. + /// + /// The element type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : PropertyField + { + element.label = value; + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/VisualElementExtensions.Bind.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/VisualElementExtensions.Bind.cs index f891b8a6..906c3214 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/VisualElementExtensions.Bind.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Editor/Scripts/VisualElements/Extensions/VisualElementExtensions.Bind.cs @@ -19,5 +19,18 @@ public static T BindTo(this T element, SerializedObject obj) element.Bind(obj); return element; } + + /// + /// Unbinds the element from its serialized object. + /// + /// The element type. + /// The element to unbind. + /// The element, for chaining. + public static T UnbindFrom(this T element) + where T : VisualElement + { + element.Unbind(); + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Button/ButtonExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Button/ButtonExtensions.cs index 4443bfc6..c625d49e 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Button/ButtonExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Button/ButtonExtensions.cs @@ -49,6 +49,20 @@ public static T SetClickable(this T element, Clickable value) element.clickable = value; return element; } + + /// + /// Sets the click handler of the button by replacing the clickable manipulator. + /// + /// The element type. + /// The element to modify. + /// The action to invoke on click. + /// The element, for chaining. + public static T SetClickable(this T element, Action action) + where T : Button + { + element.clickable = new Clickable(action); + return element; + } /// /// Sets and returns the element for chaining. diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensionsSetLabelQuaternion.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensionsSetLabelQuaternion.cs new file mode 100644 index 00000000..24dacc6b --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensionsSetLabelQuaternion.cs @@ -0,0 +1,22 @@ +using UnityEngine; +using UnityEngine.UIElements; + +namespace Aspid.FastTools.UIElements +{ + public static partial class BaseFieldExtensionsSetLabelQuaternion + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensionsSetLabelQuaternion.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensionsSetLabelQuaternion.cs.meta new file mode 100644 index 00000000..7ddea0ed --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensionsSetLabelQuaternion.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f00d796bf1574aaf8014ad61a4265ea3 +timeCreated: 1779651087 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields.meta new file mode 100644 index 00000000..d93c59f8 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e877d093212c4bf9b53101e07042d03a +timeCreated: 1779651409 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensions.cs similarity index 100% rename from Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensions.cs rename to Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensions.cs diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensions.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensions.cs.meta similarity index 100% rename from Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFieldExtensions.cs.meta rename to Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensions.cs.meta diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelAnimationCurve.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelAnimationCurve.cs new file mode 100644 index 00000000..6966d192 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelAnimationCurve.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelAnimationCurve + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelAnimationCurve.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelAnimationCurve.cs.meta new file mode 100644 index 00000000..0c208688 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelAnimationCurve.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 59bc1174cae34b3b89f0cc5afc66c730 +timeCreated: 1779651740 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBounds.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBounds.cs new file mode 100644 index 00000000..efa2773a --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBounds.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelBounds + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBounds.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBounds.cs.meta new file mode 100644 index 00000000..cc54fed5 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBounds.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: afc50e3a9b3d42dbb9e8eb8a8d473dba +timeCreated: 1779651716 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBoundsInt.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBoundsInt.cs new file mode 100644 index 00000000..10490a00 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBoundsInt.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelBoundsInt + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBoundsInt.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBoundsInt.cs.meta new file mode 100644 index 00000000..1690f473 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelBoundsInt.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3152344fb1bd4e3f82a80bfae41b3b51 +timeCreated: 1779651720 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelByte.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelByte.cs new file mode 100644 index 00000000..ceabb8c7 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelByte.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelByte + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelByte.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelByte.cs.meta new file mode 100644 index 00000000..40f7803d --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelByte.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: babe05b587ae401bb87cfec8029aff8e +timeCreated: 1779651620 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelChar.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelChar.cs new file mode 100644 index 00000000..e22a5b0c --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelChar.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelChar + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelChar.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelChar.cs.meta new file mode 100644 index 00000000..cdbe6c08 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelChar.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a7803a9724ae4ad7b94a06b9bfd7f267 +timeCreated: 1779651656 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor.cs new file mode 100644 index 00000000..d80983b7 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelColor + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor.cs.meta new file mode 100644 index 00000000..ef1ec51c --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4ce625c963a940dd9980b8dc76702433 +timeCreated: 1779651660 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor32.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor32.cs new file mode 100644 index 00000000..62e470af --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor32.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelColor32 + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor32.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor32.cs.meta new file mode 100644 index 00000000..9d72075e --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelColor32.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: aae4e62fbd3a4b78b6d49231f80bbadf +timeCreated: 1779651664 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDecimal.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDecimal.cs new file mode 100644 index 00000000..4aa1eb11 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDecimal.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelDecimal + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDecimal.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDecimal.cs.meta new file mode 100644 index 00000000..7e22a022 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDecimal.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f639ff2a7b7a4cf8aeb509070b1eabeb +timeCreated: 1779651647 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDouble.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDouble.cs new file mode 100644 index 00000000..c57e599d --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDouble.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelDouble + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDouble.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDouble.cs.meta new file mode 100644 index 00000000..3588a5ec --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelDouble.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c956291219fe48e5b410cf7983980d80 +timeCreated: 1779651643 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelEnum.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelEnum.cs new file mode 100644 index 00000000..7e6a5daf --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelEnum.cs @@ -0,0 +1,23 @@ +using System; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelEnum + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelEnum.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelEnum.cs.meta new file mode 100644 index 00000000..738cc3e9 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelEnum.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7fa245d21e3340f08d181d6a53a026ca +timeCreated: 1779651724 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelFloat.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelFloat.cs new file mode 100644 index 00000000..59eeeb09 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelFloat.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelFloat + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelFloat.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelFloat.cs.meta new file mode 100644 index 00000000..08e072a7 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelFloat.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a862800655c34f4d82ad1a0de3b4e6cd +timeCreated: 1779651639 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelGradient.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelGradient.cs new file mode 100644 index 00000000..872b4fe4 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelGradient.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelGradient + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelGradient.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelGradient.cs.meta new file mode 100644 index 00000000..689bf9dd --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelGradient.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9aa250fc505d44d3984ac124958c35ca +timeCreated: 1779651745 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelHash128.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelHash128.cs new file mode 100644 index 00000000..449c1d32 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelHash128.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelHash128 + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelHash128.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelHash128.cs.meta new file mode 100644 index 00000000..24e74d98 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelHash128.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 081bb387baf242ffb33ddea9f46f136e +timeCreated: 1779651736 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelInt.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelInt.cs new file mode 100644 index 00000000..060edadf --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelInt.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelInt + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelInt.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelInt.cs.meta new file mode 100644 index 00000000..3f5dfa62 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelInt.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 470d72e9a3bc484681794904f80d70ff +timeCreated: 1779651601 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelLong.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelLong.cs new file mode 100644 index 00000000..64c14143 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelLong.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelLong + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelLong.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelLong.cs.meta new file mode 100644 index 00000000..3afb8f75 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelLong.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 96e56cc0885a4978b448d910eff9f074 +timeCreated: 1779651611 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelObject.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelObject.cs new file mode 100644 index 00000000..678fcf7e --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelObject.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelObject + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelObject.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelObject.cs.meta new file mode 100644 index 00000000..f225ed9d --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelObject.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f755d90213834f999fd306ccce6aec1d +timeCreated: 1779651731 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelRect.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelRect.cs new file mode 100644 index 00000000..c3510e1a --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelRect.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelRect + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelRect.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelRect.cs.meta new file mode 100644 index 00000000..a1ec85c6 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelRect.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f10fc775898743a582956a910791955c +timeCreated: 1779651708 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelSbyte.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelSbyte.cs new file mode 100644 index 00000000..f0fe400d --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelSbyte.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelSbyte + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelSbyte.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelSbyte.cs.meta new file mode 100644 index 00000000..47c49fb5 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelSbyte.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7ba363de3b634253b84af99e0cee4f20 +timeCreated: 1779651625 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelShort.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelShort.cs new file mode 100644 index 00000000..4940e55b --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelShort.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelShort + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelShort.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelShort.cs.meta new file mode 100644 index 00000000..61f73d08 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelShort.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6268150d76dd4407a3145e0333b978b6 +timeCreated: 1779651630 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelString.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelString.cs new file mode 100644 index 00000000..8b61ed7c --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelString.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelString + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelString.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelString.cs.meta new file mode 100644 index 00000000..52fd42f8 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelString.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ab886207cb174fa994ecd1671288bbcf +timeCreated: 1779651652 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelULong.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelULong.cs new file mode 100644 index 00000000..b964ee63 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelULong.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelULong + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelULong.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelULong.cs.meta new file mode 100644 index 00000000..53369353 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelULong.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 912d8d9c7d224d779e6ab9c751def840 +timeCreated: 1779651616 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUint.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUint.cs new file mode 100644 index 00000000..70f82fdf --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUint.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelUint + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUint.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUint.cs.meta new file mode 100644 index 00000000..073dfd8e --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUint.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b1c82b41e5714d4d8dcbf896c6c5839f +timeCreated: 1779651606 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUshort.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUshort.cs new file mode 100644 index 00000000..3e599513 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUshort.cs @@ -0,0 +1,22 @@ +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelUshort + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUshort.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUshort.cs.meta new file mode 100644 index 00000000..16082bc3 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelUshort.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8a1ee93e4fd543939bd2581c7cd6d0e4 +timeCreated: 1779651635 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2.cs new file mode 100644 index 00000000..b02e39d2 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelVector2 + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2.cs.meta new file mode 100644 index 00000000..ad622485 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d65c28d485fe4e4792d71c56de31b802 +timeCreated: 1779651680 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2Int.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2Int.cs new file mode 100644 index 00000000..2be70c2b --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2Int.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelVector2Int + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2Int.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2Int.cs.meta new file mode 100644 index 00000000..7dc1a689 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector2Int.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c8055b60c12e438da3a5b3792c852a54 +timeCreated: 1779651685 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3.cs new file mode 100644 index 00000000..514487b5 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelVector3 + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3.cs.meta new file mode 100644 index 00000000..52e6d97a --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 949ec825c5444442bde994337363dd83 +timeCreated: 1779651695 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3Int.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3Int.cs new file mode 100644 index 00000000..c89db810 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3Int.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelVector3Int + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3Int.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3Int.cs.meta new file mode 100644 index 00000000..307e1306 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector3Int.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7464ec4dc9964e478881970cd1d60fab +timeCreated: 1779651699 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector4.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector4.cs new file mode 100644 index 00000000..be707fd2 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector4.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UIElements; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.UIElements +{ + public static class BaseFieldExtensionsSetLabelVector4 + { + /// + /// Sets the label of the field via . + /// + /// The field type. + /// The element to modify. + /// The label text to set. + /// The element, for chaining. + public static T SetLabel(this T element, string value) + where T : BaseField + { + element.label = value; + return element; + } + } +} diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector4.cs.meta b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector4.cs.meta new file mode 100644 index 00000000..ab4c81b9 --- /dev/null +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Field/BaseFields/BaseFieldExtensionsSetLabelVector4.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 76101f990e73454195d90715b59a1fa3 +timeCreated: 1779651703 \ No newline at end of file diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Focusable/FocusableExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Focusable/FocusableExtensions.cs index 5592de72..893f78c6 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Focusable/FocusableExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Focusable/FocusableExtensions.cs @@ -35,7 +35,7 @@ public static T SetFocus(this T element) /// The element to check. /// if the element holds keyboard focus; otherwise . public static bool IsFocus(this Focusable element) => - element.focusController.focusedElement == element; + element.focusController?.focusedElement == element; /// /// Sets and returns the element for chaining. diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/INotifyValueChangedExtensions.ValueChanged.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/INotifyValueChangedExtensions.ValueChanged.cs index 053096a1..363a252b 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/INotifyValueChangedExtensions.ValueChanged.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/INotifyValueChangedExtensions.ValueChanged.cs @@ -13,12 +13,12 @@ public static partial class INotifyValueChangedExtensions /// Subscribes to the value-changed event of the element. /// /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -26,12 +26,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -39,12 +39,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -52,12 +52,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -65,12 +65,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -78,12 +78,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -91,12 +91,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -104,12 +104,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -119,12 +119,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -132,12 +132,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -145,12 +145,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -158,12 +158,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -173,12 +173,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -186,12 +186,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -199,12 +199,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -212,12 +212,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -227,12 +227,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -240,12 +240,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -255,12 +255,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -268,12 +268,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -283,12 +283,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -296,12 +296,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -309,12 +309,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -322,12 +322,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -337,12 +337,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -350,12 +350,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -366,12 +366,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -379,12 +379,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endif @@ -395,12 +395,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -408,12 +408,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -423,12 +423,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -436,12 +436,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -449,12 +449,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -462,12 +462,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -477,12 +477,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -490,12 +490,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -505,12 +505,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -518,12 +518,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -533,12 +533,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -546,12 +546,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -561,12 +561,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -574,12 +574,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -587,12 +587,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -600,12 +600,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -615,12 +615,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -628,12 +628,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -643,12 +643,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -656,12 +656,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -671,12 +671,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -684,12 +684,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -697,12 +697,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -710,12 +710,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -725,12 +725,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -738,12 +738,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -751,12 +751,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -764,12 +764,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -779,12 +779,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -792,12 +792,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -807,12 +807,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -820,12 +820,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -835,12 +835,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -848,12 +848,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -863,12 +863,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -876,12 +876,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -891,12 +891,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -904,12 +904,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -919,12 +919,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -932,12 +932,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -947,12 +947,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -960,12 +960,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -975,12 +975,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -988,12 +988,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -1002,12 +1002,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static TField AddValueChanged(this TField element, EventCallback> value) + public static TField AddValueChanged(this TField element, EventCallback> callback) where TField : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -1015,12 +1015,12 @@ public static TField AddValueChanged(this TField element, EventC /// Unsubscribes from the value-changed event of the element. /// /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static TField RemoveValueChanged(this TField element, EventCallback> value) + public static TField RemoveValueChanged(this TField element, EventCallback> callback) where TField : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.SetValue.Math.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.SetValue.Math.cs index 60bb0c9b..cc644e4e 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.SetValue.Math.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.SetValue.Math.cs @@ -589,6 +589,394 @@ public static T SetValue(this T element, float4x4 value, bool notify = true) } #endregion + #region Unity.Mathematics.Double + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double2x2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double2x3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double2x4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double3x2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double3x3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double3x4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double4x2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double4x3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, double4x4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + #endregion + + #region Unity.Mathematics.UInt + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint2x2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint2x3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint2x4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint3x2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint3x3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint3x4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint4x2 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint4x3 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + + /// + /// Sets the element's value. If is , a change notification is raised. + /// + /// The element to modify. + /// The value to set. + /// If , raises a change notification. + /// The element, for chaining. + public static T SetValue(this T element, uint4x4 value, bool notify = true) + where T : INotifyValueChanged + { + if (notify) element.value = value; + else element.SetValueWithoutNotify(value); + + return element; + } + #endregion + #region Unity.Mathematics.Quaternion /// /// Sets the element's value. If is , a change notification is raised. diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.ValueChanged.Math.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.ValueChanged.Math.cs index d813bfcd..dbf1459b 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.ValueChanged.Math.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/INotifyValueChanged/Math/INotifyValueChangedExtensions.ValueChanged.Math.cs @@ -12,12 +12,12 @@ public static partial class INotifyValueChangedExtensions /// Subscribes to the value-changed event of the element. /// /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -25,12 +25,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -38,12 +38,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -51,12 +51,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -64,12 +64,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -77,12 +77,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -90,12 +90,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -103,12 +103,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -116,12 +116,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -129,12 +129,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -142,12 +142,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -155,12 +155,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -168,12 +168,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -181,12 +181,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -194,12 +194,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -207,12 +207,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -220,12 +220,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -233,22 +233,25 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } /// /// Subscribes to the value-changed event of the element. - /// element - public static T AddValueChanged(this T element, EventCallback> value) + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -256,22 +259,25 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } /// /// Subscribes to the value-changed event of the element. - /// element - public static T AddValueChanged(this T element, EventCallback> value) + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -279,12 +285,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -292,12 +298,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -305,12 +311,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -320,12 +326,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -333,12 +339,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -346,12 +352,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -359,12 +365,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -372,12 +378,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -385,12 +391,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -398,12 +404,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -411,12 +417,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -424,12 +430,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -437,12 +443,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -450,12 +456,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -463,12 +469,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -476,12 +482,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -489,12 +495,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -502,12 +508,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -515,12 +521,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -528,12 +534,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -541,12 +547,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -554,12 +560,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -567,12 +573,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -580,12 +586,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -593,12 +599,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -606,12 +612,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -619,12 +625,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -634,12 +640,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -647,12 +653,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -660,12 +666,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -673,12 +679,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -686,12 +692,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -699,12 +705,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -712,12 +718,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -725,12 +731,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -738,12 +744,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -751,12 +757,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -764,12 +770,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -777,12 +783,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -790,12 +796,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -803,12 +809,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -816,12 +822,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -829,12 +835,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -842,12 +848,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -855,12 +861,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -868,12 +874,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -881,12 +887,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -894,12 +900,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -907,12 +913,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } @@ -920,12 +926,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -933,12 +939,640 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); + return element; + } + #endregion + + #region Unity.Mathematics.Double + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + #endregion + + #region Unity.Mathematics.UInt + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); + return element; + } + + /// + /// Subscribes to the value-changed event of the element. + /// + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.RegisterValueChangedCallback(callback); + return element; + } + + /// + /// Unsubscribes from the value-changed event of the element. + /// + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveValueChanged(this T element, EventCallback> callback) + where T : INotifyValueChanged + { + element.UnregisterValueChangedCallback(callback); return element; } #endregion @@ -948,12 +1582,12 @@ public static T RemoveValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to subscribe. + /// The callback to subscribe. /// The element, for chaining. - public static T AddValueChanged(this T element, EventCallback> value) + public static T AddValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.RegisterValueChangedCallback(value); + element.RegisterValueChangedCallback(callback); return element; } @@ -961,12 +1595,12 @@ public static T AddValueChanged(this T element, EventCallback /// The element to modify. - /// The callback to remove. + /// The callback to remove. /// The element, for chaining. - public static T RemoveValueChanged(this T element, EventCallback> value) + public static T RemoveValueChanged(this T element, EventCallback> callback) where T : INotifyValueChanged { - element.UnregisterValueChangedCallback(value); + element.UnregisterValueChangedCallback(callback); return element; } #endregion diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/IStyle/IStyleExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/IStyle/IStyleExtensions.cs index 55219d1f..efc56a00 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/IStyle/IStyleExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/IStyle/IStyleExtensions.cs @@ -79,6 +79,42 @@ public static T SetFlexWrap( return style; } + /// + /// Sets and returns the style for chaining. + /// + /// + /// Placement of children over multiple lines if not enough space is available in this container. + /// + /// The style to modify. + /// The flex wrap mode to set. + /// The style, for chaining. + public static T SetFlexWrap( + this T style, + Wrap value) + where T : IStyle + { + style.flexWrap = value; + return style; + } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Direction of the main axis to layout children in a container. + /// + /// The style to modify. + /// The flex direction to set. + /// The style, for chaining. + public static T SetFlexDirection( + this T style, + StyleEnum value) + where T : IStyle + { + style.flexDirection = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -184,7 +220,7 @@ public static T SetMinSize( return style; } - + /// /// Sets , and returns the style for chaining. /// @@ -403,6 +439,24 @@ public static T SetUnityFontStyleAndWeight( style.unityFontStyleAndWeight = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Font style and weight (normal, bold, italic) to draw the element's text. + /// + /// The style to modify. + /// The font style and weight to set. + /// The style, for chaining. + public static T SetUnityFontStyleAndWeight( + this T style, + FontStyle value) + where T : IStyle + { + style.unityFontStyleAndWeight = value; + return style; + } #endregion #region Text @@ -442,6 +496,24 @@ public static T SetLetterSpacing( return style; } + /// + /// Sets and returns the style for chaining. + /// + /// + /// Horizontal and vertical text alignment in the element's box. + /// + /// The style to modify. + /// The text alignment to set. + /// The style, for chaining. + public static T SetUnityTextAlign( + this T style, + StyleEnum value) + where T : IStyle + { + style.unityTextAlign = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -496,6 +568,26 @@ public static T SetUnityTextOutlineColor( return style; } + /// + /// Sets the text outline color by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetUnityTextOutlineColor( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + return style.SetUnityTextOutlineColor(color); + } + /// /// Sets and returns the style for chaining. /// @@ -553,6 +645,24 @@ public static T SetUnityTextAutoSize( #endif #if UNITY_6000_0_OR_NEWER + /// + /// Sets and returns the style for chaining. + /// + /// + /// Switches between Unity's standard and advanced text generator. + /// + /// The style to modify. + /// The text generator type to set. + /// The style, for chaining. + public static T SetUnityTextGenerator( + this T style, + StyleEnum value) + where T : IStyle + { + style.unityTextGenerator = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -570,6 +680,24 @@ public static T SetUnityTextGenerator( style.unityTextGenerator = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// TextElement editor rendering mode. + /// + /// The style to modify. + /// The editor text rendering mode to set. + /// The style, for chaining. + public static T SetUnityEditorTextRenderingMode( + this T style, + StyleEnum value) + where T : IStyle + { + style.unityEditorTextRenderingMode = value; + return style; + } /// /// Sets and returns the style for chaining. @@ -608,6 +736,42 @@ public static T SetTextOverflow( return style; } + /// + /// Sets and returns the style for chaining. + /// + /// + /// The element's text overflow mode. + /// + /// The style to modify. + /// The text overflow mode to set. + /// The style, for chaining. + public static T SetTextOverflow( + this T style, + TextOverflow value) + where T : IStyle + { + style.textOverflow = value; + return style; + } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// The element's text overflow position. + /// + /// The style to modify. + /// The text overflow position to set. + /// The style, for chaining. + public static T SetUnityTextOverflowPosition( + this T style, + StyleEnum value) + where T : IStyle + { + style.unityTextOverflowPosition = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -660,9 +824,13 @@ public static T SetColor( string value) where T : IStyle { - ColorUtility.TryParseHtmlString(value, out var color); - style.SetColor(color); + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + style.SetColor(color); return style; } @@ -704,6 +872,24 @@ public static T SetAlignSelf( return style; } + /// + /// Sets and returns the style for chaining. + /// + /// + /// Similar to align-items, but only for this specific element. + /// + /// The style to modify. + /// The alignment to set. + /// The style, for chaining. + public static T SetAlignSelf( + this T style, + Align value) + where T : IStyle + { + style.alignSelf = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -722,6 +908,24 @@ public static T SetAlignItems( return style; } + /// + /// Sets and returns the style for chaining. + /// + /// + /// Alignment of children on the cross axis of this container. + /// + /// The style to modify. + /// The children alignment to set. + /// The style, for chaining. + public static T SetAlignItems( + this T style, + Align value) + where T : IStyle + { + style.alignItems = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -739,6 +943,24 @@ public static T SetAlignContent( style.alignContent = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Alignment of the whole area of children on the cross axis if they span over multiple lines in this container. + /// + /// The style to modify. + /// The content alignment to set. + /// The style, for chaining. + public static T SetAlignContent( + this T style, + Align value) + where T : IStyle + { + style.alignContent = value; + return style; + } #endregion #region Aspect @@ -811,6 +1033,27 @@ public static T SetBorderColor( left: value); } + /// + /// Sets the border color on all sides by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetBorderColor( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + + return style.SetBorderColor(color); + } + /// /// Sets , , /// , and returns the style for chaining. @@ -900,6 +1143,27 @@ public static T SetBorderColorTop( return style.SetBorderColor(top: value); } + /// + /// Sets the top border color by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetBorderColorTop( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + + return style.SetBorderColorTop(color); + } + /// /// Sets and returns the style for chaining. /// @@ -917,6 +1181,27 @@ public static T SetBorderColorRight( return style.SetBorderColor(right: value); } + /// + /// Sets the right border color by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetBorderColorRight( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + + return style.SetBorderColorRight(color); + } + /// /// Sets and returns the style for chaining. /// @@ -934,6 +1219,27 @@ public static T SetBorderColorBottom( return style.SetBorderColor(bottom: value); } + /// + /// Sets the bottom border color by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetBorderColorBottom( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + + return style.SetBorderColorBottom(color); + } + /// /// Sets and returns the style for chaining. /// @@ -951,6 +1257,27 @@ public static T SetBorderColorLeft( return style.SetBorderColor(left: value); } + /// + /// Sets the left border color by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetBorderColorLeft( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + + return style.SetBorderColorLeft(color); + } + /// /// Sets , , /// , and returns the style for chaining. @@ -1048,6 +1375,48 @@ public static T SetBorderRadiusBottom( bottomLeft: value); } + /// + /// Sets , and returns the style for chaining. + /// + /// + /// borderTopLeftRadius –– The radius of the top-left corner when a rounded rectangle is drawn in the element's box. + /// borderBottomLeftRadius –– The radius of the bottom-left corner when a rounded rectangle is drawn in the element's box. + /// + /// The style type. + /// The style to modify. + /// The radius to apply to both left corners. + /// The style, for chaining. + public static T SetBorderRadiusLeft( + this T style, + StyleLength value) + where T : IStyle + { + return style.SetBorderRadius( + topLeft: value, + bottomLeft: value); + } + + /// + /// Sets , and returns the style for chaining. + /// + /// + /// borderTopRightRadius –– The radius of the top-right corner when a rounded rectangle is drawn in the element's box. + /// borderBottomRightRadius –– The radius of the bottom-right corner when a rounded rectangle is drawn in the element's box. + /// + /// The style type. + /// The style to modify. + /// The radius to apply to both right corners. + /// The style, for chaining. + public static T SetBorderRadiusRight( + this T style, + StyleLength value) + where T : IStyle + { + return style.SetBorderRadius( + topRight: value, + bottomRight: value); + } + /// /// Sets and returns the style for chaining. /// @@ -1633,6 +2002,24 @@ public static T SetPaddingLeft( #endregion #region Display + /// + /// Sets and returns the style for chaining. + /// + /// + /// Defines how an element is displayed in the layout. + /// + /// The style to modify. + /// The display mode to set. + /// The style, for chaining. + public static T SetDisplay( + this T style, + StyleEnum value) + where T : IStyle + { + style.display = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -1671,6 +2058,24 @@ public static T SetOverflow( return style; } + /// + /// Sets and returns the style for chaining. + /// + /// + /// How a container behaves if its content overflows its own box. + /// + /// The style to modify. + /// The overflow behavior to set. + /// The style, for chaining. + public static T SetOverflow( + this T style, + Overflow value) + where T : IStyle + { + style.overflow = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -1688,6 +2093,24 @@ public static T SetUnityOverflowClipBox( style.unityOverflowClipBox = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Specifies which box the element content is clipped against. + /// + /// The style to modify. + /// The overflow clip box to set. + /// The style, for chaining. + public static T SetUnityOverflowClipBox( + this T style, + OverflowClipBox value) + where T : IStyle + { + style.unityOverflowClipBox = value; + return style; + } #endregion #region Distance @@ -1952,6 +2375,26 @@ public static T SetPosition( return style; } + + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Element's positioning in its parent container. + /// + /// The style to modify. + /// The position type to set. + /// The style, for chaining. + public static T SetPosition( + this T style, + Position value) + where T : IStyle + { + style.position = value; + return style; + } + /// /// Sets and returns the style for chaining. /// @@ -1989,7 +2432,7 @@ public static T SetBackgroundColor( style.backgroundColor = value; return style; } - + /// /// Parses an HTML color string and sets , returning the style for chaining. /// @@ -2004,9 +2447,13 @@ public static T SetBackgroundColor( string value) where T : IStyle { - ColorUtility.TryParseHtmlString(value, out var color); + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + style.SetBackgroundColor(color); - return style; } @@ -2027,7 +2474,7 @@ public static T SetBackgroundImage( style.backgroundImage = value; return style; } - + /// /// Loads a from Resources and sets the property. /// @@ -2039,7 +2486,14 @@ public static T SetBackgroundImageFromResource( string path) where T : IStyle { - style.backgroundImage = Resources.Load(path); + var texture = Resources.Load(path); + if (texture == null) + { + Debug.LogWarning($"Failed to load Texture2D from Resources path: '{path}'"); + return style; + } + + style.backgroundImage = texture; return style; } @@ -2097,6 +2551,27 @@ public static T SetUnityBackgroundImageTintColor( return style; } + /// + /// Sets the background image tint color by parsing an HTML color string via . + /// + /// The style type. + /// The style to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The style, for chaining. + public static T SetUnityBackgroundImageTintColor( + this T style, + string value) + where T : IStyle + { + if (!ColorUtility.TryParseHtmlString(value, out var color)) + { + Debug.LogWarning($"Failed to parse color string: '{value}'"); + return style; + } + + return style.SetUnityBackgroundImageTintColor(color); + } + /// /// Sets , and returns the style for chaining. /// @@ -2451,6 +2926,24 @@ public static T SetUnitySliceType( style.unitySliceType = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Specifies the type of slicing. + /// + /// The style to modify. + /// The slice type to set. + /// The style, for chaining. + public static T SetUnitySliceType( + this T style, + SliceType value) + where T : IStyle + { + style.unitySliceType = value; + return style; + } #endif #endregion @@ -2472,6 +2965,24 @@ public static T SetVisibility( style.visibility = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Specifies whether an element is visible. + /// + /// The style to modify. + /// The visibility to set. + /// The style, for chaining. + public static T SetVisibility( + this T style, + Visibility value) + where T : IStyle + { + style.visibility = value; + return style; + } #endregion #region WhiteSpace @@ -2492,6 +3003,24 @@ public static T SetWhiteSpace( style.whiteSpace = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Word wrap over multiple lines if not enough space is available to draw the text of an element. + /// + /// The style to modify. + /// The white-space mode to set. + /// The style, for chaining. + public static T SetWhiteSpace( + this T style, + WhiteSpace value) + where T : IStyle + { + style.whiteSpace = value; + return style; + } #endregion #region JustifyContent @@ -2512,6 +3041,24 @@ public static T SetJustifyContent( style.justifyContent = value; return style; } + + /// + /// Sets and returns the style for chaining. + /// + /// + /// Justification of children on the main axis of this container. + /// + /// The style to modify. + /// The justify content mode to set. + /// The style, for chaining. + public static T SetJustifyContent( + this T style, + Justify value) + where T : IStyle + { + style.justifyContent = value; + return style; + } #endregion } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/BaseListViewExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/BaseListViewExtensions.cs index ea3c2665..2b8d0b3d 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/BaseListViewExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/BaseListViewExtensions.cs @@ -340,5 +340,61 @@ public static T SetBindingSourceSelectionMode(this T element, BindingSourceSe element.bindingSourceSelectionMode = value; return element; } + +#if UNITY_6000_0_OR_NEWER + #region MakeFooter + /// + /// Sets , replacing any existing callback, and returns the element for chaining. + /// + /// + /// This callback allows the user to make their own footer for this control. + /// + /// The element to modify. + /// The callback to set. + /// The element, for chaining. + public static T SetMakeFooter(this T element, Func value) + where T : BaseListView + { + element.makeFooter = value; + return element; + } + #endregion + + #region MakeHeader + /// + /// Sets , replacing any existing callback, and returns the element for chaining. + /// + /// + /// This callback allows the user to make their own header for this control. + /// + /// The element to modify. + /// The callback to set. + /// The element, for chaining. + public static T SetMakeHeader(this T element, Func value) + where T : BaseListView + { + element.makeHeader = value; + return element; + } + #endregion + + #region MakeNoneElement + /// + /// Sets , replacing any existing callback, and returns the element for chaining. + /// + /// + /// This callback allows the user to set a Visual Element to replace the "List is empty" Label shown when the ListView is empty. + /// + /// The element to modify. + /// The callback to set. + /// The element, for chaining. + public static T SetMakeNoneElement(this T element, Func value) + where T : BaseListView + { + element.makeNoneElement = value; + return element; + } + #endregion +#endif } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnListViewExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnListViewExtensions.cs index d89e3cd4..d0ae7565 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnListViewExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnListViewExtensions.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine.UIElements; // ReSharper disable once CheckNamespace @@ -21,5 +22,33 @@ public static T SetSortingMode(this T element, ColumnSortingMode value) element.sortingMode = value; return element; } + + /// + /// Subscribes to the event and returns the element for chaining. + /// + /// The element type. + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddColumnSortingChanged(this T element, Action callback) + where T : MultiColumnListView + { + element.columnSortingChanged += callback; + return element; + } + + /// + /// Unsubscribes from the event and returns the element for chaining. + /// + /// The element type. + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveColumnSortingChanged(this T element, Action callback) + where T : MultiColumnListView + { + element.columnSortingChanged -= callback; + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnTreeViewExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnTreeViewExtensions.cs index 9e2487fa..3a32baf8 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnTreeViewExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/List/MultiColumnTreeViewExtensions.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine.UIElements; // ReSharper disable once CheckNamespace @@ -21,5 +22,33 @@ public static T SetSortingMode(this T element, ColumnSortingMode value) element.sortingMode = value; return element; } + + /// + /// Subscribes to the event and returns the element for chaining. + /// + /// The element type. + /// The element to modify. + /// The callback to subscribe. + /// The element, for chaining. + public static T AddColumnSortingChanged(this T element, Action callback) + where T : MultiColumnTreeView + { + element.columnSortingChanged += callback; + return element; + } + + /// + /// Unsubscribes from the event and returns the element for chaining. + /// + /// The element type. + /// The element to modify. + /// The callback to remove. + /// The element, for chaining. + public static T RemoveColumnSortingChanged(this T element, Action callback) + where T : MultiColumnTreeView + { + element.columnSortingChanged -= callback; + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Manipulators/ManipulatorExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Manipulators/ManipulatorExtensions.cs index fe4e8d47..b2d19619 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Manipulators/ManipulatorExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/Manipulators/ManipulatorExtensions.cs @@ -140,6 +140,18 @@ public static T AddKeyboardNavigationManipulator(this T element, Action + /// Adds a new that uses the specified menu builder to populate the contextual menu. + /// + /// The element to modify. + /// The action invoked to populate the menu when it is shown. + /// The element, for chaining. + public static T AddContextualMenuManipulator(this T element, Action menuBuilder) + where T : VisualElement + { + return element.AddManipulatorSelf(new ContextualMenuManipulator(menuBuilder)); + } + /// /// Adds a new that uses the specified menu builder to populate the contextual menu, and outputs the created manipulator. /// diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/ProgressBar/ProgressBarExtensions.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/ProgressBar/ProgressBarExtensions.cs index 25f7c038..731f8b76 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/ProgressBar/ProgressBarExtensions.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/ProgressBar/ProgressBarExtensions.cs @@ -43,5 +43,19 @@ public static T SetHighValue(this T element, float value) element.highValue = value; return element; } + + /// + /// Sets the current value of the progress bar via . + /// + /// The element type. + /// The element to modify. + /// The value to set. + /// The element, for chaining. + public static T SetValue(this T element, float value) + where T : AbstractProgressBar + { + element.value = value; + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Child.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Child.cs index b928a256..727c8418 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Child.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Child.cs @@ -20,6 +20,58 @@ public static T AddChild(this T element, VisualElement child) return element; } + /// + /// Removes the specified child from the element and returns the element for chaining. + /// + /// The element to modify. + /// The child element to remove. + /// The element, for chaining. + public static T RemoveChild(this T element, VisualElement child) + where T : VisualElement + { + element.Remove(child); + return element; + } + + /// + /// Removes the child at the specified index from the element and returns the element for chaining. + /// + /// The element to modify. + /// The index of the child to remove. + /// The element, for chaining. + public static T RemoveChildAt(this T element, int index) + where T : VisualElement + { + element.RemoveAt(index); + return element; + } + + /// + /// Removes all children from the element and returns the element for chaining. + /// + /// The element to modify. + /// The element, for chaining. + public static T ClearChildren(this T element) + where T : VisualElement + { + element.Clear(); + return element; + } + + /// + /// Conditionally adds an element to the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The child element to add. + /// The element, for chaining. + public static T AddChildIf(this T element, bool condition, VisualElement child) + where T : VisualElement + { + if (condition) element.Add(child); + return element; + } + /// /// Inserts a child element at the specified index in the of this element and returns the element for chaining. /// @@ -33,6 +85,21 @@ public static T InsertChild(this T element, int index, VisualElement child) element.Insert(index, child); return element; } + + /// + /// Conditionally inserts a child element at the specified index in the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The index at which to insert the child. + /// The child element to insert. + /// The element, for chaining. + public static T InsertChildIf(this T element, bool condition, int index, VisualElement child) + where T : VisualElement + { + if (condition) element.Insert(index, child); + return element; + } /// /// Adds a span of child elements to the of this element and returns the element for chaining. @@ -49,6 +116,25 @@ public static T AddChildren(this T element, Span children) return element; } + /// + /// Conditionally adds a span of child elements to the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The children to add. + /// The element, for chaining. + public static T AddChildrenIf(this T element, bool condition, Span children) + where T : VisualElement + { + if (condition) + { + foreach (var child in children) + element.Add(child); + } + + return element; + } + /// /// Inserts a span of child elements starting at the specified index in the of this element and returns the element for chaining. /// @@ -64,6 +150,26 @@ public static T InsertChildren(this T element, int index, Span return element; } + + /// + /// Conditionally inserts a span of child elements starting at the specified index in the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The index at which to start inserting children. + /// The children to insert. + /// The element, for chaining. + public static T InsertChildrenIf(this T element, bool condition, int index, Span children) + where T : VisualElement + { + if (condition) + { + foreach (var child in children) + element.Insert(index++, child); + } + + return element; + } /// /// Adds a list of child elements to the of this element and returns the element for chaining. @@ -82,6 +188,27 @@ public static T AddChildren(this T element, List children) return element; } + /// + /// Conditionally adds a list of child elements to the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The children to add. + /// The element, for chaining. + public static T AddChildrenIf(this T element, bool condition, List children) + where T : VisualElement + { + if (children is null) return element; + + if (condition) + { + foreach (var child in children) + element.Add(child); + } + + return element; + } + /// /// Inserts a list of child elements starting at the specified index in the of this element and returns the element for chaining. /// @@ -99,6 +226,28 @@ public static T InsertChildren(this T element, int index, List return element; } + + /// + /// Conditionally inserts a list of child elements starting at the specified index in the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The index at which to start inserting children. + /// The children to insert. + /// The element, for chaining. + public static T InsertChildrenIf(this T element, bool condition, int index, List children) + where T : VisualElement + { + if (children is null) return element; + + if (condition) + { + foreach (var child in children) + element.Insert(index++, child); + } + + return element; + } /// /// Adds an array of child elements to the of this element and returns the element for chaining. @@ -117,6 +266,27 @@ public static T AddChildren(this T element, params VisualElement[] children) return element; } + /// + /// Conditionally adds an array of child elements to the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The children to add. + /// The element, for chaining. + public static T AddChildrenIf(this T element, bool condition, params VisualElement[] children) + where T : VisualElement + { + if (children is null) return element; + + if (condition) + { + foreach (var child in children) + element.Add(child); + } + + return element; + } + /// /// Inserts an array of child elements starting at the specified index in the of this element and returns the element for chaining. /// @@ -134,6 +304,28 @@ public static T InsertChildren(this T element, int index, params VisualElemen return element; } + + /// + /// Conditionally inserts an array of child elements starting at the specified index in the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The index at which to start inserting children. + /// The children to insert. + /// The element, for chaining. + public static T InsertChildrenIf(this T element, bool condition, int index, params VisualElement[] children) + where T : VisualElement + { + if (children is null) return element; + + if (condition) + { + foreach (var child in children) + element.Insert(index++, child); + } + + return element; + } /// /// Adds an enumerable of child elements to the of this element and returns the element for chaining. @@ -152,6 +344,27 @@ public static T AddChildren(this T element, IEnumerable childr return element; } + /// + /// Conditionally adds an enumerable of child elements to the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The children to add. + /// The element, for chaining. + public static T AddChildrenIf(this T element, bool condition, IEnumerable children) + where T : VisualElement + { + if (children is null) return element; + + if (condition) + { + foreach (var child in children) + element.Add(child); + } + + return element; + } + /// /// Inserts an enumerable of child elements starting at the specified index in the of this element and returns the element for chaining. /// @@ -169,6 +382,28 @@ public static T InsertChildren(this T element, int index, IEnumerable + /// Conditionally inserts an enumerable of child elements starting at the specified index in the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The index at which to start inserting children. + /// The children to insert. + /// The element, for chaining. + public static T InsertChildrenIf(this T element, bool condition, int index, IEnumerable children) + where T : VisualElement + { + if (children is null) return element; + + if (condition) + { + foreach (var child in children) + element.Insert(index++, child); + } + + return element; + } /// /// Adds a read-only span of child elements to the of this element and returns the element for chaining. @@ -185,6 +420,25 @@ public static T AddChildren(this T element, ReadOnlySpan child return element; } + /// + /// Conditionally adds a read-only span of child elements to the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The children to add. + /// The element, for chaining. + public static T AddChildrenIf(this T element, bool condition, ReadOnlySpan children) + where T : VisualElement + { + if (condition) + { + foreach (var child in children) + element.Add(child); + } + + return element; + } + /// /// Inserts a read-only span of child elements starting at the specified index in the of this element and returns the element for chaining. /// @@ -200,5 +454,25 @@ public static T InsertChildren(this T element, int index, ReadOnlySpan + /// Conditionally inserts a read-only span of child elements starting at the specified index in the of this element and returns the element for chaining. + /// + /// The element to modify. + /// If true, performs the operation; otherwise skips it and returns the element unchanged. + /// The index at which to start inserting children. + /// The children to insert. + /// The element, for chaining. + public static T InsertChildrenIf(this T element, bool condition, int index, ReadOnlySpan children) + where T : VisualElement + { + if (condition) + { + foreach (var child in children) + element.Insert(index++, child); + } + + return element; + } } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Style.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Style.cs index 87ddace1..9764fee1 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Style.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Style.cs @@ -78,6 +78,42 @@ public static T SetFlexWrap( element.style.SetFlexWrap(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Placement of children over multiple lines if not enough space is available in this container. + /// + /// The element to modify. + /// The flex wrap mode to set. + /// The element, for chaining. + public static T SetFlexWrap( + this T element, + Wrap value) + where T : VisualElement + { + element.style.SetFlexWrap(value); + return element; + } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Direction of the main axis to layout children in a container. + /// + /// The element to modify. + /// The flex direction to set. + /// The element, for chaining. + public static T SetFlexDirection( + this T element, + StyleEnum value) + where T : VisualElement + { + element.style.SetFlexDirection(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -114,11 +150,9 @@ public static T SetSize( StyleLength value) where T : VisualElement { - element.style.SetSize( + return element.SetSize( width: value, height: value); - - return element; } /// @@ -172,18 +206,18 @@ public static T SetMinSize( /// minHeight –– Minimum height for an element, when it is flexible or measures its own size. /// /// The element to modify. - /// The minimum width to set, or to leave unchanged. - /// The minimum height to set, or to leave unchanged. + /// The minimum width to set, or to leave unchanged. + /// The minimum height to set, or to leave unchanged. /// The element, for chaining. public static T SetMinSize( this T element, - StyleLength? width = null, - StyleLength? height = null) + StyleLength? minWidth = null, + StyleLength? minHeight = null) where T : VisualElement { element.style.SetMinSize( - minWidth: width, - minHeight: height); + minWidth: minWidth, + minHeight: minHeight); return element; } @@ -203,8 +237,9 @@ public static T SetMaxSize( StyleLength value) where T : VisualElement { - element.style.SetMaxSize(value); - return element; + return element.SetMaxSize( + maxWidth: value, + maxHeight: value); } /// @@ -215,18 +250,18 @@ public static T SetMaxSize( /// maxHeight –– Maximum height for an element, when it is flexible or measures its own size. /// /// The element to modify. - /// The maximum width to set, or to leave unchanged. - /// The maximum height to set, or to leave unchanged. + /// The maximum width to set, or to leave unchanged. + /// The maximum height to set, or to leave unchanged. /// The element, for chaining. public static T SetMaxSize( this T element, - StyleLength? width = null, - StyleLength? height = null) + StyleLength? maxWidth = null, + StyleLength? maxHeight = null) where T : VisualElement { element.style.SetMaxSize( - maxWidth: width, - maxHeight: height); + maxWidth: maxWidth, + maxHeight: maxHeight); return element; } @@ -412,6 +447,24 @@ public static T SetUnityFontStyleAndWeight( element.style.SetUnityFontStyleAndWeight(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Font style and weight (normal, bold, italic) to draw the element's text. + /// + /// The element to modify. + /// The font style and weight to set. + /// The element, for chaining. + public static T SetUnityFontStyleAndWeight( + this T element, + FontStyle value) + where T : VisualElement + { + element.style.SetUnityFontStyleAndWeight(value); + return element; + } #endregion #region Text @@ -450,6 +503,24 @@ public static T SetLetterSpacing( element.style.SetLetterSpacing(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Horizontal and vertical text alignment in the element's box. + /// + /// The element to modify. + /// The text alignment to set. + /// The element, for chaining. + public static T SetUnityTextAlign( + this T element, + StyleEnum value) + where T : VisualElement + { + element.style.SetUnityTextAlign(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -505,6 +576,22 @@ public static T SetUnityTextOutlineColor( return element; } + /// + /// Sets the text outline color by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetUnityTextOutlineColor( + this T element, + string value) + where T : VisualElement + { + element.style.SetUnityTextOutlineColor(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -561,6 +648,24 @@ public static T SetUnityTextAutoSize( } #endif #if UNITY_6000_0_OR_NEWER + /// + /// Sets and returns the element for chaining. + /// + /// + /// Switches between Unity's standard and advanced text generator. + /// + /// The element to modify. + /// The text generator type to set. + /// The element, for chaining. + public static T SetUnityTextGenerator( + this T element, + StyleEnum value) + where T : VisualElement + { + element.style.SetUnityTextGenerator(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -578,6 +683,24 @@ public static T SetUnityTextGenerator( element.style.SetUnityTextGenerator(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// TextElement editor rendering mode. + /// + /// The element to modify. + /// The editor text rendering mode to set. + /// The element, for chaining. + public static T SetUnityEditorTextRenderingMode( + this T element, + StyleEnum value) + where T : VisualElement + { + element.style.SetUnityEditorTextRenderingMode(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -615,6 +738,42 @@ public static T SetTextOverflow( element.style.SetTextOverflow(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// The element's text overflow mode. + /// + /// The element to modify. + /// The text overflow mode to set. + /// The element, for chaining. + public static T SetTextOverflow( + this T element, + TextOverflow value) + where T : VisualElement + { + element.style.SetTextOverflow(value); + return element; + } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// The element's text overflow position. + /// + /// The element to modify. + /// The text overflow position to set. + /// The element, for chaining. + public static T SetUnityTextOverflowPosition( + this T element, + StyleEnum value) + where T : VisualElement + { + element.style.SetUnityTextOverflowPosition(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -709,6 +868,24 @@ public static T SetAlignSelf( element.style.SetAlignSelf(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Similar to align-items, but only for this specific element. + /// + /// The element to modify. + /// The alignment to set. + /// The element, for chaining. + public static T SetAlignSelf( + this T element, + Align value) + where T : VisualElement + { + element.style.SetAlignSelf(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -727,6 +904,24 @@ public static T SetAlignItems( element.style.SetAlignItems(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Alignment of children on the cross axis of this container. + /// + /// The element to modify. + /// The children alignment to set. + /// The element, for chaining. + public static T SetAlignItems( + this T element, + Align value) + where T : VisualElement + { + element.style.SetAlignItems(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -745,6 +940,24 @@ public static T SetAlignContent( element.style.SetAlignContent(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Alignment of the whole area of children on the cross axis if they span over multiple lines in this container. + /// + /// The element to modify. + /// The content alignment to set. + /// The element, for chaining. + public static T SetAlignContent( + this T element, + Align value) + where T : VisualElement + { + element.style.SetAlignContent(value); + return element; + } #endregion #region Aspect @@ -819,6 +1032,22 @@ public static T SetBorderColor( return element; } + /// + /// Sets the border color on all sides by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetBorderColor( + this T element, + string value) + where T : VisualElement + { + element.style.SetBorderColor(value); + return element; + } + /// /// Sets , , /// , and returns the element for chaining. @@ -908,6 +1137,22 @@ public static T SetBorderColorTop( return element; } + /// + /// Sets the top border color by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetBorderColorTop( + this T element, + string value) + where T : VisualElement + { + element.style.SetBorderColorTop(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -926,6 +1171,22 @@ public static T SetBorderColorRight( return element; } + /// + /// Sets the right border color by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetBorderColorRight( + this T element, + string value) + where T : VisualElement + { + element.style.SetBorderColorRight(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -944,6 +1205,22 @@ public static T SetBorderColorBottom( return element; } + /// + /// Sets the bottom border color by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetBorderColorBottom( + this T element, + string value) + where T : VisualElement + { + element.style.SetBorderColorBottom(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -962,6 +1239,22 @@ public static T SetBorderColorLeft( return element; } + /// + /// Sets the left border color by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetBorderColorLeft( + this T element, + string value) + where T : VisualElement + { + element.style.SetBorderColorLeft(value); + return element; + } + /// /// Sets , , /// , and returns the element for chaining. @@ -1055,6 +1348,46 @@ public static T SetBorderRadiusBottom( return element; } + /// + /// Sets , and returns the element for chaining. + /// + /// + /// borderTopLeftRadius –– The radius of the top-left corner when a rounded rectangle is drawn in the element's box. + /// borderBottomLeftRadius –– The radius of the bottom-left corner when a rounded rectangle is drawn in the element's box. + /// + /// The element type. + /// The element to modify. + /// The radius to apply to both left corners. + /// The element, for chaining. + public static T SetBorderRadiusLeft( + this T element, + StyleLength value) + where T : VisualElement + { + element.style.SetBorderRadiusLeft(value); + return element; + } + + /// + /// Sets , and returns the element for chaining. + /// + /// + /// borderTopRightRadius –– The radius of the top-right corner when a rounded rectangle is drawn in the element's box. + /// borderBottomRightRadius –– The radius of the bottom-right corner when a rounded rectangle is drawn in the element's box. + /// + /// The element type. + /// The element to modify. + /// The radius to apply to both right corners. + /// The element, for chaining. + public static T SetBorderRadiusRight( + this T element, + StyleLength value) + where T : VisualElement + { + element.style.SetBorderRadiusRight(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -1645,6 +1978,24 @@ public static T SetPaddingLeft( #endregion #region Display + /// + /// Sets and returns the element for chaining. + /// + /// + /// Defines how an element is displayed in the layout. + /// + /// The element to modify. + /// The display mode to set. + /// The element, for chaining. + public static T SetDisplay( + this T element, + StyleEnum value) + where T : VisualElement + { + element.style.SetDisplay(value); + return element; + } + /// /// Sets and returns the element for chaining. /// @@ -1682,6 +2033,24 @@ public static T SetOverflow( element.style.SetOverflow(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// How a container behaves if its content overflows its own box. + /// + /// The element to modify. + /// The overflow behavior to set. + /// The element, for chaining. + public static T SetOverflow( + this T element, + Overflow value) + where T : VisualElement + { + element.style.SetOverflow(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -1700,6 +2069,24 @@ public static T SetUnityOverflowClipBox( element.style.SetUnityOverflowClipBox(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Specifies which box the element content is clipped against. + /// + /// The element to modify. + /// The overflow clip box to set. + /// The element, for chaining. + public static T SetUnityOverflowClipBox( + this T element, + OverflowClipBox value) + where T : VisualElement + { + element.style.SetUnityOverflowClipBox(value); + return element; + } #endregion #region Distance @@ -1963,6 +2350,24 @@ public static T SetPosition( element.style.SetPosition(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Element's positioning in its parent container. + /// + /// The element to modify. + /// The position type to set. + /// The element, for chaining. + public static T SetPosition( + this T element, + Position value) + where T : VisualElement + { + element.style.SetPosition(value); + return element; + } /// /// Sets and returns the element for chaining. @@ -2043,7 +2448,7 @@ public static T SetBackgroundImage( /// /// The element to modify. /// The Resources path of the texture to load. - /// The style, for chaining. + /// The element, for chaining. public static T SetBackgroundImageFromResource( this T element, string path) @@ -2107,6 +2512,22 @@ public static T SetUnityBackgroundImageTintColor( return element; } + /// + /// Sets the background image tint color by parsing an HTML color string via . + /// + /// The element type. + /// The element to modify. + /// The HTML color string (e.g. "#FF0000", "red"). + /// The element, for chaining. + public static T SetUnityBackgroundImageTintColor( + this T element, + string value) + where T : VisualElement + { + element.style.SetUnityBackgroundImageTintColor(value); + return element; + } + /// /// Sets , and returns the element for chaining. /// @@ -2460,6 +2881,24 @@ public static T SetUnitySliceType( element.style.SetUnitySliceType(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Specifies the type of slicing. + /// + /// The element to modify. + /// The slice type to set. + /// The element, for chaining. + public static T SetUnitySliceType( + this T element, + SliceType value) + where T : VisualElement + { + element.style.SetUnitySliceType(value); + return element; + } #endif #endregion @@ -2481,6 +2920,24 @@ public static T SetVisibility( element.style.SetVisibility(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Specifies whether an element is visible. + /// + /// The element to modify. + /// The visibility to set. + /// The element, for chaining. + public static T SetVisibility( + this T element, + Visibility value) + where T : VisualElement + { + element.style.SetVisibility(value); + return element; + } #endregion #region WhiteSpace @@ -2501,6 +2958,24 @@ public static T SetWhiteSpace( element.style.SetWhiteSpace(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Word wrap over multiple lines if not enough space is available to draw the text of an element. + /// + /// The element to modify. + /// The white-space mode to set. + /// The element, for chaining. + public static T SetWhiteSpace( + this T element, + WhiteSpace value) + where T : VisualElement + { + element.style.SetWhiteSpace(value); + return element; + } #endregion #region JustifyContent @@ -2521,6 +2996,24 @@ public static T SetJustifyContent( element.style.SetJustifyContent(value); return element; } + + /// + /// Sets and returns the element for chaining. + /// + /// + /// Justification of children on the main axis of this container. + /// + /// The element to modify. + /// The justify content mode to set. + /// The element, for chaining. + public static T SetJustifyContent( + this T element, + Justify value) + where T : VisualElement + { + element.style.SetJustifyContent(value); + return element; + } #endregion } } diff --git a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Uss.cs b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Uss.cs index cacaf750..bf9808b6 100644 --- a/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Uss.cs +++ b/Aspid.FastTools/Assets/Aspid/FastTools/Unity/Runtime/VisualElements/Extensions/VisualElementExtensions.Uss.cs @@ -96,7 +96,14 @@ public static T AddStyleSheets(this T element, StyleSheet value) public static T AddStyleSheetsFromResource(this T element, string path) where T : VisualElement { - return element.AddStyleSheets(Resources.Load(path)); + var styleSheet = Resources.Load(path); + if (styleSheet == null) + { + Debug.LogWarning($"Failed to load StyleSheet from Resources path: '{path}'"); + return element; + } + + return element.AddStyleSheets(styleSheet); } /// @@ -121,7 +128,14 @@ public static T RemoveStyleSheets(this T element, StyleSheet value) public static T RemoveStyleSheetsFromResource(this T element, string path) where T : VisualElement { - return element.RemoveStyleSheets(Resources.Load(path)); + var styleSheet = Resources.Load(path); + if (styleSheet == null) + { + Debug.LogWarning($"Failed to load StyleSheet from Resources path: '{path}'"); + return element; + } + + return element.RemoveStyleSheets(styleSheet); } #endregion } diff --git a/Aspid.FastTools/Assets/Plugins.meta b/Aspid.FastTools/Assets/Plugins.meta deleted file mode 100644 index 68d8afc0..00000000 --- a/Aspid.FastTools/Assets/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f2451a51b0641425cbe482e7070eb55d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Aspid.FastTools/ProjectSettings/ProjectSettings.asset b/Aspid.FastTools/ProjectSettings/ProjectSettings.asset index 29a562d5..e96cabfe 100644 --- a/Aspid.FastTools/ProjectSettings/ProjectSettings.asset +++ b/Aspid.FastTools/ProjectSettings/ProjectSettings.asset @@ -934,7 +934,7 @@ PlayerSettings: qnxGraphicConfPath: apiCompatibilityLevel: 6 captureStartupLogs: {} - activeInputHandler: 0 + activeInputHandler: 2 windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0