From 222f9bbf3dc470ae5c40f35cd7bc4cd65a56e5dd Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Mon, 13 Jul 2026 12:33:33 -0500 Subject: [PATCH 01/21] Implement https://github.com/Facepunch/Rust.Community/pull/89 --- .../Components/Core/ImageComponent.cs | 4 ++++ .../ImageComponentAnimationExt.g.cs | 1 + .../UiImageAnimationExt.g.cs | 1 + .../UiPanelAnimationExt.g.cs | 1 + .../ImageComponent.g.cs | 7 +++++++ .../ImageComponent.g.cs | 12 +++++++++++- .../IImageComponent.g.cs | 2 ++ src/Rust.UIFramework/Json/JsonDefaults.cs | 3 +++ 8 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/Rust.UIFramework/Components/Core/ImageComponent.cs b/src/Rust.UIFramework/Components/Core/ImageComponent.cs index ee4f5266..53a6f52f 100644 --- a/src/Rust.UIFramework/Components/Core/ImageComponent.cs +++ b/src/Rust.UIFramework/Components/Core/ImageComponent.cs @@ -33,6 +33,9 @@ public partial class ImageComponent : CoreComponent, IGraphicalComponent [TrackedDefaults(typeof(JsonDefaults.Image), nameof(JsonDefaults.Image.FillCenter))] public partial bool FillCenter { get; set; } + [TrackedDefaults(typeof(JsonDefaults.Image), nameof(JsonDefaults.Image.PixelPerUnitMultiplier))] + public partial float PixelPerUnitMultiplier { get; set; } + public partial string Png { get; set; } public override Utf8String Type => JsonDefaults.Image.Type; @@ -46,6 +49,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.Color.ColorName, ColorTracked, mode); writer.AddField(JsonDefaults.Image.ImageTypeName, ImageTypeTracked, mode); writer.AddField(JsonDefaults.Image.FillCenterName, FillCenterTracked, mode); + writer.AddField(JsonDefaults.Image.PixelPerUnitMultiplierName, FillCenterTracked, mode); writer.AddField(JsonDefaults.Image.PngName, PngTracked, mode); if (PlaceholderFor.IsValidName()) { diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs index 8d9412f2..0f6e00f3 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs @@ -16,6 +16,7 @@ public static partial class ImageComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.ImageTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.PlaceholderForTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFillCenter() => animation.AnimateField(static a => a.FillCenterTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePixelPerUnitMultiplier() => animation.AnimateField(static a => a.PixelPerUnitMultiplierTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePng() => animation.AnimateField(static a => a.PngTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs index 174020ce..261c83ae 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs @@ -17,6 +17,7 @@ public static class UiImageAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.Image.ImageTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.Image.PlaceholderForTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFillCenter() => animation.AnimateField(static a => a.Image.FillCenterTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePixelPerUnitMultiplier() => animation.AnimateField(static a => a.Image.PixelPerUnitMultiplierTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePng() => animation.AnimateField(static a => a.Image.PngTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs index 33187fa9..0a86198c 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs @@ -17,6 +17,7 @@ public static class UiPanelAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.Image.ImageTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.Image.PlaceholderForTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFillCenter() => animation.AnimateField(static a => a.Image.FillCenterTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePixelPerUnitMultiplier() => animation.AnimateField(static a => a.Image.PixelPerUnitMultiplierTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePng() => animation.AnimateField(static a => a.Image.PngTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs index b43f9e4a..06bb1c21 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs @@ -56,6 +56,13 @@ public ImageComponent SetFillCenter(bool fillCenter) return this; } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ImageComponent SetPixelPerUnitMultiplier(float pixelPerUnitMultiplier) + { + PixelPerUnitMultiplier = pixelPerUnitMultiplier; + return this; + } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public ImageComponent SetPng(string png) { diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs index 0dddd734..28755d75 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs @@ -15,6 +15,7 @@ public partial class ImageComponent : IImageComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked ImageTypeTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Image.ImageType); internal readonly Oxide.Ext.UiFramework.Types.Tracked PlaceholderForTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked FillCenterTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Image.FillCenter); + internal readonly Oxide.Ext.UiFramework.Types.Tracked PixelPerUnitMultiplierTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Image.PixelPerUnitMultiplier); internal readonly Oxide.Ext.UiFramework.Types.Tracked PngTracked = new(); public partial Oxide.Ext.UiFramework.Colors.UiColor Color @@ -66,6 +67,13 @@ public partial bool FillCenter [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => FillCenterTracked.Value = value; } + public partial float PixelPerUnitMultiplier + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => PixelPerUnitMultiplierTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => PixelPerUnitMultiplierTracked.Value = value; + } public partial string Png { [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] @@ -74,7 +82,7 @@ public partial string Png set => PngTracked.Value = value; } - public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || PlaceholderForTracked.HasChanged || FillCenterTracked.HasChanged || PngTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || PlaceholderForTracked.HasChanged || FillCenterTracked.HasChanged || PixelPerUnitMultiplierTracked.HasChanged || PngTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -86,6 +94,7 @@ public override void ResetHasChanged() ImageTypeTracked.ResetHasChanged(); PlaceholderForTracked.ResetHasChanged(); FillCenterTracked.ResetHasChanged(); + PixelPerUnitMultiplierTracked.ResetHasChanged(); PngTracked.ResetHasChanged(); } @@ -99,6 +108,7 @@ public override void Reset() ImageTypeTracked.Reset(); PlaceholderForTracked.Reset(); FillCenterTracked.Reset(); + PixelPerUnitMultiplierTracked.Reset(); PngTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs index d367b40a..77773da4 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs @@ -14,6 +14,7 @@ public interface IImageComponent : IBaseTypedComponent UnityEngine.UI.Image.Type ImageType { get; set; } Oxide.Ext.UiFramework.UiElements.UiReference PlaceholderFor { get; set; } bool FillCenter { get; set; } + float PixelPerUnitMultiplier { get; set; } string Png { get; set; } Oxide.Ext.UiFramework.Components.ImageComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); @@ -23,6 +24,7 @@ public interface IImageComponent : IBaseTypedComponent Oxide.Ext.UiFramework.Components.ImageComponent SetImageType(UnityEngine.UI.Image.Type imageType); Oxide.Ext.UiFramework.Components.ImageComponent SetPlaceholderFor(in Oxide.Ext.UiFramework.UiElements.UiReference placeholderFor); Oxide.Ext.UiFramework.Components.ImageComponent SetFillCenter(bool fillCenter); + Oxide.Ext.UiFramework.Components.ImageComponent SetPixelPerUnitMultiplier(float pixelPerUnitMultiplier); Oxide.Ext.UiFramework.Components.ImageComponent SetPng(string png); } diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index f6037720..0f9e00c2 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -134,6 +134,9 @@ public static class Image public static readonly Utf8String SliceName = "slice"; public static readonly UiBorderWidth Slice = UiBorderWidth.Empty; + + public static readonly Utf8String PixelPerUnitMultiplierName = "ppuMultiplier"; + public const float PixelPerUnitMultiplier = 1f; } public static class ItemIcon From d1b6d64956988bfac73718327c907933e6a45ac6 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Mon, 13 Jul 2026 13:16:48 -0500 Subject: [PATCH 02/21] Implement https://github.com/Facepunch/Rust.Community/pull/92 --- .../Builder/BaseUiBuilder.SubComponents.cs | 15 +++++ .../Components/ComponentType.cs | 1 + .../Components/Core/ButtonComponent.cs | 6 +- .../Components/Core/ImageComponent.cs | 4 ++ .../Components/Core/PlayingCardComponent.cs | 5 ++ .../Components/Core/RawImageComponent.cs | 4 ++ .../Components/Core/TextComponent.cs | 6 +- .../Components/Sub/CanvasGroupComponent.cs | 35 ++++++++++ .../CanvasGroupComponentAnimationExt.g.cs | 21 ++++++ .../ButtonComponentAnimationExt.g.cs | 1 + .../CanvasGroupComponentAnimationExt.g.cs | 19 ++++++ .../ImageComponentAnimationExt.g.cs | 1 + .../PlayingCardComponentAnimationExt.g.cs | 1 + .../RawImageComponentAnimationExt.g.cs | 1 + .../TextComponentAnimationExt.g.cs | 1 + .../UiButtonAnimationExt.g.cs | 1 + .../UiIconAnimationExt.g.cs | 1 + .../UiImageAnimationExt.g.cs | 1 + .../UiLabelAnimationExt.g.cs | 1 + .../UiPanelAnimationExt.g.cs | 1 + .../UiPlayingCardAnimationExt.g.cs | 1 + .../UiRawImageAnimationExt.g.cs | 1 + .../ButtonComponent.g.cs | 7 ++ .../CanvasGroupComponent.g.cs | 39 +++++++++++ .../ImageComponent.g.cs | 7 ++ .../PlayingCardComponent.g.cs | 7 ++ .../RawImageComponent.g.cs | 7 ++ .../TextComponent.g.cs | 7 ++ .../ButtonComponent.g.cs | 14 +++- .../CanvasGroupComponent.g.cs | 66 +++++++++++++++++++ .../ImageComponent.g.cs | 12 +++- .../PlayingCardComponent.g.cs | 14 +++- .../RawImageComponent.g.cs | 12 +++- .../TextComponent.g.cs | 12 +++- .../IButtonComponent.g.cs | 2 + .../ICanvasGroupComponent.g.cs | 21 ++++++ .../IImageComponent.g.cs | 2 + .../IPlayingCardComponent.g.cs | 2 + .../IRawImageComponent.g.cs | 2 + .../ITextComponent.g.cs | 2 + .../JsonFrameworkWriter.g.cs | 24 +++++++ .../Components/IGraphicalComponent.cs | 1 + src/Rust.UIFramework/Json/JsonDefaults.cs | 20 ++++++ .../Json/JsonFrameworkWriter.cs | 9 +++ .../Types/UiCanvasGroupFade.cs | 3 + .../Generators/Json/JsonFrameworkGenerator.cs | 2 +- .../Helpers/SymbolCache.cs | 1 + 47 files changed, 413 insertions(+), 10 deletions(-) create mode 100644 src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/CanvasGroupComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ICanvasGroupComponent.g.cs create mode 100644 src/Rust.UIFramework/Types/UiCanvasGroupFade.cs diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs index 6b204e7b..97e4e176 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs @@ -260,4 +260,19 @@ public LayoutElementComponent LayoutElement(BaseUiComponent component, return Component(scroll).SetName(Singleton.Instance.GetContentName(scroll.Reference.Name)).SetUpdate(UpdateMode.Update); } #endregion + + #region Canvas Group + public CanvasGroupComponent CanvasGroup(BaseUiComponent component, float alpha = 1f, bool allowRaycast = true, bool interactable = true, UiCanvasGroupFade? fade = null) + { + CanvasGroupComponent canvas = component.GetOrAddSubComponent(); + canvas.Alpha = alpha; + canvas.AllowRaycast = allowRaycast; + canvas.Interactable = interactable; + if(fade.HasValue) + { + canvas.Fade = fade.Value; + } + return canvas; + } + #endregion } \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/ComponentType.cs b/src/Rust.UIFramework/Components/ComponentType.cs index 0e2fe683..c134d77d 100644 --- a/src/Rust.UIFramework/Components/ComponentType.cs +++ b/src/Rust.UIFramework/Components/ComponentType.cs @@ -25,6 +25,7 @@ public enum ComponentType : ushort GridLayout = 108, ContentSizeFitter = 109, LayoutElement = 110, + CanvasGroup = 111, ColorBlock = 1000, ScrollBar = 1001, diff --git a/src/Rust.UIFramework/Components/Core/ButtonComponent.cs b/src/Rust.UIFramework/Components/Core/ButtonComponent.cs index 01f7b11a..b71e3e96 100644 --- a/src/Rust.UIFramework/Components/Core/ButtonComponent.cs +++ b/src/Rust.UIFramework/Components/Core/ButtonComponent.cs @@ -15,11 +15,14 @@ public partial class ButtonComponent : CoreComponent, IGraphicalComponent public partial string Command { get; set; } [TrackedDefaults(typeof(JsonDefaults.Color), nameof(JsonDefaults.Color.ColorValue))] public partial UiColor Color { get; set; } + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.FadeIn))] public partial float FadeIn { get; set; } public partial string Sprite { get; set; } public partial string Material { get; set; } public partial Image.Type ImageType { get; set; } - public ButtonType ButtonType; + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] + public partial bool AllowRaycast { get; set; } + public ButtonType ButtonType { get; set; } public ColorBlockComponent ColorBlock { get; private set; } public override Utf8String Type => JsonDefaults.Button.Type; public override ComponentType ComponentType => ComponentType.Button; @@ -31,6 +34,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.Color.ColorName, ColorTracked, mode); writer.AddField(JsonDefaults.Common.FadeInName, FadeInTracked, mode); writer.AddField(JsonDefaults.Image.ImageTypeName, ImageTypeTracked, mode); + writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); switch (ButtonType) { case ButtonType.Command: diff --git a/src/Rust.UIFramework/Components/Core/ImageComponent.cs b/src/Rust.UIFramework/Components/Core/ImageComponent.cs index 53a6f52f..8f2587fd 100644 --- a/src/Rust.UIFramework/Components/Core/ImageComponent.cs +++ b/src/Rust.UIFramework/Components/Core/ImageComponent.cs @@ -36,6 +36,9 @@ public partial class ImageComponent : CoreComponent, IGraphicalComponent [TrackedDefaults(typeof(JsonDefaults.Image), nameof(JsonDefaults.Image.PixelPerUnitMultiplier))] public partial float PixelPerUnitMultiplier { get; set; } + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] + public partial bool AllowRaycast { get; set; } + public partial string Png { get; set; } public override Utf8String Type => JsonDefaults.Image.Type; @@ -51,6 +54,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.Image.FillCenterName, FillCenterTracked, mode); writer.AddField(JsonDefaults.Image.PixelPerUnitMultiplierName, FillCenterTracked, mode); writer.AddField(JsonDefaults.Image.PngName, PngTracked, mode); + writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); if (PlaceholderFor.IsValidName()) { writer.AddField(JsonDefaults.Common.PlaceholderInputId, PlaceholderFor.Name); diff --git a/src/Rust.UIFramework/Components/Core/PlayingCardComponent.cs b/src/Rust.UIFramework/Components/Core/PlayingCardComponent.cs index 1ec6c912..1f4d2991 100644 --- a/src/Rust.UIFramework/Components/Core/PlayingCardComponent.cs +++ b/src/Rust.UIFramework/Components/Core/PlayingCardComponent.cs @@ -15,11 +15,15 @@ public partial class PlayingCardComponent : CoreComponent, IGraphicalComponent public partial UiSuit Suit { get; set; } public partial UiRank Rank { get; set; } public partial UiCardType CardType { get; set; } + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.FadeIn))] public partial float FadeIn { get; set; } [TrackedDefaults(typeof(UiMaterials.Content.Ui), nameof(UiMaterials.Content.Ui.NameFontMaterial))] public partial string Material { get; set; } [TrackedDefaults(typeof(UiColors), nameof(UiColors.White))] public partial UiColor Color { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] + public partial bool AllowRaycast { get; set; } public override Utf8String Type => UiPlayingCards.GetComponentType(Rank, CardType); public override ComponentType ComponentType => ComponentType.PlayingCard; @@ -33,5 +37,6 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.BaseImage.MaterialName, MaterialTracked, mode); writer.AddField(JsonDefaults.Color.ColorName, ColorTracked, mode); writer.AddField(JsonDefaults.Common.FadeInName, FadeInTracked, mode); + writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/Core/RawImageComponent.cs b/src/Rust.UIFramework/Components/Core/RawImageComponent.cs index c7e16150..9e821d86 100644 --- a/src/Rust.UIFramework/Components/Core/RawImageComponent.cs +++ b/src/Rust.UIFramework/Components/Core/RawImageComponent.cs @@ -20,6 +20,9 @@ public partial class RawImageComponent : CoreComponent, IGraphicalComponent public partial string Image { get; set; } public partial string Material { get; set; } public partial UiReference PlaceholderFor { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] + public partial bool AllowRaycast { get; set; } [Obsolete("Please use Image instead")] public string Url { get => Image; set => Image = value; } @@ -36,6 +39,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.BaseImage.MaterialName, MaterialTracked, mode); writer.AddField(JsonDefaults.Color.ColorName, ColorTracked, mode); writer.AddField(JsonDefaults.Common.FadeInName, FadeInTracked, mode); + writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); if (PlaceholderForTracked.ShouldSerialize(mode) && PlaceholderFor.IsValidName()) { diff --git a/src/Rust.UIFramework/Components/Core/TextComponent.cs b/src/Rust.UIFramework/Components/Core/TextComponent.cs index 035d92e0..de2cf1e1 100644 --- a/src/Rust.UIFramework/Components/Core/TextComponent.cs +++ b/src/Rust.UIFramework/Components/Core/TextComponent.cs @@ -27,6 +27,9 @@ public partial class TextComponent : CoreComponent, IGraphicalComponent [TrackedDefaults(typeof(JsonDefaults.Text), nameof(JsonDefaults.Text.VerticalOverflow))] public partial VerticalWrapMode VerticalOverflow { get; set; } public partial UiReference PlaceholderFor { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] + public partial bool AllowRaycast { get; set; } public override Utf8String Type => JsonDefaults.Text.Type; public override ComponentType ComponentType => ComponentType.Text; @@ -40,7 +43,8 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.Text.VerticalOverflowName, VerticalOverflowTracked, mode); writer.AddField(JsonDefaults.Color.ColorName, ColorTracked, mode); writer.AddField(JsonDefaults.Common.FadeInName, FadeInTracked, mode); - + writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); + if (PlaceholderForTracked.ShouldSerialize(mode) && PlaceholderFor.IsValidName()) { writer.AddField(JsonDefaults.Common.PlaceholderInputId, PlaceholderFor.Name); diff --git a/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs b/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs new file mode 100644 index 00000000..55550f65 --- /dev/null +++ b/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs @@ -0,0 +1,35 @@ +using Oxide.Ext.UiFramework.Enums; +using Oxide.Ext.UiFramework.Json; +using Oxide.Ext.UiFramework.Types; +using Rust.UiFramework.SourceGenerators.Attributes; + +namespace Oxide.Ext.UiFramework.Components; + +[GenerateComponent] +[GenerateBuilderMethods] +public partial class CanvasGroupComponent : SubComponent +{ + [TrackedDefaults(typeof(JsonDefaults.CanvasGroup), nameof(JsonDefaults.CanvasGroup.Alpha))] + public partial float Alpha { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] + public partial bool AllowRaycast { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.CanvasGroup), nameof(JsonDefaults.CanvasGroup.Interactable))] + public partial bool Interactable { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.CanvasGroup), nameof(JsonDefaults.CanvasGroup.Fade))] + public partial UiCanvasGroupFade Fade { get; set; } + + public override Utf8String Type => JsonDefaults.Slot.Type; + public override ComponentType ComponentType => ComponentType.CanvasGroup; + public override bool AllowMultiple => false; + + protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) + { + writer.AddField(JsonDefaults.CanvasGroup.AlphaName, AlphaTracked, mode); + writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); + writer.AddField(JsonDefaults.CanvasGroup.InteractableName, InteractableTracked, mode); + writer.AddField(JsonDefaults.CanvasGroup.FadeName, FadeTracked, mode); + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs new file mode 100644 index 00000000..97262cfe --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs @@ -0,0 +1,21 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class CanvasGroupComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.UiElements.BaseUiComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateCanvasGroupComponent() => animation.AnimateComponent(static a => a.Component.GetOrAddSubComponent()); + } + + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.Components.BaseComponent, Oxide.Ext.UiFramework.Interfaces.ICoreComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateCanvasGroupComponent() => animation.AnimateComponent(static a => a.GetOrAddSubComponent()); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs index e2a6f362..609cb80c 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs @@ -15,6 +15,7 @@ public static partial class ButtonComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateSprite() => animation.AnimateField(static a => a.SpriteTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.ImageTypeTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs new file mode 100644 index 00000000..18460972 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/CanvasGroupComponentAnimationExt.g.cs @@ -0,0 +1,19 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class CanvasGroupComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAlpha() => animation.AnimateField(static a => a.AlphaTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateInteractable() => animation.AnimateField(static a => a.InteractableTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFade() => animation.AnimateField(static a => a.FadeTracked); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs index 0f6e00f3..eb6da64c 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ImageComponentAnimationExt.g.cs @@ -17,6 +17,7 @@ public static partial class ImageComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.PlaceholderForTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFillCenter() => animation.AnimateField(static a => a.FillCenterTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePixelPerUnitMultiplier() => animation.AnimateField(static a => a.PixelPerUnitMultiplierTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePng() => animation.AnimateField(static a => a.PngTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/PlayingCardComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/PlayingCardComponentAnimationExt.g.cs index cab7454c..2ada0188 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/PlayingCardComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/PlayingCardComponentAnimationExt.g.cs @@ -15,6 +15,7 @@ public static partial class PlayingCardComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFadeIn() => animation.AnimateField(static a => a.FadeInTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateColor() => animation.AnimateField(static a => a.ColorTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RawImageComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RawImageComponentAnimationExt.g.cs index 59604466..3a07ffb6 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RawImageComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RawImageComponentAnimationExt.g.cs @@ -14,6 +14,7 @@ public static partial class RawImageComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImage() => animation.AnimateField(static a => a.ImageTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.PlaceholderForTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TextComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TextComponentAnimationExt.g.cs index 7f6539fa..b596d858 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TextComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TextComponentAnimationExt.g.cs @@ -17,6 +17,7 @@ public static partial class TextComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateText() => animation.AnimateField(static a => a.TextTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateVerticalOverflow() => animation.AnimateField(static a => a.VerticalOverflowTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.PlaceholderForTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs index 45fb2cb0..acf3817c 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs @@ -16,6 +16,7 @@ public static class UiButtonAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateSprite() => animation.AnimateField(static a => a.Button.SpriteTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.Button.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.Button.ImageTypeTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.Button.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiIconAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiIconAnimationExt.g.cs index a491bb19..ec9e4dd8 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiIconAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiIconAnimationExt.g.cs @@ -15,6 +15,7 @@ public static class UiIconAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImage() => animation.AnimateField(static a => a.RawImage.ImageTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.RawImage.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.RawImage.PlaceholderForTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.RawImage.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs index 261c83ae..07c8a195 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiImageAnimationExt.g.cs @@ -18,6 +18,7 @@ public static class UiImageAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.Image.PlaceholderForTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFillCenter() => animation.AnimateField(static a => a.Image.FillCenterTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePixelPerUnitMultiplier() => animation.AnimateField(static a => a.Image.PixelPerUnitMultiplierTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.Image.AllowRaycastTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePng() => animation.AnimateField(static a => a.Image.PngTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiLabelAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiLabelAnimationExt.g.cs index abe020a3..5903def8 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiLabelAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiLabelAnimationExt.g.cs @@ -18,6 +18,7 @@ public static class UiLabelAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateText() => animation.AnimateField(static a => a.Text.TextTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateVerticalOverflow() => animation.AnimateField(static a => a.Text.VerticalOverflowTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.Text.PlaceholderForTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.Text.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs index 0a86198c..937488a2 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPanelAnimationExt.g.cs @@ -18,6 +18,7 @@ public static class UiPanelAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.Image.PlaceholderForTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFillCenter() => animation.AnimateField(static a => a.Image.FillCenterTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePixelPerUnitMultiplier() => animation.AnimateField(static a => a.Image.PixelPerUnitMultiplierTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.Image.AllowRaycastTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePng() => animation.AnimateField(static a => a.Image.PngTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPlayingCardAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPlayingCardAnimationExt.g.cs index 79bc7c2f..e6d7271a 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPlayingCardAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiPlayingCardAnimationExt.g.cs @@ -16,6 +16,7 @@ public static class UiPlayingCardAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFadeIn() => animation.AnimateField(static a => a.Card.FadeInTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.Card.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateColor() => animation.AnimateField(static a => a.Card.ColorTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.Card.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiRawImageAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiRawImageAnimationExt.g.cs index edb86a19..9bfdaf0a 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiRawImageAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiRawImageAnimationExt.g.cs @@ -15,6 +15,7 @@ public static class UiRawImageAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImage() => animation.AnimateField(static a => a.RawImage.ImageTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.RawImage.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholderFor() => animation.AnimateField(static a => a.RawImage.PlaceholderForTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.RawImage.AllowRaycastTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs index 429d715c..03e70b4d 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs @@ -48,6 +48,13 @@ public ButtonComponent SetImageType(UnityEngine.UI.Image.Type imageType) ImageType = imageType; return this; } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ButtonComponent SetAllowRaycast(bool allowRaycast) + { + AllowRaycast = allowRaycast; + return this; + } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/CanvasGroupComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/CanvasGroupComponent.g.cs new file mode 100644 index 00000000..8c223a71 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/CanvasGroupComponent.g.cs @@ -0,0 +1,39 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Components; + +public partial class CanvasGroupComponent +{ + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public CanvasGroupComponent SetAlpha(float alpha) + { + Alpha = alpha; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public CanvasGroupComponent SetAllowRaycast(bool allowRaycast) + { + AllowRaycast = allowRaycast; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public CanvasGroupComponent SetInteractable(bool interactable) + { + Interactable = interactable; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public CanvasGroupComponent SetFade(Oxide.Ext.UiFramework.Types.UiCanvasGroupFade fade) + { + Fade = fade; + return this; + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs index 06bb1c21..7784ac78 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ImageComponent.g.cs @@ -63,6 +63,13 @@ public ImageComponent SetPixelPerUnitMultiplier(float pixelPerUnitMultiplier) return this; } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ImageComponent SetAllowRaycast(bool allowRaycast) + { + AllowRaycast = allowRaycast; + return this; + } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public ImageComponent SetPng(string png) { diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/PlayingCardComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/PlayingCardComponent.g.cs index d2726be5..b8fc9984 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/PlayingCardComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/PlayingCardComponent.g.cs @@ -48,6 +48,13 @@ public PlayingCardComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color) Color = color; return this; } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public PlayingCardComponent SetAllowRaycast(bool allowRaycast) + { + AllowRaycast = allowRaycast; + return this; + } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RawImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RawImageComponent.g.cs index 7e05bfdb..10396398 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RawImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RawImageComponent.g.cs @@ -41,6 +41,13 @@ public RawImageComponent SetPlaceholderFor(in Oxide.Ext.UiFramework.UiElements.U PlaceholderFor = placeholderFor; return this; } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public RawImageComponent SetAllowRaycast(bool allowRaycast) + { + AllowRaycast = allowRaycast; + return this; + } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TextComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TextComponent.g.cs index e5891d26..8359a3ba 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TextComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TextComponent.g.cs @@ -62,6 +62,13 @@ public TextComponent SetPlaceholderFor(in Oxide.Ext.UiFramework.UiElements.UiRef PlaceholderFor = placeholderFor; return this; } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TextComponent SetAllowRaycast(bool allowRaycast) + { + AllowRaycast = allowRaycast; + return this; + } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs index 12078b72..6ecdc0f4 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs @@ -10,10 +10,11 @@ public partial class ButtonComponent : IButtonComponent { internal readonly Oxide.Ext.UiFramework.Types.Tracked CommandTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked ColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Color.ColorValue); - internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeInTracked = new(); + internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeInTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.FadeIn); internal readonly Oxide.Ext.UiFramework.Types.Tracked SpriteTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked MaterialTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked ImageTypeTracked = new(); + internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); public partial string Command { @@ -57,8 +58,15 @@ public partial UnityEngine.UI.Image.Type ImageType [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => ImageTypeTracked.Value = value; } + public partial bool AllowRaycast + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AllowRaycastTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AllowRaycastTracked.Value = value; + } - public override bool HasChanged() => false || (CommandTracked.HasChanged || ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged) || ((ColorBlock?.HasChanged() ?? false)) || base.HasChanged(); + public override bool HasChanged() => false || (CommandTracked.HasChanged || ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || AllowRaycastTracked.HasChanged) || ((ColorBlock?.HasChanged() ?? false)) || base.HasChanged(); public override void ResetHasChanged() { @@ -69,6 +77,7 @@ public override void ResetHasChanged() SpriteTracked.ResetHasChanged(); MaterialTracked.ResetHasChanged(); ImageTypeTracked.ResetHasChanged(); + AllowRaycastTracked.ResetHasChanged(); ColorBlock?.ResetHasChanged(); } @@ -81,6 +90,7 @@ public override void Reset() SpriteTracked.Reset(); MaterialTracked.Reset(); ImageTypeTracked.Reset(); + AllowRaycastTracked.Reset(); ColorBlock?.TryDispose(); ColorBlock = null; } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs new file mode 100644 index 00000000..adf9f426 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs @@ -0,0 +1,66 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// +using Oxide.Ext.UiFramework.Interfaces; + +namespace Oxide.Ext.UiFramework.Components; + +public partial class CanvasGroupComponent : ICanvasGroupComponent +{ + internal readonly Oxide.Ext.UiFramework.Types.Tracked AlphaTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.CanvasGroup.Alpha); + internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); + internal readonly Oxide.Ext.UiFramework.Types.Tracked InteractableTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.CanvasGroup.Interactable); + internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.CanvasGroup.Fade); + + public partial float Alpha + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AlphaTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AlphaTracked.Value = value; + } + public partial bool AllowRaycast + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AllowRaycastTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AllowRaycastTracked.Value = value; + } + public partial bool Interactable + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => InteractableTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => InteractableTracked.Value = value; + } + public partial Oxide.Ext.UiFramework.Types.UiCanvasGroupFade Fade + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => FadeTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => FadeTracked.Value = value; + } + + public override bool HasChanged() => false || (AlphaTracked.HasChanged || AllowRaycastTracked.HasChanged || InteractableTracked.HasChanged || FadeTracked.HasChanged) || base.HasChanged(); + + public override void ResetHasChanged() + { + base.ResetHasChanged(); + AlphaTracked.ResetHasChanged(); + AllowRaycastTracked.ResetHasChanged(); + InteractableTracked.ResetHasChanged(); + FadeTracked.ResetHasChanged(); + } + + public override void Reset() + { + base.Reset(); + AlphaTracked.Reset(); + AllowRaycastTracked.Reset(); + InteractableTracked.Reset(); + FadeTracked.Reset(); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs index 28755d75..395fd520 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ImageComponent.g.cs @@ -16,6 +16,7 @@ public partial class ImageComponent : IImageComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked PlaceholderForTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked FillCenterTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Image.FillCenter); internal readonly Oxide.Ext.UiFramework.Types.Tracked PixelPerUnitMultiplierTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Image.PixelPerUnitMultiplier); + internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); internal readonly Oxide.Ext.UiFramework.Types.Tracked PngTracked = new(); public partial Oxide.Ext.UiFramework.Colors.UiColor Color @@ -74,6 +75,13 @@ public partial float PixelPerUnitMultiplier [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => PixelPerUnitMultiplierTracked.Value = value; } + public partial bool AllowRaycast + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AllowRaycastTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AllowRaycastTracked.Value = value; + } public partial string Png { [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] @@ -82,7 +90,7 @@ public partial string Png set => PngTracked.Value = value; } - public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || PlaceholderForTracked.HasChanged || FillCenterTracked.HasChanged || PixelPerUnitMultiplierTracked.HasChanged || PngTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || PlaceholderForTracked.HasChanged || FillCenterTracked.HasChanged || PixelPerUnitMultiplierTracked.HasChanged || AllowRaycastTracked.HasChanged || PngTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -95,6 +103,7 @@ public override void ResetHasChanged() PlaceholderForTracked.ResetHasChanged(); FillCenterTracked.ResetHasChanged(); PixelPerUnitMultiplierTracked.ResetHasChanged(); + AllowRaycastTracked.ResetHasChanged(); PngTracked.ResetHasChanged(); } @@ -109,6 +118,7 @@ public override void Reset() PlaceholderForTracked.Reset(); FillCenterTracked.Reset(); PixelPerUnitMultiplierTracked.Reset(); + AllowRaycastTracked.Reset(); PngTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/PlayingCardComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/PlayingCardComponent.g.cs index 1f8095b8..a028e472 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/PlayingCardComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/PlayingCardComponent.g.cs @@ -11,9 +11,10 @@ public partial class PlayingCardComponent : IPlayingCardComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked SuitTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked RankTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked CardTypeTracked = new(); - internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeInTracked = new(); + internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeInTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.FadeIn); internal readonly Oxide.Ext.UiFramework.Types.Tracked MaterialTracked = new(Oxide.Ext.UiFramework.Constants.UiMaterials.Content.Ui.NameFontMaterial); internal readonly Oxide.Ext.UiFramework.Types.Tracked ColorTracked = new(Oxide.Ext.UiFramework.Colors.UiColors.White); + internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); public partial Oxide.Ext.UiFramework.Enums.UiSuit Suit { @@ -57,8 +58,15 @@ public partial Oxide.Ext.UiFramework.Colors.UiColor Color [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => ColorTracked.Value = value; } + public partial bool AllowRaycast + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AllowRaycastTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AllowRaycastTracked.Value = value; + } - public override bool HasChanged() => false || (SuitTracked.HasChanged || RankTracked.HasChanged || CardTypeTracked.HasChanged || FadeInTracked.HasChanged || MaterialTracked.HasChanged || ColorTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (SuitTracked.HasChanged || RankTracked.HasChanged || CardTypeTracked.HasChanged || FadeInTracked.HasChanged || MaterialTracked.HasChanged || ColorTracked.HasChanged || AllowRaycastTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -69,6 +77,7 @@ public override void ResetHasChanged() FadeInTracked.ResetHasChanged(); MaterialTracked.ResetHasChanged(); ColorTracked.ResetHasChanged(); + AllowRaycastTracked.ResetHasChanged(); } public override void Reset() @@ -80,6 +89,7 @@ public override void Reset() FadeInTracked.Reset(); MaterialTracked.Reset(); ColorTracked.Reset(); + AllowRaycastTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RawImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RawImageComponent.g.cs index 7d8ee28e..64e270da 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RawImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RawImageComponent.g.cs @@ -13,6 +13,7 @@ public partial class RawImageComponent : IRawImageComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked ImageTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked MaterialTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked PlaceholderForTracked = new(); + internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); public partial Oxide.Ext.UiFramework.Colors.UiColor Color { @@ -49,8 +50,15 @@ public partial Oxide.Ext.UiFramework.UiElements.UiReference PlaceholderFor [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => PlaceholderForTracked.Value = value; } + public partial bool AllowRaycast + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AllowRaycastTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AllowRaycastTracked.Value = value; + } - public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || ImageTracked.HasChanged || MaterialTracked.HasChanged || PlaceholderForTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || ImageTracked.HasChanged || MaterialTracked.HasChanged || PlaceholderForTracked.HasChanged || AllowRaycastTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -60,6 +68,7 @@ public override void ResetHasChanged() ImageTracked.ResetHasChanged(); MaterialTracked.ResetHasChanged(); PlaceholderForTracked.ResetHasChanged(); + AllowRaycastTracked.ResetHasChanged(); } public override void Reset() @@ -70,6 +79,7 @@ public override void Reset() ImageTracked.Reset(); MaterialTracked.Reset(); PlaceholderForTracked.Reset(); + AllowRaycastTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TextComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TextComponent.g.cs index 3e8fc0b4..6e8fd041 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TextComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TextComponent.g.cs @@ -16,6 +16,7 @@ public partial class TextComponent : ITextComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked TextTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked VerticalOverflowTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Text.VerticalOverflow); internal readonly Oxide.Ext.UiFramework.Types.Tracked PlaceholderForTracked = new(); + internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); public partial Oxide.Ext.UiFramework.Colors.UiColor Color { @@ -73,8 +74,15 @@ public partial Oxide.Ext.UiFramework.UiElements.UiReference PlaceholderFor [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => PlaceholderForTracked.Value = value; } + public partial bool AllowRaycast + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => AllowRaycastTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => AllowRaycastTracked.Value = value; + } - public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || FontSizeTracked.HasChanged || FontTracked.HasChanged || AlignTracked.HasChanged || TextTracked.HasChanged || VerticalOverflowTracked.HasChanged || PlaceholderForTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (ColorTracked.HasChanged || FadeInTracked.HasChanged || FontSizeTracked.HasChanged || FontTracked.HasChanged || AlignTracked.HasChanged || TextTracked.HasChanged || VerticalOverflowTracked.HasChanged || PlaceholderForTracked.HasChanged || AllowRaycastTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -87,6 +95,7 @@ public override void ResetHasChanged() TextTracked.ResetHasChanged(); VerticalOverflowTracked.ResetHasChanged(); PlaceholderForTracked.ResetHasChanged(); + AllowRaycastTracked.ResetHasChanged(); } public override void Reset() @@ -100,6 +109,7 @@ public override void Reset() TextTracked.Reset(); VerticalOverflowTracked.Reset(); PlaceholderForTracked.Reset(); + AllowRaycastTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs index ae423c19..f772a36a 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs @@ -13,6 +13,7 @@ public interface IButtonComponent : IBaseTypedComponent string Sprite { get; set; } string Material { get; set; } UnityEngine.UI.Image.Type ImageType { get; set; } + bool AllowRaycast { get; set; } Oxide.Ext.UiFramework.Components.ButtonComponent SetCommand(string command); Oxide.Ext.UiFramework.Components.ButtonComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); @@ -20,6 +21,7 @@ public interface IButtonComponent : IBaseTypedComponent Oxide.Ext.UiFramework.Components.ButtonComponent SetSprite(string sprite); Oxide.Ext.UiFramework.Components.ButtonComponent SetMaterial(string material); Oxide.Ext.UiFramework.Components.ButtonComponent SetImageType(UnityEngine.UI.Image.Type imageType); + Oxide.Ext.UiFramework.Components.ButtonComponent SetAllowRaycast(bool allowRaycast); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ICanvasGroupComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ICanvasGroupComponent.g.cs new file mode 100644 index 00000000..f74826ed --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ICanvasGroupComponent.g.cs @@ -0,0 +1,21 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Interfaces; + +public interface ICanvasGroupComponent : IBaseTypedComponent +{ + float Alpha { get; set; } + bool AllowRaycast { get; set; } + bool Interactable { get; set; } + Oxide.Ext.UiFramework.Types.UiCanvasGroupFade Fade { get; set; } + + Oxide.Ext.UiFramework.Components.CanvasGroupComponent SetAlpha(float alpha); + Oxide.Ext.UiFramework.Components.CanvasGroupComponent SetAllowRaycast(bool allowRaycast); + Oxide.Ext.UiFramework.Components.CanvasGroupComponent SetInteractable(bool interactable); + Oxide.Ext.UiFramework.Components.CanvasGroupComponent SetFade(Oxide.Ext.UiFramework.Types.UiCanvasGroupFade fade); +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs index 77773da4..61f75925 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IImageComponent.g.cs @@ -15,6 +15,7 @@ public interface IImageComponent : IBaseTypedComponent Oxide.Ext.UiFramework.UiElements.UiReference PlaceholderFor { get; set; } bool FillCenter { get; set; } float PixelPerUnitMultiplier { get; set; } + bool AllowRaycast { get; set; } string Png { get; set; } Oxide.Ext.UiFramework.Components.ImageComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); @@ -25,6 +26,7 @@ public interface IImageComponent : IBaseTypedComponent Oxide.Ext.UiFramework.Components.ImageComponent SetPlaceholderFor(in Oxide.Ext.UiFramework.UiElements.UiReference placeholderFor); Oxide.Ext.UiFramework.Components.ImageComponent SetFillCenter(bool fillCenter); Oxide.Ext.UiFramework.Components.ImageComponent SetPixelPerUnitMultiplier(float pixelPerUnitMultiplier); + Oxide.Ext.UiFramework.Components.ImageComponent SetAllowRaycast(bool allowRaycast); Oxide.Ext.UiFramework.Components.ImageComponent SetPng(string png); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IPlayingCardComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IPlayingCardComponent.g.cs index bff0394b..b509b2f9 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IPlayingCardComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IPlayingCardComponent.g.cs @@ -13,6 +13,7 @@ public interface IPlayingCardComponent : IBaseTypedComponent float FadeIn { get; set; } string Material { get; set; } Oxide.Ext.UiFramework.Colors.UiColor Color { get; set; } + bool AllowRaycast { get; set; } Oxide.Ext.UiFramework.Components.PlayingCardComponent SetSuit(Oxide.Ext.UiFramework.Enums.UiSuit suit); Oxide.Ext.UiFramework.Components.PlayingCardComponent SetRank(Oxide.Ext.UiFramework.Enums.UiRank rank); @@ -20,6 +21,7 @@ public interface IPlayingCardComponent : IBaseTypedComponent Oxide.Ext.UiFramework.Components.PlayingCardComponent SetFadeIn(float fadeIn); Oxide.Ext.UiFramework.Components.PlayingCardComponent SetMaterial(string material); Oxide.Ext.UiFramework.Components.PlayingCardComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); + Oxide.Ext.UiFramework.Components.PlayingCardComponent SetAllowRaycast(bool allowRaycast); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRawImageComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRawImageComponent.g.cs index fb609537..ebe46708 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRawImageComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRawImageComponent.g.cs @@ -12,12 +12,14 @@ public interface IRawImageComponent : IBaseTypedComponent string Image { get; set; } string Material { get; set; } Oxide.Ext.UiFramework.UiElements.UiReference PlaceholderFor { get; set; } + bool AllowRaycast { get; set; } Oxide.Ext.UiFramework.Components.RawImageComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); Oxide.Ext.UiFramework.Components.RawImageComponent SetFadeIn(float fadeIn); Oxide.Ext.UiFramework.Components.RawImageComponent SetImage(string image); Oxide.Ext.UiFramework.Components.RawImageComponent SetMaterial(string material); Oxide.Ext.UiFramework.Components.RawImageComponent SetPlaceholderFor(in Oxide.Ext.UiFramework.UiElements.UiReference placeholderFor); + Oxide.Ext.UiFramework.Components.RawImageComponent SetAllowRaycast(bool allowRaycast); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITextComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITextComponent.g.cs index 7d9fa592..63559d11 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITextComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITextComponent.g.cs @@ -15,6 +15,7 @@ public interface ITextComponent : IBaseTypedComponent string Text { get; set; } UnityEngine.VerticalWrapMode VerticalOverflow { get; set; } Oxide.Ext.UiFramework.UiElements.UiReference PlaceholderFor { get; set; } + bool AllowRaycast { get; set; } Oxide.Ext.UiFramework.Components.TextComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); Oxide.Ext.UiFramework.Components.TextComponent SetFadeIn(float fadeIn); @@ -24,6 +25,7 @@ public interface ITextComponent : IBaseTypedComponent Oxide.Ext.UiFramework.Components.TextComponent SetText(string text); Oxide.Ext.UiFramework.Components.TextComponent SetVerticalOverflow(UnityEngine.VerticalWrapMode verticalOverflow); Oxide.Ext.UiFramework.Components.TextComponent SetPlaceholderFor(in Oxide.Ext.UiFramework.UiElements.UiReference placeholderFor); + Oxide.Ext.UiFramework.Components.TextComponent SetAllowRaycast(bool allowRaycast); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs index 4d4239f2..f9f0fcff 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs @@ -133,6 +133,12 @@ public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFr WriteValue(value); } + public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFramework.Types.UiCanvasGroupFade value) + { + WritePropertyName(name); + WriteValue(value); + } + public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, byte value, byte defaultValue) { if (value != defaultValue) @@ -322,6 +328,15 @@ public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFr } } + public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFramework.Types.UiCanvasGroupFade value, Oxide.Ext.UiFramework.Types.UiCanvasGroupFade defaultValue) + { + if (value != defaultValue) + { + WritePropertyName(name); + WriteValue(value); + } + } + public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFramework.Types.Tracked value, Oxide.Ext.UiFramework.Enums.SerializeMode mode) { if (value.ShouldSerialize(mode)) @@ -501,6 +516,15 @@ public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFr WriteValue(value.Value); } } + + public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFramework.Types.Tracked value, Oxide.Ext.UiFramework.Enums.SerializeMode mode) + { + if (value.ShouldSerialize(mode)) + { + WritePropertyName(name); + WriteValue(value.Value); + } + } } diff --git a/src/Rust.UIFramework/Interfaces/Components/IGraphicalComponent.cs b/src/Rust.UIFramework/Interfaces/Components/IGraphicalComponent.cs index 0dcb5642..d1e02ac5 100644 --- a/src/Rust.UIFramework/Interfaces/Components/IGraphicalComponent.cs +++ b/src/Rust.UIFramework/Interfaces/Components/IGraphicalComponent.cs @@ -3,4 +3,5 @@ public interface IGraphicalComponent { float FadeIn { get; set; } + bool AllowRaycast { get; set; } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index 0f9e00c2..39160faf 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -36,6 +36,9 @@ public static class Common public static readonly UiPadding TextPadding = new(2, 0); public static readonly UiPadding Padding = new(2); + + public static readonly Utf8String AllowRaycastName = "blocksRaycast"; + public const bool AllowRaycast = true; } public static class RectTransform @@ -416,4 +419,21 @@ public static class LayoutElement public static readonly Utf8String IgnoreLayoutName = "ignoreLayout"; public const bool IgnoreLayout = false; } + + public static class CanvasGroup + { + public static readonly Utf8String Type = "UnityEngine.UI.CanvasGroup"; + + public static readonly Utf8String AlphaName = "alpha"; + public const float Alpha = 1f; + + public static readonly Utf8String BlocksRaycastsName = "blocksRaycasts"; + public const bool BlocksRaycasts = true; + + public static readonly Utf8String InteractableName = "interactable"; + public const bool Interactable = true; + + public static readonly Utf8String FadeName = "fade"; + public static readonly UiCanvasGroupFade Fade = new(0, 1); + } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs b/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs index 55b652c7..8a439537 100644 --- a/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs +++ b/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs @@ -406,6 +406,15 @@ public void WriteValue(in UiBorderWidth border) _writer.Write(border.Top); _writer.WriteChar(QuoteChar); } + + public void WriteValue(UiCanvasGroupFade fade) + { + _writer.WriteChar(QuoteChar); + _writer.Write(fade.ToAlpha); + _writer.WriteChar(Space); + _writer.Write(fade.Duration); + _writer.WriteChar(QuoteChar); + } public void WriteEmptyString() { diff --git a/src/Rust.UIFramework/Types/UiCanvasGroupFade.cs b/src/Rust.UIFramework/Types/UiCanvasGroupFade.cs new file mode 100644 index 00000000..23bf1cb7 --- /dev/null +++ b/src/Rust.UIFramework/Types/UiCanvasGroupFade.cs @@ -0,0 +1,3 @@ +namespace Oxide.Ext.UiFramework.Types; + +public readonly record struct UiCanvasGroupFade(float ToAlpha, float Duration); \ No newline at end of file diff --git a/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs b/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs index 66476488..32929ff0 100644 --- a/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs +++ b/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs @@ -85,7 +85,7 @@ public GeneratorData() SymbolCache cache = SymbolCache.Instance; CommonFieldTypes = [cache.Byte.Symbol, cache.SByte.Symbol, cache.Char.Symbol, cache.Bool.Symbol, cache.Int16.Symbol, cache.UInt16.Symbol, cache.Int32.Symbol, cache.UInt32.Symbol, cache.Int64.Symbol, cache.UInt64.Symbol, cache.Float.Symbol, cache.String.Symbol, cache.Types.UiColor.Symbol, cache.Types.UiRotation.Symbol, cache.Types.UiPivot.Symbol, cache.Types.UiBorderWidth.Symbol, cache.Types.UiPadding.Symbol, - cache.Vector2.Symbol, cache.Vector3.Symbol, cache.Vector4.Symbol, cache.Types.Utf8String.Symbol]; + cache.Vector2.Symbol, cache.Vector3.Symbol, cache.Vector4.Symbol, cache.Types.Utf8String.Symbol, cache.Types.UiCanvasGroupFade.Symbol]; AddFieldTypes = CommonFieldTypes; AddDefaultValueTypes = CommonFieldTypes; AddTrackedTypes = CommonFieldTypes.Where(t => !t.Equals(cache.String.Symbol, SymbolEqualityComparer.Default)).ToArray(); // String has special tracked handling diff --git a/src/Rust.UiFramework.SourceGenerators/Helpers/SymbolCache.cs b/src/Rust.UiFramework.SourceGenerators/Helpers/SymbolCache.cs index 12485010..81638bb0 100644 --- a/src/Rust.UiFramework.SourceGenerators/Helpers/SymbolCache.cs +++ b/src/Rust.UiFramework.SourceGenerators/Helpers/SymbolCache.cs @@ -161,6 +161,7 @@ public class TypesCache public readonly FrameworkSymbolCache UiBorderWidth = new("Types.UiBorderWidth"); public readonly FrameworkSymbolCache UiPadding = new("Types.UiPadding"); public readonly FrameworkSymbolCache UiColor = new("Colors.UiColor"); + public readonly FrameworkSymbolCache UiCanvasGroupFade = new("Types.UiCanvasGroupFade"); public TypesCache(Compilation compilation) { From d3f402e8d593cec3d715d4b3ae803c854be8df67 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Mon, 13 Jul 2026 13:51:03 -0500 Subject: [PATCH 03/21] Implement https://github.com/Facepunch/Rust.Community/pull/91 --- .../Builder/BaseUiBuilder.SubComponents.cs | 18 +++++++++ .../Components/ComponentType.cs | 2 + .../Sub/Layout/BaseLayoutComponent.cs | 2 +- .../Components/Sub/MaskComponent.cs | 23 +++++++++++ .../Components/Sub/RectMask2DComponent.cs | 23 +++++++++++ src/Rust.UIFramework/Enums/UiPaddingFormat.cs | 7 ++++ .../MaskComponentAnimationExt.g.cs | 21 ++++++++++ .../RectMask2DComponentAnimationExt.g.cs | 21 ++++++++++ .../MaskComponentAnimationExt.g.cs | 16 ++++++++ .../RectMask2DComponentAnimationExt.g.cs | 16 ++++++++ .../MaskComponent.g.cs | 18 +++++++++ .../RectMask2DComponent.g.cs | 18 +++++++++ .../MaskComponent.g.cs | 36 +++++++++++++++++ .../RectMask2DComponent.g.cs | 36 +++++++++++++++++ .../IMaskComponent.g.cs | 15 +++++++ .../IRectMask2DComponent.g.cs | 15 +++++++ .../JsonFrameworkWriter.g.cs | 24 ------------ src/Rust.UIFramework/Json/JsonDefaults.cs | 16 ++++++++ .../Json/JsonFrameworkWriter.cs | 39 ++++++++++++++++++- src/Rust.UIFramework/Types/UiPadding.cs | 9 +++-- .../Generators/Json/JsonFrameworkGenerator.cs | 2 +- 21 files changed, 346 insertions(+), 31 deletions(-) create mode 100644 src/Rust.UIFramework/Components/Sub/MaskComponent.cs create mode 100644 src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs create mode 100644 src/Rust.UIFramework/Enums/UiPaddingFormat.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/MaskComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/MaskComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/MaskComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/MaskComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IMaskComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs index 97e4e176..3de76645 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs @@ -275,4 +275,22 @@ public CanvasGroupComponent CanvasGroup(BaseUiComponent component, float alpha = return canvas; } #endregion + + #region Rect Mask 2D + public RectMask2DComponent RectMask2D(BaseUiComponent component, UiPadding padding = default) + { + RectMask2DComponent mask = component.GetOrAddSubComponent(); + mask.Padding = padding; + return mask; + } + #endregion + + #region Rect Mask 2D + public MaskComponent Mask(BaseUiComponent component, bool showMaskGraphic = JsonDefaults.Mask.ShowMaskGraphic) + { + MaskComponent mask = component.GetOrAddSubComponent(); + mask.ShowMaskGraphic = showMaskGraphic; + return mask; + } + #endregion } \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/ComponentType.cs b/src/Rust.UIFramework/Components/ComponentType.cs index c134d77d..a2be63cb 100644 --- a/src/Rust.UIFramework/Components/ComponentType.cs +++ b/src/Rust.UIFramework/Components/ComponentType.cs @@ -26,6 +26,8 @@ public enum ComponentType : ushort ContentSizeFitter = 109, LayoutElement = 110, CanvasGroup = 111, + RectMask2D = 112, + Mask = 113, ColorBlock = 1000, ScrollBar = 1001, diff --git a/src/Rust.UIFramework/Components/Sub/Layout/BaseLayoutComponent.cs b/src/Rust.UIFramework/Components/Sub/Layout/BaseLayoutComponent.cs index 7e691fd0..1224e152 100644 --- a/src/Rust.UIFramework/Components/Sub/Layout/BaseLayoutComponent.cs +++ b/src/Rust.UIFramework/Components/Sub/Layout/BaseLayoutComponent.cs @@ -23,7 +23,7 @@ public abstract partial class BaseLayoutComponent : SubComponent protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) { writer.AddField(JsonDefaults.Layout.ChildAlignmentName, ChildAlignmentTracked, mode); - writer.AddField(JsonDefaults.Layout.PaddingName, PaddingTracked, mode); + writer.AddField(JsonDefaults.Layout.PaddingName, PaddingTracked, mode, UiPaddingFormat.LTRB); } public static implicit operator UiReference(BaseLayoutComponent layout) => layout.Reference; diff --git a/src/Rust.UIFramework/Components/Sub/MaskComponent.cs b/src/Rust.UIFramework/Components/Sub/MaskComponent.cs new file mode 100644 index 00000000..dbbb806e --- /dev/null +++ b/src/Rust.UIFramework/Components/Sub/MaskComponent.cs @@ -0,0 +1,23 @@ +using Oxide.Ext.UiFramework.Enums; +using Oxide.Ext.UiFramework.Json; +using Oxide.Ext.UiFramework.Types; +using Rust.UiFramework.SourceGenerators.Attributes; + +namespace Oxide.Ext.UiFramework.Components; + +[GenerateComponent] +[GenerateBuilderMethods] +public partial class MaskComponent : SubComponent +{ + [TrackedDefaults(typeof(JsonDefaults.Mask), nameof(JsonDefaults.Mask.ShowMaskGraphic))] + public partial bool ShowMaskGraphic { get; set; } + + public override Utf8String Type => JsonDefaults.Mask.Type; + public override ComponentType ComponentType => ComponentType.Mask; + public override bool AllowMultiple => false; + + protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) + { + writer.AddField(JsonDefaults.Mask.ShowMaskGraphicName, ShowMaskGraphicTracked, mode); + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs b/src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs new file mode 100644 index 00000000..27aa0291 --- /dev/null +++ b/src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs @@ -0,0 +1,23 @@ +using Oxide.Ext.UiFramework.Enums; +using Oxide.Ext.UiFramework.Json; +using Oxide.Ext.UiFramework.Types; +using Rust.UiFramework.SourceGenerators.Attributes; + +namespace Oxide.Ext.UiFramework.Components; + +[GenerateComponent] +[GenerateBuilderMethods] +public partial class RectMask2DComponent : SubComponent +{ + [TrackedDefaults(typeof(JsonDefaults.RectMask2D), nameof(JsonDefaults.RectMask2D.Padding))] + public partial UiPadding Padding { get; set; } + + public override Utf8String Type => JsonDefaults.RectMask2D.Type; + public override ComponentType ComponentType => ComponentType.RectMask2D; + public override bool AllowMultiple => false; + + protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) + { + writer.AddField(JsonDefaults.RectMask2D.PaddingName, PaddingTracked, mode, UiPaddingFormat.LBRT); + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Enums/UiPaddingFormat.cs b/src/Rust.UIFramework/Enums/UiPaddingFormat.cs new file mode 100644 index 00000000..e2c596fa --- /dev/null +++ b/src/Rust.UIFramework/Enums/UiPaddingFormat.cs @@ -0,0 +1,7 @@ +namespace Oxide.Ext.UiFramework.Enums; + +public enum UiPaddingFormat : byte +{ + LBRT, + LTRB +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/MaskComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/MaskComponentAnimationExt.g.cs new file mode 100644 index 00000000..273217b2 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/MaskComponentAnimationExt.g.cs @@ -0,0 +1,21 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class MaskComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.UiElements.BaseUiComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaskComponent() => animation.AnimateComponent(static a => a.Component.GetOrAddSubComponent()); + } + + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.Components.BaseComponent, Oxide.Ext.UiFramework.Interfaces.ICoreComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaskComponent() => animation.AnimateComponent(static a => a.GetOrAddSubComponent()); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs new file mode 100644 index 00000000..7571d348 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs @@ -0,0 +1,21 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class RectMask2DComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.UiElements.BaseUiComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateRectMask2DComponent() => animation.AnimateComponent(static a => a.Component.GetOrAddSubComponent()); + } + + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.Components.BaseComponent, Oxide.Ext.UiFramework.Interfaces.ICoreComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateRectMask2DComponent() => animation.AnimateComponent(static a => a.GetOrAddSubComponent()); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/MaskComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/MaskComponentAnimationExt.g.cs new file mode 100644 index 00000000..727f32c0 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/MaskComponentAnimationExt.g.cs @@ -0,0 +1,16 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class MaskComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateShowMaskGraphic() => animation.AnimateField(static a => a.ShowMaskGraphicTracked); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs new file mode 100644 index 00000000..16b280c2 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs @@ -0,0 +1,16 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class RectMask2DComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePadding() => animation.AnimateField(static a => a.PaddingTracked); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/MaskComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/MaskComponent.g.cs new file mode 100644 index 00000000..8f78517a --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/MaskComponent.g.cs @@ -0,0 +1,18 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Components; + +public partial class MaskComponent +{ + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public MaskComponent SetShowMaskGraphic(bool showMaskGraphic) + { + ShowMaskGraphic = showMaskGraphic; + return this; + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs new file mode 100644 index 00000000..f0ac2120 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs @@ -0,0 +1,18 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Components; + +public partial class RectMask2DComponent +{ + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public RectMask2DComponent SetPadding(in Oxide.Ext.UiFramework.Types.UiPadding padding) + { + Padding = padding; + return this; + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/MaskComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/MaskComponent.g.cs new file mode 100644 index 00000000..6a2576b0 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/MaskComponent.g.cs @@ -0,0 +1,36 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// +using Oxide.Ext.UiFramework.Interfaces; + +namespace Oxide.Ext.UiFramework.Components; + +public partial class MaskComponent : IMaskComponent +{ + internal readonly Oxide.Ext.UiFramework.Types.Tracked ShowMaskGraphicTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Mask.ShowMaskGraphic); + + public partial bool ShowMaskGraphic + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => ShowMaskGraphicTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => ShowMaskGraphicTracked.Value = value; + } + + public override bool HasChanged() => false || (ShowMaskGraphicTracked.HasChanged) || base.HasChanged(); + + public override void ResetHasChanged() + { + base.ResetHasChanged(); + ShowMaskGraphicTracked.ResetHasChanged(); + } + + public override void Reset() + { + base.Reset(); + ShowMaskGraphicTracked.Reset(); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs new file mode 100644 index 00000000..c3b510d9 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs @@ -0,0 +1,36 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// +using Oxide.Ext.UiFramework.Interfaces; + +namespace Oxide.Ext.UiFramework.Components; + +public partial class RectMask2DComponent : IRectMask2DComponent +{ + internal readonly Oxide.Ext.UiFramework.Types.Tracked PaddingTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.RectMask2D.Padding); + + public partial Oxide.Ext.UiFramework.Types.UiPadding Padding + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => PaddingTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => PaddingTracked.Value = value; + } + + public override bool HasChanged() => false || (PaddingTracked.HasChanged) || base.HasChanged(); + + public override void ResetHasChanged() + { + base.ResetHasChanged(); + PaddingTracked.ResetHasChanged(); + } + + public override void Reset() + { + base.Reset(); + PaddingTracked.Reset(); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IMaskComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IMaskComponent.g.cs new file mode 100644 index 00000000..ec1053e5 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IMaskComponent.g.cs @@ -0,0 +1,15 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Interfaces; + +public interface IMaskComponent : IBaseTypedComponent +{ + bool ShowMaskGraphic { get; set; } + + Oxide.Ext.UiFramework.Components.MaskComponent SetShowMaskGraphic(bool showMaskGraphic); +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs new file mode 100644 index 00000000..3627be1f --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs @@ -0,0 +1,15 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Interfaces; + +public interface IRectMask2DComponent : IBaseTypedComponent +{ + Oxide.Ext.UiFramework.Types.UiPadding Padding { get; set; } + + Oxide.Ext.UiFramework.Components.RectMask2DComponent SetPadding(in Oxide.Ext.UiFramework.Types.UiPadding padding); +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs index f9f0fcff..d79654dc 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Json.JsonFrameworkGenerator/JsonFrameworkWriter.g.cs @@ -103,12 +103,6 @@ public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, in Oxide.Ext.U WriteValue(value); } - public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, in Oxide.Ext.UiFramework.Types.UiPadding value) - { - WritePropertyName(name); - WriteValue(value); - } - public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, UnityEngine.Vector2 value) { WritePropertyName(name); @@ -283,15 +277,6 @@ public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, in Oxide.Ext.U } } - public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, in Oxide.Ext.UiFramework.Types.UiPadding value, in Oxide.Ext.UiFramework.Types.UiPadding defaultValue) - { - if (value != defaultValue) - { - WritePropertyName(name); - WriteValue(value); - } - } - public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, UnityEngine.Vector2 value, UnityEngine.Vector2 defaultValue) { if (value != defaultValue) @@ -472,15 +457,6 @@ public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFr } } - public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFramework.Types.Tracked value, Oxide.Ext.UiFramework.Enums.SerializeMode mode) - { - if (value.ShouldSerialize(mode)) - { - WritePropertyName(name); - WriteValue(value.Value); - } - } - public void AddField(Oxide.Ext.UiFramework.Types.Utf8String name, Oxide.Ext.UiFramework.Types.Tracked value, Oxide.Ext.UiFramework.Enums.SerializeMode mode) { if (value.ShouldSerialize(mode)) diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index 39160faf..afa1968f 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -436,4 +436,20 @@ public static class CanvasGroup public static readonly Utf8String FadeName = "fade"; public static readonly UiCanvasGroupFade Fade = new(0, 1); } + + public static class RectMask2D + { + public static readonly Utf8String Type = "UnityEngine.UI.RectMask2D"; + + public static readonly Utf8String PaddingName = "padding"; + public static readonly UiPadding Padding = new(0, 0, 0, 0); + } + + public static class Mask + { + public static readonly Utf8String Type = "UnityEngine.UI.Mask"; + + public static readonly Utf8String ShowMaskGraphicName = "showMaskGraphic"; + public const bool ShowMaskGraphic = true; + } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs b/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs index 8a439537..b4e3ea37 100644 --- a/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs +++ b/src/Rust.UIFramework/Json/JsonFrameworkWriter.cs @@ -241,6 +241,15 @@ public void AddCommandField(Utf8String name, Tracked value, SerializeMod WriteCommandValue(value.Value); } } + + public void AddField(Utf8String name, Tracked value, SerializeMode mode, UiPaddingFormat format) + { + if (value.ShouldSerialize(mode)) + { + WritePropertyName(name); + WriteValue(value.Value, format); + } + } #endregion #region Writing @@ -381,7 +390,22 @@ public void WriteValue(UiColor color) _writer.WriteChar(QuoteChar); } - public void WriteValue(in UiPadding padding) + public void WriteValue(in UiPadding padding, UiPaddingFormat format) + { + switch (format) + { + case UiPaddingFormat.LTRB: + WriteValueLTRB(padding); + break; + case UiPaddingFormat.LBRT: + WriteValueLBRT(padding); + break; + default: + throw new ArgumentOutOfRangeException(nameof(format), format, null); + } + } + + private void WriteValueLTRB(in UiPadding padding) { _writer.WriteChar(QuoteChar); _writer.Write(padding.Left); @@ -393,6 +417,19 @@ public void WriteValue(in UiPadding padding) _writer.Write(padding.Bottom); _writer.WriteChar(QuoteChar); } + + private void WriteValueLBRT(in UiPadding padding) + { + _writer.WriteChar(QuoteChar); + _writer.Write(padding.Left); + _writer.WriteChar(Space); + _writer.Write(padding.Bottom); + _writer.WriteChar(Space); + _writer.Write(padding.Right); + _writer.WriteChar(Space); + _writer.Write(padding.Top); + _writer.WriteChar(QuoteChar); + } public void WriteValue(in UiBorderWidth border) { diff --git a/src/Rust.UIFramework/Types/UiPadding.cs b/src/Rust.UIFramework/Types/UiPadding.cs index e2bfe099..52e7c2a2 100644 --- a/src/Rust.UIFramework/Types/UiPadding.cs +++ b/src/Rust.UIFramework/Types/UiPadding.cs @@ -9,11 +9,9 @@ namespace Oxide.Ext.UiFramework.Types; [JsonConverter(typeof(UiPaddingConverter))] -public readonly record struct UiPadding(float Left, float Bottom, float Right, float Top) +public readonly record struct UiPadding(float Left, float Top, float Right, float Bottom) { public static readonly UiPadding None = new(0); - - public bool IsSingleValue => Mathf.Approximately(Left, Bottom) && Mathf.Approximately(Left, Right) && Mathf.Approximately(Left, Top); public UiPadding(float horizontal, float vertical) : this(horizontal, vertical, horizontal, vertical) {} @@ -44,7 +42,10 @@ public static UiPadding Lerp(in UiPadding start, in UiPadding end, float progres Mathf.LerpUnclamped(start.Right, end.Right, progress), Mathf.LerpUnclamped(start.Bottom, end.Bottom, progress)); } - + + public static implicit operator UiOffset(in UiPadding padding) => padding.ToOffset(); + public static implicit operator UiPosition(in UiPadding padding) => padding.ToPosition(); + #pragma warning disable EPS05 public static UiPadding Lerp(UiPadding start, UiPadding end, float progress) => Lerp(in start, in end, progress); #pragma warning restore EPS05 diff --git a/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs b/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs index 32929ff0..69640ff3 100644 --- a/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs +++ b/src/Rust.UiFramework.SourceGenerators/Generators/Json/JsonFrameworkGenerator.cs @@ -84,7 +84,7 @@ public GeneratorData() { SymbolCache cache = SymbolCache.Instance; CommonFieldTypes = [cache.Byte.Symbol, cache.SByte.Symbol, cache.Char.Symbol, cache.Bool.Symbol, cache.Int16.Symbol, cache.UInt16.Symbol, cache.Int32.Symbol, cache.UInt32.Symbol, cache.Int64.Symbol, - cache.UInt64.Symbol, cache.Float.Symbol, cache.String.Symbol, cache.Types.UiColor.Symbol, cache.Types.UiRotation.Symbol, cache.Types.UiPivot.Symbol, cache.Types.UiBorderWidth.Symbol, cache.Types.UiPadding.Symbol, + cache.UInt64.Symbol, cache.Float.Symbol, cache.String.Symbol, cache.Types.UiColor.Symbol, cache.Types.UiRotation.Symbol, cache.Types.UiPivot.Symbol, cache.Types.UiBorderWidth.Symbol, cache.Vector2.Symbol, cache.Vector3.Symbol, cache.Vector4.Symbol, cache.Types.Utf8String.Symbol, cache.Types.UiCanvasGroupFade.Symbol]; AddFieldTypes = CommonFieldTypes; AddDefaultValueTypes = CommonFieldTypes; From 2ac5c1aec5d675521f7776e340074f9f597e3fa8 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Mon, 13 Jul 2026 13:54:36 -0500 Subject: [PATCH 04/21] Implement https://github.com/Facepunch/Rust.Community/pull/82 --- .../Components/Core/ButtonComponent.cs | 3 +++ .../Components/Core/InputComponent.cs | 3 +++ .../Components/Sub/CanvasGroupComponent.cs | 4 ++-- .../ButtonComponentAnimationExt.g.cs | 1 + .../InputComponentAnimationExt.g.cs | 1 + .../UiButtonAnimationExt.g.cs | 1 + .../UiInputAnimationExt.g.cs | 1 + .../ButtonComponent.g.cs | 7 +++++++ .../InputComponent.g.cs | 7 +++++++ .../ButtonComponent.g.cs | 12 +++++++++++- .../CanvasGroupComponent.g.cs | 2 +- .../InputComponent.g.cs | 12 +++++++++++- .../IButtonComponent.g.cs | 2 ++ .../IInputComponent.g.cs | 2 ++ src/Rust.UIFramework/Json/JsonDefaults.cs | 10 ++++------ 15 files changed, 57 insertions(+), 11 deletions(-) diff --git a/src/Rust.UIFramework/Components/Core/ButtonComponent.cs b/src/Rust.UIFramework/Components/Core/ButtonComponent.cs index b71e3e96..97c7494a 100644 --- a/src/Rust.UIFramework/Components/Core/ButtonComponent.cs +++ b/src/Rust.UIFramework/Components/Core/ButtonComponent.cs @@ -22,6 +22,8 @@ public partial class ButtonComponent : CoreComponent, IGraphicalComponent public partial Image.Type ImageType { get; set; } [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] public partial bool AllowRaycast { get; set; } + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.Interactable))] + public partial bool Interactable { get; set; } public ButtonType ButtonType { get; set; } public ColorBlockComponent ColorBlock { get; private set; } public override Utf8String Type => JsonDefaults.Button.Type; @@ -35,6 +37,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.Common.FadeInName, FadeInTracked, mode); writer.AddField(JsonDefaults.Image.ImageTypeName, ImageTypeTracked, mode); writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); + writer.AddField(JsonDefaults.Common.InteractableName, InteractableTracked, mode); switch (ButtonType) { case ButtonType.Command: diff --git a/src/Rust.UIFramework/Components/Core/InputComponent.cs b/src/Rust.UIFramework/Components/Core/InputComponent.cs index 9c147c6d..adbd45e9 100644 --- a/src/Rust.UIFramework/Components/Core/InputComponent.cs +++ b/src/Rust.UIFramework/Components/Core/InputComponent.cs @@ -19,6 +19,8 @@ public partial class InputComponent : TextComponent [TrackedDefaults(typeof(JsonDefaults.Input), nameof(JsonDefaults.Input.LineType))] public partial InputField.LineType LineType { get; set; } public partial UiReference Placeholder { get; set; } + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.Interactable))] + public partial bool Interactable { get; set; } [GenerateBuilderMethod] public bool IsPassword { get => HasMode(InputMode.Password); set => SetMode(InputMode.Password, value); } @@ -39,6 +41,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali base.WriteComponentFields(writer, mode); writer.AddField(JsonDefaults.Input.CharacterLimitName, CharsLimitTracked, mode); writer.AddField(JsonDefaults.Input.LineTypeName, LineTypeTracked, mode); + writer.AddField(JsonDefaults.Common.InteractableName, InteractableTracked, mode); if (mode == SerializeMode.Create) { writer.AddField(JsonDefaults.Input.PasswordName, IsPassword, false); diff --git a/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs b/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs index 55550f65..065f4569 100644 --- a/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs +++ b/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs @@ -15,7 +15,7 @@ public partial class CanvasGroupComponent : SubComponent [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.AllowRaycast))] public partial bool AllowRaycast { get; set; } - [TrackedDefaults(typeof(JsonDefaults.CanvasGroup), nameof(JsonDefaults.CanvasGroup.Interactable))] + [TrackedDefaults(typeof(JsonDefaults.Common), nameof(JsonDefaults.Common.Interactable))] public partial bool Interactable { get; set; } [TrackedDefaults(typeof(JsonDefaults.CanvasGroup), nameof(JsonDefaults.CanvasGroup.Fade))] @@ -29,7 +29,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali { writer.AddField(JsonDefaults.CanvasGroup.AlphaName, AlphaTracked, mode); writer.AddField(JsonDefaults.Common.AllowRaycastName, AllowRaycastTracked, mode); - writer.AddField(JsonDefaults.CanvasGroup.InteractableName, InteractableTracked, mode); + writer.AddField(JsonDefaults.Common.InteractableName, InteractableTracked, mode); writer.AddField(JsonDefaults.CanvasGroup.FadeName, FadeTracked, mode); } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs index 609cb80c..6d255b32 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ButtonComponentAnimationExt.g.cs @@ -16,6 +16,7 @@ public static partial class ButtonComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.ImageTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.AllowRaycastTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateInteractable() => animation.AnimateField(static a => a.InteractableTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/InputComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/InputComponentAnimationExt.g.cs index ee2f2c02..88f65a9c 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/InputComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/InputComponentAnimationExt.g.cs @@ -14,6 +14,7 @@ public static partial class InputComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMode() => animation.AnimateField(static a => a.ModeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateLineType() => animation.AnimateField(static a => a.LineTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholder() => animation.AnimateField(static a => a.PlaceholderTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateInteractable() => animation.AnimateField(static a => a.InteractableTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs index acf3817c..a32796eb 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiButtonAnimationExt.g.cs @@ -17,6 +17,7 @@ public static class UiButtonAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMaterial() => animation.AnimateField(static a => a.Button.MaterialTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateImageType() => animation.AnimateField(static a => a.Button.ImageTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateAllowRaycast() => animation.AnimateField(static a => a.Button.AllowRaycastTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateInteractable() => animation.AnimateField(static a => a.Button.InteractableTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiInputAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiInputAnimationExt.g.cs index a2f573ae..34031e0f 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiInputAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/UiInputAnimationExt.g.cs @@ -15,6 +15,7 @@ public static class UiInputAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateMode() => animation.AnimateField(static a => a.Input.ModeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateLineType() => animation.AnimateField(static a => a.Input.LineTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePlaceholder() => animation.AnimateField(static a => a.Input.PlaceholderTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateInteractable() => animation.AnimateField(static a => a.Input.InteractableTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs index 03e70b4d..634c511e 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ButtonComponent.g.cs @@ -55,6 +55,13 @@ public ButtonComponent SetAllowRaycast(bool allowRaycast) AllowRaycast = allowRaycast; return this; } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ButtonComponent SetInteractable(bool interactable) + { + Interactable = interactable; + return this; + } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/InputComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/InputComponent.g.cs index e0f6afce..79856975 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/InputComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/InputComponent.g.cs @@ -42,6 +42,13 @@ public InputComponent SetPlaceholder(in Oxide.Ext.UiFramework.UiElements.UiRefer return this; } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public InputComponent SetInteractable(bool interactable) + { + Interactable = interactable; + return this; + } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public InputComponent SetIsPassword(bool isPassword) { diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs index 6ecdc0f4..cc8c9529 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ButtonComponent.g.cs @@ -15,6 +15,7 @@ public partial class ButtonComponent : IButtonComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked MaterialTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked ImageTypeTracked = new(); internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); + internal readonly Oxide.Ext.UiFramework.Types.Tracked InteractableTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.Interactable); public partial string Command { @@ -65,8 +66,15 @@ public partial bool AllowRaycast [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => AllowRaycastTracked.Value = value; } + public partial bool Interactable + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => InteractableTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => InteractableTracked.Value = value; + } - public override bool HasChanged() => false || (CommandTracked.HasChanged || ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || AllowRaycastTracked.HasChanged) || ((ColorBlock?.HasChanged() ?? false)) || base.HasChanged(); + public override bool HasChanged() => false || (CommandTracked.HasChanged || ColorTracked.HasChanged || FadeInTracked.HasChanged || SpriteTracked.HasChanged || MaterialTracked.HasChanged || ImageTypeTracked.HasChanged || AllowRaycastTracked.HasChanged || InteractableTracked.HasChanged) || ((ColorBlock?.HasChanged() ?? false)) || base.HasChanged(); public override void ResetHasChanged() { @@ -78,6 +86,7 @@ public override void ResetHasChanged() MaterialTracked.ResetHasChanged(); ImageTypeTracked.ResetHasChanged(); AllowRaycastTracked.ResetHasChanged(); + InteractableTracked.ResetHasChanged(); ColorBlock?.ResetHasChanged(); } @@ -91,6 +100,7 @@ public override void Reset() MaterialTracked.Reset(); ImageTypeTracked.Reset(); AllowRaycastTracked.Reset(); + InteractableTracked.Reset(); ColorBlock?.TryDispose(); ColorBlock = null; } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs index adf9f426..c1edc5d7 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/CanvasGroupComponent.g.cs @@ -10,7 +10,7 @@ public partial class CanvasGroupComponent : ICanvasGroupComponent { internal readonly Oxide.Ext.UiFramework.Types.Tracked AlphaTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.CanvasGroup.Alpha); internal readonly Oxide.Ext.UiFramework.Types.Tracked AllowRaycastTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.AllowRaycast); - internal readonly Oxide.Ext.UiFramework.Types.Tracked InteractableTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.CanvasGroup.Interactable); + internal readonly Oxide.Ext.UiFramework.Types.Tracked InteractableTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.Interactable); internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.CanvasGroup.Fade); public partial float Alpha diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/InputComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/InputComponent.g.cs index 9aa26542..92077c55 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/InputComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/InputComponent.g.cs @@ -13,6 +13,7 @@ public partial class InputComponent : IInputComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked ModeTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Input.Mode); internal readonly Oxide.Ext.UiFramework.Types.Tracked LineTypeTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Input.LineType); internal readonly Oxide.Ext.UiFramework.Types.Tracked PlaceholderTracked = new(); + internal readonly Oxide.Ext.UiFramework.Types.Tracked InteractableTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.Common.Interactable); public partial int CharsLimit { @@ -49,8 +50,15 @@ public partial Oxide.Ext.UiFramework.UiElements.UiReference Placeholder [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => PlaceholderTracked.Value = value; } + public partial bool Interactable + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => InteractableTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => InteractableTracked.Value = value; + } - public override bool HasChanged() => false || (CharsLimitTracked.HasChanged || CommandTracked.HasChanged || ModeTracked.HasChanged || LineTypeTracked.HasChanged || PlaceholderTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (CharsLimitTracked.HasChanged || CommandTracked.HasChanged || ModeTracked.HasChanged || LineTypeTracked.HasChanged || PlaceholderTracked.HasChanged || InteractableTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -60,6 +68,7 @@ public override void ResetHasChanged() ModeTracked.ResetHasChanged(); LineTypeTracked.ResetHasChanged(); PlaceholderTracked.ResetHasChanged(); + InteractableTracked.ResetHasChanged(); } public override void Reset() @@ -70,6 +79,7 @@ public override void Reset() ModeTracked.Reset(); LineTypeTracked.Reset(); PlaceholderTracked.Reset(); + InteractableTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs index f772a36a..6d2797c2 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IButtonComponent.g.cs @@ -14,6 +14,7 @@ public interface IButtonComponent : IBaseTypedComponent string Material { get; set; } UnityEngine.UI.Image.Type ImageType { get; set; } bool AllowRaycast { get; set; } + bool Interactable { get; set; } Oxide.Ext.UiFramework.Components.ButtonComponent SetCommand(string command); Oxide.Ext.UiFramework.Components.ButtonComponent SetColor(Oxide.Ext.UiFramework.Colors.UiColor color); @@ -22,6 +23,7 @@ public interface IButtonComponent : IBaseTypedComponent Oxide.Ext.UiFramework.Components.ButtonComponent SetMaterial(string material); Oxide.Ext.UiFramework.Components.ButtonComponent SetImageType(UnityEngine.UI.Image.Type imageType); Oxide.Ext.UiFramework.Components.ButtonComponent SetAllowRaycast(bool allowRaycast); + Oxide.Ext.UiFramework.Components.ButtonComponent SetInteractable(bool interactable); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IInputComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IInputComponent.g.cs index 1032fa05..13cfa15b 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IInputComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IInputComponent.g.cs @@ -12,12 +12,14 @@ public interface IInputComponent : ITextComponent Oxide.Ext.UiFramework.Enums.InputMode Mode { get; set; } UnityEngine.UI.InputField.LineType LineType { get; set; } Oxide.Ext.UiFramework.UiElements.UiReference Placeholder { get; set; } + bool Interactable { get; set; } Oxide.Ext.UiFramework.Components.InputComponent SetCharsLimit(int charsLimit); Oxide.Ext.UiFramework.Components.InputComponent SetCommand(string command); Oxide.Ext.UiFramework.Components.InputComponent SetMode(Oxide.Ext.UiFramework.Enums.InputMode mode); Oxide.Ext.UiFramework.Components.InputComponent SetLineType(UnityEngine.UI.InputField.LineType lineType); Oxide.Ext.UiFramework.Components.InputComponent SetPlaceholder(in Oxide.Ext.UiFramework.UiElements.UiReference placeholder); + Oxide.Ext.UiFramework.Components.InputComponent SetInteractable(bool interactable); } diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index afa1968f..887c7223 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -39,6 +39,10 @@ public static class Common public static readonly Utf8String AllowRaycastName = "blocksRaycast"; public const bool AllowRaycast = true; + + public static readonly Utf8String InteractableName = "interactable"; + public const bool Interactable = true; + } public static class RectTransform @@ -427,12 +431,6 @@ public static class CanvasGroup public static readonly Utf8String AlphaName = "alpha"; public const float Alpha = 1f; - public static readonly Utf8String BlocksRaycastsName = "blocksRaycasts"; - public const bool BlocksRaycasts = true; - - public static readonly Utf8String InteractableName = "interactable"; - public const bool Interactable = true; - public static readonly Utf8String FadeName = "fade"; public static readonly UiCanvasGroupFade Fade = new(0, 1); } From b6daec117994eb7fc49d8488e98e9b3584587c42 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Mon, 13 Jul 2026 15:27:29 -0500 Subject: [PATCH 05/21] Initial setup of tooltip component still WIP. --- .../Builder/BaseUiBuilder.Components.cs | 4 + .../Builder/BaseUiBuilder.SubComponents.cs | 35 +++++++-- .../Components/ComponentType.cs | 1 + .../Components/Sub/TooltipComponent.cs | 40 ++++++++++ .../TooltipComponentAnimationExt.g.cs | 21 +++++ .../TooltipComponentAnimationExt.g.cs | 20 +++++ .../TooltipComponent.g.cs | 46 +++++++++++ .../TooltipComponent.g.cs | 76 +++++++++++++++++++ .../ITooltipComponent.g.cs | 23 ++++++ src/Rust.UIFramework/Json/JsonDefaults.cs | 20 +++++ 10 files changed, 281 insertions(+), 5 deletions(-) create mode 100644 src/Rust.UIFramework/Components/Sub/TooltipComponent.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/TooltipComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs create mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs index d2d31005..60ec150c 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs @@ -1,10 +1,12 @@ using System; using System.Runtime.CompilerServices; using Oxide.Ext.UiFramework.Colors; +using Oxide.Ext.UiFramework.Components; using Oxide.Ext.UiFramework.Constants; using Oxide.Ext.UiFramework.Controls; using Oxide.Ext.UiFramework.Enums; using Oxide.Ext.UiFramework.Exceptions; +using Oxide.Ext.UiFramework.Interfaces; using Oxide.Ext.UiFramework.Json; using Oxide.Ext.UiFramework.Libraries; using Oxide.Ext.UiFramework.Offsets; @@ -34,6 +36,8 @@ public partial class BaseUiBuilder Naming.SetComponentName(component, reference, NamingMode, NamingCache, Components.Count); return component.SetUpdate(UpdateMode); } + + public T SubComponent(BaseUiComponent component) where T : BaseComponent, ISubComponent, new() => component.GetOrAddSubComponent(); #endregion #region Update diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs index 3de76645..91148bce 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs @@ -3,6 +3,7 @@ using Oxide.Ext.UiFramework.Components; using Oxide.Ext.UiFramework.Enums; using Oxide.Ext.UiFramework.Json; +using Oxide.Ext.UiFramework.Offsets; using Oxide.Ext.UiFramework.Types; using Oxide.Ext.UiFramework.UiElements; using UnityEngine; @@ -262,9 +263,11 @@ public LayoutElementComponent LayoutElement(BaseUiComponent component, #endregion #region Canvas Group + public CanvasGroupComponent CanvasGroup(BaseUiComponent component) => SubComponent(component); + public CanvasGroupComponent CanvasGroup(BaseUiComponent component, float alpha = 1f, bool allowRaycast = true, bool interactable = true, UiCanvasGroupFade? fade = null) { - CanvasGroupComponent canvas = component.GetOrAddSubComponent(); + CanvasGroupComponent canvas = CanvasGroup(component); canvas.Alpha = alpha; canvas.AllowRaycast = allowRaycast; canvas.Interactable = interactable; @@ -277,20 +280,42 @@ public CanvasGroupComponent CanvasGroup(BaseUiComponent component, float alpha = #endregion #region Rect Mask 2D - public RectMask2DComponent RectMask2D(BaseUiComponent component, UiPadding padding = default) + public RectMask2DComponent RectMask2D(BaseUiComponent component) => SubComponent(component); + + public RectMask2DComponent RectMask2D(BaseUiComponent component, UiPadding padding) { - RectMask2DComponent mask = component.GetOrAddSubComponent(); + RectMask2DComponent mask = RectMask2D(component); mask.Padding = padding; return mask; } #endregion #region Rect Mask 2D - public MaskComponent Mask(BaseUiComponent component, bool showMaskGraphic = JsonDefaults.Mask.ShowMaskGraphic) + public MaskComponent Mask(BaseUiComponent component) => SubComponent(component); + + public MaskComponent Mask(BaseUiComponent component, bool showMaskGraphic) { - MaskComponent mask = component.GetOrAddSubComponent(); + MaskComponent mask = Mask(component); mask.ShowMaskGraphic = showMaskGraphic; return mask; } #endregion + + #region Rect Mask 2D + public TooltipComponent Tooltip(BaseUiComponent component) => SubComponent(component); + + public TooltipComponent Tooltip(BaseUiComponent component, string text, Tooltip.DelayType delay = JsonDefaults.ToolTip.Delay, TooltipContainer.PositionMode position = JsonDefaults.ToolTip.Position, UiOffset? offset = null, bool useCenter = JsonDefaults.ToolTip.UseCenter) + { + TooltipComponent tooltip = Tooltip(component); + tooltip.Text = text; + tooltip.Delay = delay; + tooltip.Position = position; + if (offset.HasValue) + { + tooltip.Offset = offset.Value; + } + tooltip.UseCenter = useCenter; + return tooltip; + } + #endregion } \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/ComponentType.cs b/src/Rust.UIFramework/Components/ComponentType.cs index a2be63cb..4957e78c 100644 --- a/src/Rust.UIFramework/Components/ComponentType.cs +++ b/src/Rust.UIFramework/Components/ComponentType.cs @@ -28,6 +28,7 @@ public enum ComponentType : ushort CanvasGroup = 111, RectMask2D = 112, Mask = 113, + ToolTip = 114, ColorBlock = 1000, ScrollBar = 1001, diff --git a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs new file mode 100644 index 00000000..3afb5535 --- /dev/null +++ b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs @@ -0,0 +1,40 @@ +using Oxide.Ext.UiFramework.Enums; +using Oxide.Ext.UiFramework.Json; +using Oxide.Ext.UiFramework.Offsets; +using Oxide.Ext.UiFramework.Types; +using Rust.UiFramework.SourceGenerators.Attributes; + +namespace Oxide.Ext.UiFramework.Components; + +[GenerateComponent] +[GenerateBuilderMethods] +public partial class TooltipComponent : SubComponent +{ + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Text))] + public partial string Text { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Delay))] + public partial Tooltip.DelayType Delay { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Position))] + public partial TooltipContainer.PositionMode Position { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Offset))] + public partial UiOffset Offset { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.UseCenter))] + public partial bool UseCenter { get; set; } + + public override Utf8String Type => JsonDefaults.ToolTip.Type; + public override ComponentType ComponentType => ComponentType.ToolTip; + public override bool AllowMultiple => false; + + protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) + { + writer.AddField(JsonDefaults.ToolTip.TextName, TextTracked, mode); + writer.AddField(JsonDefaults.ToolTip.DelayName, DelayTracked, mode); + writer.AddField(JsonDefaults.ToolTip.PositionName, PositionTracked, mode); + //writer.AddField(JsonDefaults.ToolTip.OffsetName, OffsetTracked, mode); //TODO: Figure out what Offset is + writer.AddField(JsonDefaults.ToolTip.UseCenterName, UseCenterTracked, mode); + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/TooltipComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/TooltipComponentAnimationExt.g.cs new file mode 100644 index 00000000..c9403286 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/TooltipComponentAnimationExt.g.cs @@ -0,0 +1,21 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class TooltipComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.UiElements.BaseUiComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateTooltipComponent() => animation.AnimateComponent(static a => a.Component.GetOrAddSubComponent()); + } + + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.Components.BaseComponent, Oxide.Ext.UiFramework.Interfaces.ICoreComponent + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateTooltipComponent() => animation.AnimateComponent(static a => a.GetOrAddSubComponent()); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs new file mode 100644 index 00000000..e128643f --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs @@ -0,0 +1,20 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Animation; + +public static partial class TooltipComponentAnimationExt +{ + extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) + { + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateText() => animation.AnimateField(static a => a.TextTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateDelay() => animation.AnimateField(static a => a.DelayTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePosition() => animation.AnimateField(static a => a.PositionTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateOffset() => animation.AnimateField(static a => a.OffsetTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateUseCenter() => animation.AnimateField(static a => a.UseCenterTracked); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs new file mode 100644 index 00000000..28c078ff --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs @@ -0,0 +1,46 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Components; + +public partial class TooltipComponent +{ + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TooltipComponent SetText(string text) + { + Text = text; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TooltipComponent SetDelay(Tooltip.DelayType delay) + { + Delay = delay; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TooltipComponent SetPosition(TooltipContainer.PositionMode position) + { + Position = position; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TooltipComponent SetOffset(in Oxide.Ext.UiFramework.Offsets.UiOffset offset) + { + Offset = offset; + return this; + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TooltipComponent SetUseCenter(bool useCenter) + { + UseCenter = useCenter; + return this; + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs new file mode 100644 index 00000000..1cac5a84 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs @@ -0,0 +1,76 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// +using Oxide.Ext.UiFramework.Interfaces; + +namespace Oxide.Ext.UiFramework.Components; + +public partial class TooltipComponent : ITooltipComponent +{ + internal readonly Oxide.Ext.UiFramework.Types.Tracked TextTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.TextName); + internal readonly Oxide.Ext.UiFramework.Types.Tracked DelayTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Delay); + internal readonly Oxide.Ext.UiFramework.Types.Tracked PositionTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Position); + internal readonly Oxide.Ext.UiFramework.Types.Tracked OffsetTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Offset); + internal readonly Oxide.Ext.UiFramework.Types.Tracked UseCenterTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.UseCenter); + + public partial string Text + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => TextTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => TextTracked.Value = value; + } + public partial Tooltip.DelayType Delay + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => DelayTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => DelayTracked.Value = value; + } + public partial TooltipContainer.PositionMode Position + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => PositionTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => PositionTracked.Value = value; + } + public partial Oxide.Ext.UiFramework.Offsets.UiOffset Offset + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => OffsetTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => OffsetTracked.Value = value; + } + public partial bool UseCenter + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => UseCenterTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => UseCenterTracked.Value = value; + } + + public override bool HasChanged() => false || (TextTracked.HasChanged || DelayTracked.HasChanged || PositionTracked.HasChanged || OffsetTracked.HasChanged || UseCenterTracked.HasChanged) || base.HasChanged(); + + public override void ResetHasChanged() + { + base.ResetHasChanged(); + TextTracked.ResetHasChanged(); + DelayTracked.ResetHasChanged(); + PositionTracked.ResetHasChanged(); + OffsetTracked.ResetHasChanged(); + UseCenterTracked.ResetHasChanged(); + } + + public override void Reset() + { + base.Reset(); + TextTracked.Reset(); + DelayTracked.Reset(); + PositionTracked.Reset(); + OffsetTracked.Reset(); + UseCenterTracked.Reset(); + } +} + + diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs new file mode 100644 index 00000000..34841909 --- /dev/null +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs @@ -0,0 +1,23 @@ +// +// This code was generated by a Rust.UiFramework.SourceGenerators. +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// + +namespace Oxide.Ext.UiFramework.Interfaces; + +public interface ITooltipComponent : IBaseTypedComponent +{ + string Text { get; set; } + Tooltip.DelayType Delay { get; set; } + TooltipContainer.PositionMode Position { get; set; } + Oxide.Ext.UiFramework.Offsets.UiOffset Offset { get; set; } + bool UseCenter { get; set; } + + Oxide.Ext.UiFramework.Components.TooltipComponent SetText(string text); + Oxide.Ext.UiFramework.Components.TooltipComponent SetDelay(Tooltip.DelayType delay); + Oxide.Ext.UiFramework.Components.TooltipComponent SetPosition(TooltipContainer.PositionMode position); + Oxide.Ext.UiFramework.Components.TooltipComponent SetOffset(in Oxide.Ext.UiFramework.Offsets.UiOffset offset); + Oxide.Ext.UiFramework.Components.TooltipComponent SetUseCenter(bool useCenter); +} + + diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index 887c7223..1a87ad5a 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -450,4 +450,24 @@ public static class Mask public static readonly Utf8String ShowMaskGraphicName = "showMaskGraphic"; public const bool ShowMaskGraphic = true; } + + public static class ToolTip + { + public static readonly Utf8String Type = "Tooltip"; + + public static readonly Utf8String TextName = "text"; + public const string Text = null; + + public static readonly Utf8String DelayName = "delay"; + public const Tooltip.DelayType Delay = Tooltip.DelayType.Short; + + public static readonly Utf8String PositionName = "position"; + public const TooltipContainer.PositionMode Position = TooltipContainer.PositionMode.Auto; + + public static readonly Utf8String OffsetName = "offset"; + public static readonly UiOffset Offset = UiOffset.None; + + public static readonly Utf8String UseCenterName = "useCentre"; + public const bool UseCenter = true; + } } \ No newline at end of file From d724e564f0ddfee54c96671b733a1014ec484c71 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Mon, 13 Jul 2026 18:03:19 -0500 Subject: [PATCH 06/21] Updated TooltipComponent.Offset to be the correct type --- src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs | 2 +- src/Rust.UIFramework/Components/Sub/TooltipComponent.cs | 5 +++-- .../TooltipComponentAnimationExt.g.cs | 2 +- .../TooltipComponent.g.cs | 2 +- .../TooltipComponent.g.cs | 6 +++--- .../ITooltipComponent.g.cs | 4 ++-- src/Rust.UIFramework/Json/JsonDefaults.cs | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs index 91148bce..bf1b8130 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs @@ -304,7 +304,7 @@ public MaskComponent Mask(BaseUiComponent component, bool showMaskGraphic) #region Rect Mask 2D public TooltipComponent Tooltip(BaseUiComponent component) => SubComponent(component); - public TooltipComponent Tooltip(BaseUiComponent component, string text, Tooltip.DelayType delay = JsonDefaults.ToolTip.Delay, TooltipContainer.PositionMode position = JsonDefaults.ToolTip.Position, UiOffset? offset = null, bool useCenter = JsonDefaults.ToolTip.UseCenter) + public TooltipComponent Tooltip(BaseUiComponent component, string text, Tooltip.DelayType delay = JsonDefaults.ToolTip.Delay, TooltipContainer.PositionMode position = JsonDefaults.ToolTip.Position, Vector2? offset = null, bool useCenter = JsonDefaults.ToolTip.UseCenter) { TooltipComponent tooltip = Tooltip(component); tooltip.Text = text; diff --git a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs index 3afb5535..ea166efc 100644 --- a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs +++ b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs @@ -3,6 +3,7 @@ using Oxide.Ext.UiFramework.Offsets; using Oxide.Ext.UiFramework.Types; using Rust.UiFramework.SourceGenerators.Attributes; +using UnityEngine; namespace Oxide.Ext.UiFramework.Components; @@ -20,7 +21,7 @@ public partial class TooltipComponent : SubComponent public partial TooltipContainer.PositionMode Position { get; set; } [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Offset))] - public partial UiOffset Offset { get; set; } + public partial Vector2 Offset { get; set; } [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.UseCenter))] public partial bool UseCenter { get; set; } @@ -34,7 +35,7 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali writer.AddField(JsonDefaults.ToolTip.TextName, TextTracked, mode); writer.AddField(JsonDefaults.ToolTip.DelayName, DelayTracked, mode); writer.AddField(JsonDefaults.ToolTip.PositionName, PositionTracked, mode); - //writer.AddField(JsonDefaults.ToolTip.OffsetName, OffsetTracked, mode); //TODO: Figure out what Offset is + writer.AddField(JsonDefaults.ToolTip.OffsetName, OffsetTracked, mode); writer.AddField(JsonDefaults.ToolTip.UseCenterName, UseCenterTracked, mode); } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs index e128643f..e2b55096 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs @@ -12,7 +12,7 @@ public static partial class TooltipComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateText() => animation.AnimateField(static a => a.TextTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateDelay() => animation.AnimateField(static a => a.DelayTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePosition() => animation.AnimateField(static a => a.PositionTracked); - public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateOffset() => animation.AnimateField(static a => a.OffsetTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateOffset() => animation.AnimateField(static a => a.OffsetTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateUseCenter() => animation.AnimateField(static a => a.UseCenterTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs index 28c078ff..1a15aae9 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs @@ -29,7 +29,7 @@ public TooltipComponent SetPosition(TooltipContainer.PositionMode position) } [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public TooltipComponent SetOffset(in Oxide.Ext.UiFramework.Offsets.UiOffset offset) + public TooltipComponent SetOffset(UnityEngine.Vector2 offset) { Offset = offset; return this; diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs index 1cac5a84..05be70fe 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs @@ -8,10 +8,10 @@ namespace Oxide.Ext.UiFramework.Components; public partial class TooltipComponent : ITooltipComponent { - internal readonly Oxide.Ext.UiFramework.Types.Tracked TextTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.TextName); + internal readonly Oxide.Ext.UiFramework.Types.Tracked TextTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Text); internal readonly Oxide.Ext.UiFramework.Types.Tracked DelayTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Delay); internal readonly Oxide.Ext.UiFramework.Types.Tracked PositionTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Position); - internal readonly Oxide.Ext.UiFramework.Types.Tracked OffsetTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Offset); + internal readonly Oxide.Ext.UiFramework.Types.Tracked OffsetTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Offset); internal readonly Oxide.Ext.UiFramework.Types.Tracked UseCenterTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.UseCenter); public partial string Text @@ -35,7 +35,7 @@ public partial TooltipContainer.PositionMode Position [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => PositionTracked.Value = value; } - public partial Oxide.Ext.UiFramework.Offsets.UiOffset Offset + public partial UnityEngine.Vector2 Offset { [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] get => OffsetTracked.Value; diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs index 34841909..1894e619 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs @@ -10,13 +10,13 @@ public interface ITooltipComponent : IBaseTypedComponent string Text { get; set; } Tooltip.DelayType Delay { get; set; } TooltipContainer.PositionMode Position { get; set; } - Oxide.Ext.UiFramework.Offsets.UiOffset Offset { get; set; } + UnityEngine.Vector2 Offset { get; set; } bool UseCenter { get; set; } Oxide.Ext.UiFramework.Components.TooltipComponent SetText(string text); Oxide.Ext.UiFramework.Components.TooltipComponent SetDelay(Tooltip.DelayType delay); Oxide.Ext.UiFramework.Components.TooltipComponent SetPosition(TooltipContainer.PositionMode position); - Oxide.Ext.UiFramework.Components.TooltipComponent SetOffset(in Oxide.Ext.UiFramework.Offsets.UiOffset offset); + Oxide.Ext.UiFramework.Components.TooltipComponent SetOffset(UnityEngine.Vector2 offset); Oxide.Ext.UiFramework.Components.TooltipComponent SetUseCenter(bool useCenter); } diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index 1a87ad5a..c3765509 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -465,7 +465,7 @@ public static class ToolTip public const TooltipContainer.PositionMode Position = TooltipContainer.PositionMode.Auto; public static readonly Utf8String OffsetName = "offset"; - public static readonly UiOffset Offset = UiOffset.None; + public static readonly Vector2 Offset = new(8, 8); public static readonly Utf8String UseCenterName = "useCentre"; public const bool UseCenter = true; From 4d6f04457f41bb146067aba3e343739150bbd564 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Tue, 14 Jul 2026 10:42:22 -0500 Subject: [PATCH 07/21] Implement DestroyUis. Still WIP need to know how the sent data is structured --- .../Animation/Handlers/AnimationTracker.cs | 25 +++++++++++++ src/Rust.UIFramework/Builder/BaseBuilder.cs | 33 +++++++++++++++-- .../Builder/SendInfoBuilder.cs | 26 ++------------ .../Components/Sub/TooltipComponent.cs | 1 - .../Extensions/IEnumerableExt.cs | 12 +++++-- src/Rust.UIFramework/Helpers/RpcFunctions.cs | 11 ++++++ ...iDestroyRequest.cs => DestroyUiRequest.cs} | 9 +++-- .../Threading/Sending/DestroyUisRequest.cs | 36 +++++++++++++++++++ 8 files changed, 120 insertions(+), 33 deletions(-) rename src/Rust.UIFramework/Threading/Sending/{UiDestroyRequest.cs => DestroyUiRequest.cs} (56%) create mode 100644 src/Rust.UIFramework/Threading/Sending/DestroyUisRequest.cs diff --git a/src/Rust.UIFramework/Animation/Handlers/AnimationTracker.cs b/src/Rust.UIFramework/Animation/Handlers/AnimationTracker.cs index ec19145d..5aafc3a9 100644 --- a/src/Rust.UIFramework/Animation/Handlers/AnimationTracker.cs +++ b/src/Rust.UIFramework/Animation/Handlers/AnimationTracker.cs @@ -113,6 +113,31 @@ public void OnAnimationFinalized(AnimationId id) UiPool.Internal.FreeList(playerPanels); } } + + public void RemoveUiForSend(SendInfo send, List names) + { + if (send.connections == null) + { + for (int index = 0; index < names.Count; index++) + { + string name = names[index]; + RemoveUiForSend(send.connection.userid, name); + } + + return; + } + + List connections = send.connections; + for (int connectionIndex = 0; connectionIndex < connections.Count; connectionIndex++) + { + Connection connection = connections[connectionIndex]; + for (int index = 0; index < names.Count; index++) + { + string name = names[index]; + RemoveUiForSend(connection.userid, name); + } + } + } public void RemoveUiForSend(SendInfo send, string name) { diff --git a/src/Rust.UIFramework/Builder/BaseBuilder.cs b/src/Rust.UIFramework/Builder/BaseBuilder.cs index 28c539ce..b23b342d 100644 --- a/src/Rust.UIFramework/Builder/BaseBuilder.cs +++ b/src/Rust.UIFramework/Builder/BaseBuilder.cs @@ -136,8 +136,37 @@ public static void DestroyUi(SendInfo send, string name) { if (Net.sv.IsConnected() && CommunityEntity.ServerInstance.net != null) { - Singleton.Instance.RemoveUiForSend(send, name); - UiDestroyRequest.Create(name, send).Enqueue(); + DestroyUiRequest.Create(name, send).Enqueue(); + } + } + + public static void DestroyUis(IEnumerable names) => DestroyUis(Net.sv.connections, names); + public static void DestroyUis(IEnumerable connections, IEnumerable names) => DestroyUis(SendInfoBuilder.Get(connections), names); + public static void DestroyUis(List connections, IEnumerable names) => DestroyUis(SendInfoBuilder.Get(connections), names); + public static void DestroyUis(IEnumerable players, IEnumerable names) => DestroyUis(SendInfoBuilder.Get(players), names); + public static void DestroyUis(List players, IEnumerable names) => DestroyUis(SendInfoBuilder.Get(players), names); + + public static void DestroyUis(BasePlayer player, IEnumerable names) + { + if (player) + { + DestroyUis(player.Connection, names); + } + } + + public static void DestroyUis(Connection connection, IEnumerable names) + { + if (connection is { connected: true }) + { + DestroyUis(SendInfoBuilder.Get(connection), names); + } + } + + public static void DestroyUis(SendInfo send, IEnumerable names) + { + if (Net.sv.IsConnected() && CommunityEntity.ServerInstance.net != null) + { + DestroyUisRequest.Create(names, send).Enqueue(); } } #endregion diff --git a/src/Rust.UIFramework/Builder/SendInfoBuilder.cs b/src/Rust.UIFramework/Builder/SendInfoBuilder.cs index 7b3a49b0..d90eb461 100644 --- a/src/Rust.UIFramework/Builder/SendInfoBuilder.cs +++ b/src/Rust.UIFramework/Builder/SendInfoBuilder.cs @@ -2,6 +2,7 @@ using System.Runtime.CompilerServices; using Network; using Oxide.Ext.UiFramework.Animation; +using Oxide.Ext.UiFramework.Extensions; using Oxide.Ext.UiFramework.Guards; using Oxide.Ext.UiFramework.Libraries; using Oxide.Ext.UiFramework.Types; @@ -45,30 +46,7 @@ internal static SendInfo Get(Connection connection, sbyte channel) internal static SendInfo Get(IEnumerable connections) { Guard.IsNotNull(connections); - List pooledConnection = UiPool.Internal.GetList(); - if (connections is IList list) - { - //Fast Path - for (int index = 0; index < list.Count; index++) - { - Connection connection = list[index]; - if(connection is { connected: true }) - { - pooledConnection.Add(connection); - } - } - } - else - { - foreach (Connection connection in connections) - { - if (connection is { connected: true }) - { - pooledConnection.Add(connection); - } - } - } - + List pooledConnection = connections.ToListPooled(UiPool.Internal); return new SendInfo(pooledConnection) { channel = UiChannel diff --git a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs index ea166efc..9cb6b0f1 100644 --- a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs +++ b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs @@ -1,6 +1,5 @@ using Oxide.Ext.UiFramework.Enums; using Oxide.Ext.UiFramework.Json; -using Oxide.Ext.UiFramework.Offsets; using Oxide.Ext.UiFramework.Types; using Rust.UiFramework.SourceGenerators.Attributes; using UnityEngine; diff --git a/src/Rust.UIFramework/Extensions/IEnumerableExt.cs b/src/Rust.UIFramework/Extensions/IEnumerableExt.cs index 597f7555..a1b7f2fe 100644 --- a/src/Rust.UIFramework/Extensions/IEnumerableExt.cs +++ b/src/Rust.UIFramework/Extensions/IEnumerableExt.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Oxide.Ext.UiFramework.Libraries; using Oxide.Ext.UiFramework.Plugins; namespace Oxide.Ext.UiFramework.Extensions; @@ -7,10 +8,15 @@ public static class IEnumerableExt { extension(IEnumerable enumerable) { - public List ToListPooled(IUiFrameworkPlugin plugin) + public List ToListPooled(IUiFrameworkPlugin plugin) => enumerable.ToListPooled(plugin.PluginPool); + + internal List ToListPooled(UiPluginPool pluginPool) { - List list = plugin.PluginPool.GetList(); - list.AddRange(enumerable); + List list = pluginPool.GetList(); + if (enumerable is not null) + { + list.AddRange(enumerable); + } return list; } } diff --git a/src/Rust.UIFramework/Helpers/RpcFunctions.cs b/src/Rust.UIFramework/Helpers/RpcFunctions.cs index 4e5303db..603deefa 100644 --- a/src/Rust.UIFramework/Helpers/RpcFunctions.cs +++ b/src/Rust.UIFramework/Helpers/RpcFunctions.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Network; using Oxide.Ext.UiFramework.Extensions; using Oxide.Ext.UiFramework.Json; @@ -54,6 +55,16 @@ public static void SendDestroyUi(SendInfo send, string name) write.Send(send); } } + + public static void SendDestroyUis(SendInfo send, List names) + { + NetWrite write = ClientRPCStart(DestroyUi); + if (write != null) + { + //write.String(name); //TODO: Implement once available + write.Send(send); + } + } public static void SendFilePng(SendInfo send, uint textureId, byte[] bytes) { diff --git a/src/Rust.UIFramework/Threading/Sending/UiDestroyRequest.cs b/src/Rust.UIFramework/Threading/Sending/DestroyUiRequest.cs similarity index 56% rename from src/Rust.UIFramework/Threading/Sending/UiDestroyRequest.cs rename to src/Rust.UIFramework/Threading/Sending/DestroyUiRequest.cs index 4e0f36c3..15f03392 100644 --- a/src/Rust.UIFramework/Threading/Sending/UiDestroyRequest.cs +++ b/src/Rust.UIFramework/Threading/Sending/DestroyUiRequest.cs @@ -1,16 +1,18 @@ using Network; +using Oxide.Ext.UiFramework.Animation; using Oxide.Ext.UiFramework.Helpers; using Oxide.Ext.UiFramework.Libraries; +using Oxide.Ext.UiFramework.Types; namespace Oxide.Ext.UiFramework.Threading; -internal class UiDestroyRequest : BaseUiRequest +internal class DestroyUiRequest : BaseUiRequest { public string Name; - public static UiDestroyRequest Create(string name, SendInfo send) => UiPool.Internal.Get().Init(name, send); + public static DestroyUiRequest Create(string name, SendInfo send) => UiPool.Internal.Get().Init(name, send); - private UiDestroyRequest Init(string name, SendInfo send) + private DestroyUiRequest Init(string name, SendInfo send) { base.Init(send); Name = name; @@ -20,6 +22,7 @@ private UiDestroyRequest Init(string name, SendInfo send) public override ProcessResult Process() { RpcFunctions.SendDestroyUi(Send, Name); + Singleton.Instance.RemoveUiForSend(Send, Name); return ProcessResult.Success; } diff --git a/src/Rust.UIFramework/Threading/Sending/DestroyUisRequest.cs b/src/Rust.UIFramework/Threading/Sending/DestroyUisRequest.cs new file mode 100644 index 00000000..12bca2f7 --- /dev/null +++ b/src/Rust.UIFramework/Threading/Sending/DestroyUisRequest.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using Network; +using Oxide.Ext.UiFramework.Animation; +using Oxide.Ext.UiFramework.Extensions; +using Oxide.Ext.UiFramework.Helpers; +using Oxide.Ext.UiFramework.Libraries; +using Oxide.Ext.UiFramework.Types; + +namespace Oxide.Ext.UiFramework.Threading; + +internal class DestroyUisRequest : BaseUiRequest +{ + public List Names; + + public static DestroyUisRequest Create(IEnumerable names, SendInfo send) => UiPool.Internal.Get().Init(names, send); + + private DestroyUisRequest Init(IEnumerable names, SendInfo send) + { + base.Init(send); + Names = names.ToListPooled(PluginPool); + return this; + } + + public override ProcessResult Process() + { + RpcFunctions.SendDestroyUis(Send, Names); + Singleton.Instance.RemoveUiForSend(Send, Names); + return ProcessResult.Success; + } + + protected override void EnterPool() + { + base.EnterPool(); + PluginPool.FreeList(Names); + } +} \ No newline at end of file From 6616a73b3b799ca219f9fd6dec1c4926fb80f576 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Tue, 14 Jul 2026 16:24:10 -0500 Subject: [PATCH 08/21] Updated Tooltip Component with CUI Changes --- src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs | 3 ++- src/Rust.UIFramework/Components/Sub/TooltipComponent.cs | 4 ++++ src/Rust.UIFramework/Json/JsonDefaults.cs | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs index bf1b8130..50e0e818 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs @@ -304,10 +304,11 @@ public MaskComponent Mask(BaseUiComponent component, bool showMaskGraphic) #region Rect Mask 2D public TooltipComponent Tooltip(BaseUiComponent component) => SubComponent(component); - public TooltipComponent Tooltip(BaseUiComponent component, string text, Tooltip.DelayType delay = JsonDefaults.ToolTip.Delay, TooltipContainer.PositionMode position = JsonDefaults.ToolTip.Position, Vector2? offset = null, bool useCenter = JsonDefaults.ToolTip.UseCenter) + public TooltipComponent Tooltip(BaseUiComponent component, string text, CommunityEntity.TooltipType type = CommunityEntity.TooltipType.Default, Tooltip.DelayType delay = JsonDefaults.ToolTip.Delay, TooltipContainer.PositionMode position = JsonDefaults.ToolTip.Position, Vector2? offset = null, bool useCenter = JsonDefaults.ToolTip.UseCenter) { TooltipComponent tooltip = Tooltip(component); tooltip.Text = text; + tooltip.TooltipType = type; tooltip.Delay = delay; tooltip.Position = position; if (offset.HasValue) diff --git a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs index 9cb6b0f1..36cb46ca 100644 --- a/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs +++ b/src/Rust.UIFramework/Components/Sub/TooltipComponent.cs @@ -13,6 +13,9 @@ public partial class TooltipComponent : SubComponent [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Text))] public partial string Text { get; set; } + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.TooltipType))] + public partial CommunityEntity.TooltipType TooltipType { get; set; } + [TrackedDefaults(typeof(JsonDefaults.ToolTip), nameof(JsonDefaults.ToolTip.Delay))] public partial Tooltip.DelayType Delay { get; set; } @@ -32,6 +35,7 @@ public partial class TooltipComponent : SubComponent protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) { writer.AddField(JsonDefaults.ToolTip.TextName, TextTracked, mode); + writer.AddField(JsonDefaults.ToolTip.TooltipTypeName, TooltipTypeTracked, mode); writer.AddField(JsonDefaults.ToolTip.DelayName, DelayTracked, mode); writer.AddField(JsonDefaults.ToolTip.PositionName, PositionTracked, mode); writer.AddField(JsonDefaults.ToolTip.OffsetName, OffsetTracked, mode); diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index c3765509..f57e706e 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -458,6 +458,9 @@ public static class ToolTip public static readonly Utf8String TextName = "text"; public const string Text = null; + public static readonly Utf8String TooltipTypeName = "tooltipType"; + public const CommunityEntity.TooltipType TooltipType = CommunityEntity.TooltipType.Default; + public static readonly Utf8String DelayName = "delay"; public const Tooltip.DelayType Delay = Tooltip.DelayType.Short; From b966f359a0a4b2fe5d0ea3c43ea8b333703b44f0 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Tue, 14 Jul 2026 16:28:05 -0500 Subject: [PATCH 09/21] Added FadeDuration to ScrollbarComponent --- .../Builder/BaseUiBuilder.ChildComponents.cs | 12 ++++++------ .../Components/Child/ScrollbarComponent.cs | 4 ++++ .../Components/Core/ScrollViewComponent.cs | 17 +++++++++-------- src/Rust.UIFramework/Json/JsonDefaults.cs | 3 +++ src/Rust.UIFramework/UiElements/UiScrollView.cs | 12 ++++++------ 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs index 51d1a412..0f722ad8 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs @@ -16,21 +16,21 @@ public ColorBlockComponent ColorBlock(UiButton button, in UiColor? highlightColo #region ScrollBar public (ScrollbarComponent horizontal, ScrollbarComponent vertical) AddScrollBars(UiScrollView view, bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - return view.AddScrollBars(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + return view.AddScrollBars(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); } public ScrollbarComponent AddHorizontalScrollBar(UiScrollView view, bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - return view.AddHorizontalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + return view.AddHorizontalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); } public ScrollbarComponent AddVerticalScrollBar(UiScrollView view, bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - return view.AddVerticalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + return view.AddVerticalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); } #endregion } \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/Child/ScrollbarComponent.cs b/src/Rust.UIFramework/Components/Child/ScrollbarComponent.cs index 5fdd2c67..f7dba8f9 100644 --- a/src/Rust.UIFramework/Components/Child/ScrollbarComponent.cs +++ b/src/Rust.UIFramework/Components/Child/ScrollbarComponent.cs @@ -32,6 +32,9 @@ public partial class ScrollbarComponent : ChildComponent [TrackedDefaults(typeof(JsonDefaults.ScrollBar), nameof(JsonDefaults.ScrollBar.TrackColor))] public partial UiColor TrackColor { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.ScrollBar), nameof(JsonDefaults.ScrollBar.FadeDuration))] + public partial float FadeDuration { get; set; } public override ComponentType ComponentType => ComponentType.ScrollBar; @@ -47,6 +50,7 @@ public override void WriteComponent(JsonFrameworkWriter writer, SerializeMode mo writer.AddField(JsonDefaults.ScrollBar.HighlightColorName, HighlightColorTracked, mode); writer.AddField(JsonDefaults.ScrollBar.PressedColorName, PressedColorTracked, mode); writer.AddField(JsonDefaults.ScrollBar.TrackColorName, TrackColorTracked, mode); + writer.AddField(JsonDefaults.ScrollBar.FadeDurationName, FadeDurationTracked, mode); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Components/Core/ScrollViewComponent.cs b/src/Rust.UIFramework/Components/Core/ScrollViewComponent.cs index 0690886b..3979e009 100644 --- a/src/Rust.UIFramework/Components/Core/ScrollViewComponent.cs +++ b/src/Rust.UIFramework/Components/Core/ScrollViewComponent.cs @@ -62,26 +62,26 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali internal void UpdateContentTransform(in UiPosition? position, in UiOffset? offset, in Vector2? pivot) => GetOrCreateContentTransform().UpdateContentTransform(position, offset, pivot); internal (ScrollbarComponent horizontal, ScrollbarComponent vertical) AddScrollBars(bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - ScrollbarComponent horizontal = AddHorizontalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); - ScrollbarComponent vertical = AddVerticalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + ScrollbarComponent horizontal = AddHorizontalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); + ScrollbarComponent vertical = AddVerticalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); return (horizontal, vertical); } internal ScrollbarComponent AddHorizontalScrollBar(bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { ScrollbarComponent bar = GetOrCreateHorizontalScrollbar(); - PopulateScrollBar(bar, invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + PopulateScrollBar(bar, invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); return bar; } internal ScrollbarComponent AddVerticalScrollBar(bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { ScrollbarComponent bar = GetOrCreateVerticalScrollbar(); - PopulateScrollBar(bar, invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + PopulateScrollBar(bar, invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); return bar; } @@ -89,13 +89,14 @@ internal ScrollbarComponent AddVerticalScrollBar(bool invert = false, bool autoH internal ScrollbarComponent GetOrCreateVerticalScrollbar() => VerticalScrollbar ??= PluginPool.Get(); private static void PopulateScrollBar(ScrollbarComponent bar, bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { bar.Invert = invert; bar.AutoHide = autoHide; bar.HandleSprite = handleSprite; bar.TrackSprite = trackSprite; bar.Size = size; + bar.FadeDuration = fadeDuration; if (handleColor.HasValue) { bar.HandleColor = handleColor.Value; diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index f57e706e..5f726495 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -255,6 +255,9 @@ public static class ScrollBar public static readonly UiColor HighlightColor = UiColor.ParseHexColor("#2B2B2B"); public static readonly UiColor PressedColor = UiColor.ParseHexColor("#333333"); public static readonly UiColor TrackColor = UiColor.ParseHexColor("#171717"); + + public static readonly Utf8String FadeDurationName = "fadeDuration"; + public const float FadeDuration = 0.1f; } public static class ColorBlock diff --git a/src/Rust.UIFramework/UiElements/UiScrollView.cs b/src/Rust.UIFramework/UiElements/UiScrollView.cs index 350c7c64..c92926e4 100644 --- a/src/Rust.UIFramework/UiElements/UiScrollView.cs +++ b/src/Rust.UIFramework/UiElements/UiScrollView.cs @@ -61,21 +61,21 @@ public UiScrollView Init(ScrollRect.MovementType movementType, float elasticity, public void UpdateContentTransform(in UiPosition? position = null, in UiOffset? offset = null, in Vector2? pivot = null) => ScrollView.UpdateContentTransform(position, offset, pivot); public (ScrollbarComponent horizontal, ScrollbarComponent vertical) AddScrollBars(bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - return ScrollView.AddScrollBars(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + return ScrollView.AddScrollBars(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); } public ScrollbarComponent AddHorizontalScrollBar(bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - return ScrollView.AddHorizontalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + return ScrollView.AddHorizontalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); } public ScrollbarComponent AddVerticalScrollBar(bool invert = false, bool autoHide = false, string handleSprite = null, string trackSprite = null, float size = JsonDefaults.ScrollBar.Size, - UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null) + UiColor? handleColor = null, UiColor? highlightColor = null, UiColor? pressedColor = null, UiColor? trackColor = null, float fadeDuration = JsonDefaults.ScrollBar.FadeDuration) { - return ScrollView.AddVerticalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor); + return ScrollView.AddVerticalScrollBar(invert, autoHide, handleSprite, trackSprite, size, handleColor, highlightColor, pressedColor, trackColor, fadeDuration); } public UiScrollView SetHorizontalScrollbar() From 6d048173c58dbd59fda83825075bd16bc7c21d57 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Tue, 14 Jul 2026 16:35:21 -0500 Subject: [PATCH 10/21] Updated DestroyUis to use proper RPC call --- src/Rust.UIFramework/Helpers/RpcFunctions.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Rust.UIFramework/Helpers/RpcFunctions.cs b/src/Rust.UIFramework/Helpers/RpcFunctions.cs index 603deefa..8d7e9792 100644 --- a/src/Rust.UIFramework/Helpers/RpcFunctions.cs +++ b/src/Rust.UIFramework/Helpers/RpcFunctions.cs @@ -1,8 +1,9 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; +using Facepunch; using Network; using Oxide.Ext.UiFramework.Extensions; using Oxide.Ext.UiFramework.Json; +using ProtoBuf; namespace Oxide.Ext.UiFramework.Helpers; @@ -10,10 +11,12 @@ public static class RpcFunctions { private const string AddUiFunc = "AddUI"; private const string DestroyUiFunc = "DestroyUI"; + private const string DestroyUisFunc = "DestroyUIs"; private const string ReceiveFilePngFunc = "CL_ReceiveFilePng"; public static readonly uint AddUi = StringPool.Get(AddUiFunc); public static readonly uint DestroyUi = StringPool.Get(DestroyUiFunc); + public static readonly uint DestroyUis = StringPool.Get(DestroyUisFunc); public static readonly uint ReceiveFilePng = StringPool.Get(ReceiveFilePngFunc); public static void SendAddUi(SendInfo send, JsonFrameworkWriter writer) @@ -58,10 +61,13 @@ public static void SendDestroyUi(SendInfo send, string name) public static void SendDestroyUis(SendInfo send, List names) { - NetWrite write = ClientRPCStart(DestroyUi); + NetWrite write = ClientRPCStart(DestroyUis); if (write != null) { - //write.String(name); //TODO: Implement once available + using CommunityEntity_DestroyUIs destroyUi = Pool.Get(); + destroyUi.list = Pool.Get>(); + destroyUi.list.AddRange(names); + write.Proto(destroyUi); write.Send(send); } } From dc72cc18ea9b21c62c4dd323d0d6f3f56cc486c1 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Wed, 15 Jul 2026 10:04:31 -0500 Subject: [PATCH 11/21] Remove RectMask2D as that wasn't merged in. --- .../Builder/BaseUiBuilder.SubComponents.cs | 11 ------ .../Components/Sub/RectMask2DComponent.cs | 23 ------------ .../RectMask2DComponentAnimationExt.g.cs | 21 ----------- .../RectMask2DComponentAnimationExt.g.cs | 16 --------- .../RectMask2DComponent.g.cs | 18 ---------- .../RectMask2DComponent.g.cs | 36 ------------------- .../IRectMask2DComponent.g.cs | 15 -------- src/Rust.UIFramework/Json/JsonDefaults.cs | 8 ----- 8 files changed, 148 deletions(-) delete mode 100644 src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs delete mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs delete mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs delete mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs delete mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs delete mode 100644 src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs index 50e0e818..17b619b0 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.SubComponents.cs @@ -279,17 +279,6 @@ public CanvasGroupComponent CanvasGroup(BaseUiComponent component, float alpha = } #endregion - #region Rect Mask 2D - public RectMask2DComponent RectMask2D(BaseUiComponent component) => SubComponent(component); - - public RectMask2DComponent RectMask2D(BaseUiComponent component, UiPadding padding) - { - RectMask2DComponent mask = RectMask2D(component); - mask.Padding = padding; - return mask; - } - #endregion - #region Rect Mask 2D public MaskComponent Mask(BaseUiComponent component) => SubComponent(component); diff --git a/src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs b/src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs deleted file mode 100644 index 27aa0291..00000000 --- a/src/Rust.UIFramework/Components/Sub/RectMask2DComponent.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Oxide.Ext.UiFramework.Enums; -using Oxide.Ext.UiFramework.Json; -using Oxide.Ext.UiFramework.Types; -using Rust.UiFramework.SourceGenerators.Attributes; - -namespace Oxide.Ext.UiFramework.Components; - -[GenerateComponent] -[GenerateBuilderMethods] -public partial class RectMask2DComponent : SubComponent -{ - [TrackedDefaults(typeof(JsonDefaults.RectMask2D), nameof(JsonDefaults.RectMask2D.Padding))] - public partial UiPadding Padding { get; set; } - - public override Utf8String Type => JsonDefaults.RectMask2D.Type; - public override ComponentType ComponentType => ComponentType.RectMask2D; - public override bool AllowMultiple => false; - - protected override void WriteComponentFields(JsonFrameworkWriter writer, SerializeMode mode) - { - writer.AddField(JsonDefaults.RectMask2D.PaddingName, PaddingTracked, mode, UiPaddingFormat.LBRT); - } -} \ No newline at end of file diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs deleted file mode 100644 index 7571d348..00000000 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.ComponentAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -// This code was generated by a Rust.UiFramework.SourceGenerators. -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// - -namespace Oxide.Ext.UiFramework.Animation; - -public static partial class RectMask2DComponentAnimationExt -{ - extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.UiElements.BaseUiComponent - { - public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateRectMask2DComponent() => animation.AnimateComponent(static a => a.Component.GetOrAddSubComponent()); - } - - extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) where T : Oxide.Ext.UiFramework.Components.BaseComponent, Oxide.Ext.UiFramework.Interfaces.ICoreComponent - { - public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateRectMask2DComponent() => animation.AnimateComponent(static a => a.GetOrAddSubComponent()); - } -} - - diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs deleted file mode 100644 index 16b280c2..00000000 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/RectMask2DComponentAnimationExt.g.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -// This code was generated by a Rust.UiFramework.SourceGenerators. -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// - -namespace Oxide.Ext.UiFramework.Animation; - -public static partial class RectMask2DComponentAnimationExt -{ - extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) - { - public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePadding() => animation.AnimateField(static a => a.PaddingTracked); - } -} - - diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs deleted file mode 100644 index f0ac2120..00000000 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/RectMask2DComponent.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -// -// This code was generated by a Rust.UiFramework.SourceGenerators. -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// - -namespace Oxide.Ext.UiFramework.Components; - -public partial class RectMask2DComponent -{ - [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public RectMask2DComponent SetPadding(in Oxide.Ext.UiFramework.Types.UiPadding padding) - { - Padding = padding; - return this; - } -} - - diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs deleted file mode 100644 index c3b510d9..00000000 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/RectMask2DComponent.g.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// This code was generated by a Rust.UiFramework.SourceGenerators. -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// -using Oxide.Ext.UiFramework.Interfaces; - -namespace Oxide.Ext.UiFramework.Components; - -public partial class RectMask2DComponent : IRectMask2DComponent -{ - internal readonly Oxide.Ext.UiFramework.Types.Tracked PaddingTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.RectMask2D.Padding); - - public partial Oxide.Ext.UiFramework.Types.UiPadding Padding - { - [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - get => PaddingTracked.Value; - [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - set => PaddingTracked.Value = value; - } - - public override bool HasChanged() => false || (PaddingTracked.HasChanged) || base.HasChanged(); - - public override void ResetHasChanged() - { - base.ResetHasChanged(); - PaddingTracked.ResetHasChanged(); - } - - public override void Reset() - { - base.Reset(); - PaddingTracked.Reset(); - } -} - - diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs deleted file mode 100644 index 3627be1f..00000000 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IRectMask2DComponent.g.cs +++ /dev/null @@ -1,15 +0,0 @@ -// -// This code was generated by a Rust.UiFramework.SourceGenerators. -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// - -namespace Oxide.Ext.UiFramework.Interfaces; - -public interface IRectMask2DComponent : IBaseTypedComponent -{ - Oxide.Ext.UiFramework.Types.UiPadding Padding { get; set; } - - Oxide.Ext.UiFramework.Components.RectMask2DComponent SetPadding(in Oxide.Ext.UiFramework.Types.UiPadding padding); -} - - diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index 5f726495..cabd1318 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -438,14 +438,6 @@ public static class CanvasGroup public static readonly UiCanvasGroupFade Fade = new(0, 1); } - public static class RectMask2D - { - public static readonly Utf8String Type = "UnityEngine.UI.RectMask2D"; - - public static readonly Utf8String PaddingName = "padding"; - public static readonly UiPadding Padding = new(0, 0, 0, 0); - } - public static class Mask { public static readonly Utf8String Type = "UnityEngine.UI.Mask"; From a92d09c219a60a9bd301e6ab9cd2c5cbbb997177 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Wed, 15 Jul 2026 10:04:47 -0500 Subject: [PATCH 12/21] SourceGen build --- .../ScrollbarComponentAnimationExt.g.cs | 1 + .../TooltipComponentAnimationExt.g.cs | 1 + .../ScrollbarComponent.g.cs | 7 +++++++ .../TooltipComponent.g.cs | 7 +++++++ .../ScrollbarComponent.g.cs | 12 +++++++++++- .../TooltipComponent.g.cs | 12 +++++++++++- .../IScrollbarComponent.g.cs | 2 ++ .../ITooltipComponent.g.cs | 2 ++ 8 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ScrollbarComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ScrollbarComponentAnimationExt.g.cs index 72464e78..1ede0b19 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ScrollbarComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ScrollbarComponentAnimationExt.g.cs @@ -18,6 +18,7 @@ public static partial class ScrollbarComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateHighlightColor() => animation.AnimateField(static a => a.HighlightColorTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePressedColor() => animation.AnimateField(static a => a.PressedColorTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateTrackColor() => animation.AnimateField(static a => a.TrackColorTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFadeDuration() => animation.AnimateField(static a => a.FadeDurationTracked); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs index e2b55096..b050ed0b 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/TooltipComponentAnimationExt.g.cs @@ -10,6 +10,7 @@ public static partial class TooltipComponentAnimationExt extension(Oxide.Ext.UiFramework.Animation.AnimationRef> animation) { public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateText() => animation.AnimateField(static a => a.TextTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateTooltipType() => animation.AnimateField(static a => a.TooltipTypeTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateDelay() => animation.AnimateField(static a => a.DelayTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePosition() => animation.AnimateField(static a => a.PositionTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateOffset() => animation.AnimateField(static a => a.OffsetTracked); diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ScrollbarComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ScrollbarComponent.g.cs index 6813c7b3..91f8a00a 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ScrollbarComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ScrollbarComponent.g.cs @@ -69,6 +69,13 @@ public ScrollbarComponent SetTrackColor(Oxide.Ext.UiFramework.Colors.UiColor tra TrackColor = trackColor; return this; } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ScrollbarComponent SetFadeDuration(float fadeDuration) + { + FadeDuration = fadeDuration; + return this; + } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs index 1a15aae9..8dd1c83b 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/TooltipComponent.g.cs @@ -14,6 +14,13 @@ public TooltipComponent SetText(string text) return this; } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public TooltipComponent SetTooltipType(CommunityEntity.TooltipType tooltipType) + { + TooltipType = tooltipType; + return this; + } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public TooltipComponent SetDelay(Tooltip.DelayType delay) { diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ScrollbarComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ScrollbarComponent.g.cs index 31243990..add9f72e 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ScrollbarComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ScrollbarComponent.g.cs @@ -17,6 +17,7 @@ public partial class ScrollbarComponent : IScrollbarComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked HighlightColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ScrollBar.HighlightColor); internal readonly Oxide.Ext.UiFramework.Types.Tracked PressedColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ScrollBar.PressedColor); internal readonly Oxide.Ext.UiFramework.Types.Tracked TrackColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ScrollBar.TrackColor); + internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeDurationTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ScrollBar.FadeDuration); public partial bool Invert { @@ -81,8 +82,15 @@ public partial Oxide.Ext.UiFramework.Colors.UiColor TrackColor [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => TrackColorTracked.Value = value; } + public partial float FadeDuration + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => FadeDurationTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => FadeDurationTracked.Value = value; + } - public override bool HasChanged() => false || (InvertTracked.HasChanged || AutoHideTracked.HasChanged || HandleSpriteTracked.HasChanged || TrackSpriteTracked.HasChanged || SizeTracked.HasChanged || HandleColorTracked.HasChanged || HighlightColorTracked.HasChanged || PressedColorTracked.HasChanged || TrackColorTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (InvertTracked.HasChanged || AutoHideTracked.HasChanged || HandleSpriteTracked.HasChanged || TrackSpriteTracked.HasChanged || SizeTracked.HasChanged || HandleColorTracked.HasChanged || HighlightColorTracked.HasChanged || PressedColorTracked.HasChanged || TrackColorTracked.HasChanged || FadeDurationTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -96,6 +104,7 @@ public override void ResetHasChanged() HighlightColorTracked.ResetHasChanged(); PressedColorTracked.ResetHasChanged(); TrackColorTracked.ResetHasChanged(); + FadeDurationTracked.ResetHasChanged(); } public override void Reset() @@ -110,6 +119,7 @@ public override void Reset() HighlightColorTracked.Reset(); PressedColorTracked.Reset(); TrackColorTracked.Reset(); + FadeDurationTracked.Reset(); } } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs index 05be70fe..8aab1216 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/TooltipComponent.g.cs @@ -9,6 +9,7 @@ namespace Oxide.Ext.UiFramework.Components; public partial class TooltipComponent : ITooltipComponent { internal readonly Oxide.Ext.UiFramework.Types.Tracked TextTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Text); + internal readonly Oxide.Ext.UiFramework.Types.Tracked TooltipTypeTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.TooltipType); internal readonly Oxide.Ext.UiFramework.Types.Tracked DelayTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Delay); internal readonly Oxide.Ext.UiFramework.Types.Tracked PositionTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Position); internal readonly Oxide.Ext.UiFramework.Types.Tracked OffsetTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ToolTip.Offset); @@ -21,6 +22,13 @@ public partial string Text [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => TextTracked.Value = value; } + public partial CommunityEntity.TooltipType TooltipType + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => TooltipTypeTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => TooltipTypeTracked.Value = value; + } public partial Tooltip.DelayType Delay { [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] @@ -50,12 +58,13 @@ public partial bool UseCenter set => UseCenterTracked.Value = value; } - public override bool HasChanged() => false || (TextTracked.HasChanged || DelayTracked.HasChanged || PositionTracked.HasChanged || OffsetTracked.HasChanged || UseCenterTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (TextTracked.HasChanged || TooltipTypeTracked.HasChanged || DelayTracked.HasChanged || PositionTracked.HasChanged || OffsetTracked.HasChanged || UseCenterTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { base.ResetHasChanged(); TextTracked.ResetHasChanged(); + TooltipTypeTracked.ResetHasChanged(); DelayTracked.ResetHasChanged(); PositionTracked.ResetHasChanged(); OffsetTracked.ResetHasChanged(); @@ -66,6 +75,7 @@ public override void Reset() { base.Reset(); TextTracked.Reset(); + TooltipTypeTracked.Reset(); DelayTracked.Reset(); PositionTracked.Reset(); OffsetTracked.Reset(); diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IScrollbarComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IScrollbarComponent.g.cs index 18942c13..91f1b286 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IScrollbarComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IScrollbarComponent.g.cs @@ -16,6 +16,7 @@ public interface IScrollbarComponent Oxide.Ext.UiFramework.Colors.UiColor HighlightColor { get; set; } Oxide.Ext.UiFramework.Colors.UiColor PressedColor { get; set; } Oxide.Ext.UiFramework.Colors.UiColor TrackColor { get; set; } + float FadeDuration { get; set; } Oxide.Ext.UiFramework.Components.ScrollbarComponent SetInvert(bool invert); Oxide.Ext.UiFramework.Components.ScrollbarComponent SetAutoHide(bool autoHide); @@ -26,6 +27,7 @@ public interface IScrollbarComponent Oxide.Ext.UiFramework.Components.ScrollbarComponent SetHighlightColor(Oxide.Ext.UiFramework.Colors.UiColor highlightColor); Oxide.Ext.UiFramework.Components.ScrollbarComponent SetPressedColor(Oxide.Ext.UiFramework.Colors.UiColor pressedColor); Oxide.Ext.UiFramework.Components.ScrollbarComponent SetTrackColor(Oxide.Ext.UiFramework.Colors.UiColor trackColor); + Oxide.Ext.UiFramework.Components.ScrollbarComponent SetFadeDuration(float fadeDuration); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs index 1894e619..9bf9562c 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/ITooltipComponent.g.cs @@ -8,12 +8,14 @@ namespace Oxide.Ext.UiFramework.Interfaces; public interface ITooltipComponent : IBaseTypedComponent { string Text { get; set; } + CommunityEntity.TooltipType TooltipType { get; set; } Tooltip.DelayType Delay { get; set; } TooltipContainer.PositionMode Position { get; set; } UnityEngine.Vector2 Offset { get; set; } bool UseCenter { get; set; } Oxide.Ext.UiFramework.Components.TooltipComponent SetText(string text); + Oxide.Ext.UiFramework.Components.TooltipComponent SetTooltipType(CommunityEntity.TooltipType tooltipType); Oxide.Ext.UiFramework.Components.TooltipComponent SetDelay(Tooltip.DelayType delay); Oxide.Ext.UiFramework.Components.TooltipComponent SetPosition(TooltipContainer.PositionMode position); Oxide.Ext.UiFramework.Components.TooltipComponent SetOffset(UnityEngine.Vector2 offset); From 3c39034070c27b40f7cca0ab46fc5dfd6e15d8a5 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Wed, 15 Jul 2026 17:30:01 -0500 Subject: [PATCH 13/21] Added Names to Threads --- src/Rust.UIFramework/Animation/Handlers/AnimationHandler.cs | 1 + src/Rust.UIFramework/Logging/UiFileLoggerFactory.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Rust.UIFramework/Animation/Handlers/AnimationHandler.cs b/src/Rust.UIFramework/Animation/Handlers/AnimationHandler.cs index e483e041..9c580617 100644 --- a/src/Rust.UIFramework/Animation/Handlers/AnimationHandler.cs +++ b/src/Rust.UIFramework/Animation/Handlers/AnimationHandler.cs @@ -28,6 +28,7 @@ private AnimationHandler() { Thread thread = new(AnimationLoop) { + Name = $"{UiFrameworkExtension.Instance.Name} {nameof(AnimationHandler)}", IsBackground = true }; thread.Start(); diff --git a/src/Rust.UIFramework/Logging/UiFileLoggerFactory.cs b/src/Rust.UIFramework/Logging/UiFileLoggerFactory.cs index 6dcb9e51..f2b5b6da 100644 --- a/src/Rust.UIFramework/Logging/UiFileLoggerFactory.cs +++ b/src/Rust.UIFramework/Logging/UiFileLoggerFactory.cs @@ -20,7 +20,7 @@ private UiFileLoggerFactory() _writerThread = new Thread(WriteLogThread) { IsBackground = true, - Name = nameof(UiFileLogger) + Name = $"{UiFrameworkExtension.Instance.Name} {nameof(UiFileLogger)}" }; _writerThread.Start(); } From 8a1a4bfd2fcfc7c639a788b400f217df9665e3ee Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Wed, 15 Jul 2026 17:30:44 -0500 Subject: [PATCH 14/21] Initial work on Pie Menu Builder --- .../Builder/PieMenu/BasePieMenuBuilder.cs | 38 ++++++ .../Builder/PieMenu/CachedPieMenu.cs | 13 ++ .../Builder/PieMenu/PieMenuBuilder.cs | 88 ++++++++++++ .../Builder/PieMenu/PieMenuItemBuilder.cs | 129 ++++++++++++++++++ .../Extensions/NetWriteExt.cs | 6 + src/Rust.UIFramework/Helpers/RpcFunctions.cs | 24 +++- .../Rust.UIFramework.csproj.DotSettings | 1 + 7 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 src/Rust.UIFramework/Builder/PieMenu/BasePieMenuBuilder.cs create mode 100644 src/Rust.UIFramework/Builder/PieMenu/CachedPieMenu.cs create mode 100644 src/Rust.UIFramework/Builder/PieMenu/PieMenuBuilder.cs create mode 100644 src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs diff --git a/src/Rust.UIFramework/Builder/PieMenu/BasePieMenuBuilder.cs b/src/Rust.UIFramework/Builder/PieMenu/BasePieMenuBuilder.cs new file mode 100644 index 00000000..943ac881 --- /dev/null +++ b/src/Rust.UIFramework/Builder/PieMenu/BasePieMenuBuilder.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using Network; +using Oxide.Ext.UiFramework.Pooling; + +namespace Oxide.Ext.UiFramework.Builder; + +public abstract class BasePieMenuBuilder : BasePoolable +{ + public void AddUi(BasePlayer player) + { + if (player && player.IsConnected) + { + SendUi(SendInfoBuilder.Get(player)); + } + else + { + TryDispose(); + } + } + + public void AddUi(Connection connection) + { + if (connection is { connected: true }) + { + SendUi(SendInfoBuilder.Get(connection)); + } + else + { + TryDispose(); + } + } + + public void AddUi(IEnumerable connections) => SendUi(SendInfoBuilder.Get(connections)); + public void AddUi(IEnumerable players) => SendUi(SendInfoBuilder.Get(players)); + public void AddUi() => SendUi(SendInfoBuilder.Get(Net.sv.connections)); + + public abstract void SendUi(SendInfo send); +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Builder/PieMenu/CachedPieMenu.cs b/src/Rust.UIFramework/Builder/PieMenu/CachedPieMenu.cs new file mode 100644 index 00000000..3635f91b --- /dev/null +++ b/src/Rust.UIFramework/Builder/PieMenu/CachedPieMenu.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Network; +using Oxide.Ext.UiFramework.Helpers; + +namespace Oxide.Ext.UiFramework.Builder; + +public class CachedPieMenu(byte[] menu) : BasePieMenuBuilder +{ + public override void SendUi(SendInfo send) + { + RpcFunctions.SendPieMenu(send, menu); + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Builder/PieMenu/PieMenuBuilder.cs b/src/Rust.UIFramework/Builder/PieMenu/PieMenuBuilder.cs new file mode 100644 index 00000000..a2415d72 --- /dev/null +++ b/src/Rust.UIFramework/Builder/PieMenu/PieMenuBuilder.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using Facepunch; +using Network; +using Oxide.Ext.UiFramework.Colors; +using Oxide.Ext.UiFramework.Extensions; +using Oxide.Ext.UiFramework.Helpers; +using Oxide.Ext.UiFramework.Plugins; +using ProtoBuf; + +namespace Oxide.Ext.UiFramework.Builder; + +public class PieMenuBuilder : BasePieMenuBuilder +{ + private string _closeCommand; + private readonly List _items = []; + + public IUiFrameworkPlugin Plugin { get; private set; } + + public static PieMenuBuilder Create(IUiFrameworkCorePlugin plugin) => plugin.PluginPool.Get().Init(plugin); + + private PieMenuBuilder Init(IUiFrameworkPlugin plugin) + { + Plugin = plugin; + return this; + } + + public PieMenuBuilder SetCloseCommand(string command) + { + _closeCommand = command; + return this; + } + + public PieMenuItemBuilder AddItem() + { + PieMenuItemBuilder builder = PieMenuItemBuilder.Create(Plugin); + _items.Add(builder); + return builder; + } + + public PieMenuBuilder AddItem(Action action) + { + PieMenuItemBuilder builder = AddItem(); + action(builder); + return this; + } + + public PieMenuItemBuilder AddItem(string name, string description, string image, bool disabled, bool selected, int order, + PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption colorMode, UiColor color, string command = null, string nextCommand = null, string prevCommand = null, string disabledCommand = null) + { + return AddItem().SetName(name).SetDescription(description).SetCommand(command).SetImage(image).SetDisabled(disabled).SetSelected(selected).SetOrder(order) + .SetColorMode(colorMode).SetColor(color).SetNextCommand(nextCommand).SetPreviousCommand(prevCommand).SetDisabledCommand(disabledCommand); + } + + public CachedPieMenu ToCache() + { + using BufferStream stream = Pool.Get().Initialize(); + using CustomPie pie = ToProto(); + pie.WriteToStream(stream); + TryDispose(); + return new CachedPieMenu(stream.GetBuffer().ToArray()); + } + + public override void SendUi(SendInfo send) + { + using CustomPie pie = ToProto(); + RpcFunctions.SendPieMenu(send, pie); + } + + private CustomPie ToProto() + { + CustomPie pie = Pool.Get(); + List menus = pie.menus = Pool.Get>(); + pie.closeCommand = _closeCommand; + for (int index = 0; index < _items.Count; index++) + { + PieMenuItemBuilder item = _items[index]; + menus.Add(item.Build()); + } + return pie; + } + + protected override void EnterPool() + { + _closeCommand = null; + _items.FreeValues(); + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs b/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs new file mode 100644 index 00000000..fb51eab5 --- /dev/null +++ b/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs @@ -0,0 +1,129 @@ +using Oxide.Ext.UiFramework.Colors; +using Oxide.Ext.UiFramework.Plugins; +using Oxide.Ext.UiFramework.Pooling; +using ProtoBuf; + +namespace Oxide.Ext.UiFramework.Builder; + +public class PieMenuItemBuilder : BasePoolable +{ + public string Name; + public string Description; + public string Command; + public string Image; + public bool Disabled; + public bool Selected; + public int Order; + public PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption ColorMode; + public UiColor Color; + public string NextCommand; + public string PrevCommand; + public string DisabledCommand; + + public static PieMenuItemBuilder Create(IUiFrameworkPlugin plugin) => plugin.PluginPool.Get().Init(); + + public PieMenuItemBuilder Init() + { + return this; + } + + public PieMenuItemBuilder SetName(string name) + { + Name = name; + return this; + } + + public PieMenuItemBuilder SetDescription(string description) + { + Description = description; + return this; + } + + public PieMenuItemBuilder SetCommand(string command) + { + Command = command; + return this; + } + + public PieMenuItemBuilder SetImage(string image) + { + Image = image; + return this; + } + + public PieMenuItemBuilder SetDisabled(bool disabled) + { + Disabled = disabled; + return this; + } + + public PieMenuItemBuilder SetSelected(bool selected) + { + Selected = selected; + return this; + } + + public PieMenuItemBuilder SetOrder(int order) + { + Order = order; + return this; + } + + public PieMenuItemBuilder SetColorMode(PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption colorMode) + { + ColorMode = colorMode; + return this; + } + + public PieMenuItemBuilder SetColor(UiColor color) + { + Color = color; + return this; + } + + public PieMenuItemBuilder SetNextCommand(string command) + { + NextCommand = command; + return this; + } + + public PieMenuItemBuilder SetPreviousCommand(string command) + { + PrevCommand = command; + return this; + } + + public PieMenuItemBuilder SetDisabledCommand(string command) + { + DisabledCommand = command; + return this; + } + + public CustomPieMenu Build() + { + CustomPieMenu menu = Facepunch.Pool.Get(); + menu.name = Name; + menu.description = Description; + menu.command = Command; + menu.disabled = Disabled; + menu.selected = Selected; + menu.order = Order; + menu.colorMode = (int)ColorMode; + menu.color = Color; + menu.nextCommand = NextCommand; + menu.prevCommand = PrevCommand; + menu.disabledCommand = DisabledCommand; + if (!string.IsNullOrEmpty(Image)) + { + if (uint.TryParse(Image, out uint imageId)) + { + menu.imageId = imageId; + } + else + { + menu.sprite = Image; + } + } + return menu; + } +} \ No newline at end of file diff --git a/src/Rust.UIFramework/Extensions/NetWriteExt.cs b/src/Rust.UIFramework/Extensions/NetWriteExt.cs index 56aaef02..41c9bbff 100644 --- a/src/Rust.UIFramework/Extensions/NetWriteExt.cs +++ b/src/Rust.UIFramework/Extensions/NetWriteExt.cs @@ -22,5 +22,11 @@ public void BytesWithSizeCustom(byte[] bytes, bool variableLength = false) write.Write(bytes, 0, bytes.Length); } } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void BytesCustom(byte[] bytes) + { + write.Write(bytes, 0, bytes.Length); + } } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Helpers/RpcFunctions.cs b/src/Rust.UIFramework/Helpers/RpcFunctions.cs index 8d7e9792..e5a244a0 100644 --- a/src/Rust.UIFramework/Helpers/RpcFunctions.cs +++ b/src/Rust.UIFramework/Helpers/RpcFunctions.cs @@ -13,11 +13,13 @@ public static class RpcFunctions private const string DestroyUiFunc = "DestroyUI"; private const string DestroyUisFunc = "DestroyUIs"; private const string ReceiveFilePngFunc = "CL_ReceiveFilePng"; - + private const string OpenPieFunc = "OpenPie"; + public static readonly uint AddUi = StringPool.Get(AddUiFunc); public static readonly uint DestroyUi = StringPool.Get(DestroyUiFunc); public static readonly uint DestroyUis = StringPool.Get(DestroyUisFunc); public static readonly uint ReceiveFilePng = StringPool.Get(ReceiveFilePngFunc); + public static readonly uint OpenPie = StringPool.Get(OpenPieFunc); public static void SendAddUi(SendInfo send, JsonFrameworkWriter writer) { @@ -83,6 +85,26 @@ public static void SendFilePng(SendInfo send, uint textureId, byte[] bytes) } } + public static void SendPieMenu(SendInfo send, CustomPie pie) + { + NetWrite write = ClientRPCStart(OpenPie); + if (write != null) + { + write.Proto(pie); + write.Send(send); + } + } + + public static void SendPieMenu(SendInfo send, byte[] pie) + { + NetWrite write = ClientRPCStart(OpenPie); + if (write != null) + { + write.BytesCustom(pie); + write.Send(send); + } + } + public static NetWrite ClientRPCStart(uint funcId) { if (!Net.sv.IsConnected() || CommunityEntity.ServerInstance.net == null) diff --git a/src/Rust.UIFramework/Rust.UIFramework.csproj.DotSettings b/src/Rust.UIFramework/Rust.UIFramework.csproj.DotSettings index 94558f15..aa2e1371 100644 --- a/src/Rust.UIFramework/Rust.UIFramework.csproj.DotSettings +++ b/src/Rust.UIFramework/Rust.UIFramework.csproj.DotSettings @@ -28,6 +28,7 @@ False True True + True False True True From 41e4355536c618f6c76d87e5c75e107cdb0b558a Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Wed, 15 Jul 2026 17:34:30 -0500 Subject: [PATCH 15/21] Added DisabledColor to ColorBlockComponent --- .../Builder/BaseUiBuilder.ChildComponents.cs | 4 ++-- .../Components/Child/ColorBlockComponent.cs | 5 +++++ .../Components/Core/ButtonComponent.cs | 3 ++- .../ColorBlockComponentAnimationExt.g.cs | 1 + .../ColorBlockComponent.g.cs | 7 +++++++ .../ColorBlockComponent.g.cs | 12 +++++++++++- .../IColorBlockComponent.g.cs | 2 ++ src/Rust.UIFramework/Json/JsonDefaults.cs | 3 +++ src/Rust.UIFramework/UiElements/UiButton.cs | 4 ++-- 9 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs index 0f722ad8..8d18bc18 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.ChildComponents.cs @@ -8,9 +8,9 @@ namespace Oxide.Ext.UiFramework.Builder; public abstract partial class BaseUiBuilder { #region ColorBlock - public ColorBlockComponent ColorBlock(UiButton button, in UiColor? highlightColor = null, in UiColor? pressedColor = null, in UiColor? selectedColor = null, in float? colorMultiplier = null, in float? fadeDuration = null) + public ColorBlockComponent ColorBlock(UiButton button, in UiColor? highlightColor = null, in UiColor? pressedColor = null, in UiColor? selectedColor = null, in UiColor? disabledColor = null, in float? colorMultiplier = null, in float? fadeDuration = null) { - return button.AddColorBlock(highlightColor, pressedColor, selectedColor, colorMultiplier, fadeDuration); + return button.AddColorBlock(highlightColor, pressedColor, selectedColor, disabledColor, colorMultiplier, fadeDuration); } #endregion diff --git a/src/Rust.UIFramework/Components/Child/ColorBlockComponent.cs b/src/Rust.UIFramework/Components/Child/ColorBlockComponent.cs index 84253b37..c893f66d 100644 --- a/src/Rust.UIFramework/Components/Child/ColorBlockComponent.cs +++ b/src/Rust.UIFramework/Components/Child/ColorBlockComponent.cs @@ -17,6 +17,9 @@ public partial class ColorBlockComponent : ChildComponent [TrackedDefaults(typeof(JsonDefaults.ColorBlock), nameof(JsonDefaults.ColorBlock.SelectedColor))] public partial UiColor SelectedColor { get; set; } + + [TrackedDefaults(typeof(JsonDefaults.ColorBlock), nameof(JsonDefaults.ColorBlock.DisabledColor))] + public partial UiColor DisabledColor { get; set; } [TrackedDefaults(typeof(JsonDefaults.ColorBlock), nameof(JsonDefaults.ColorBlock.ColorMultiplier))] public partial float ColorMultiplier { get; set; } @@ -29,12 +32,14 @@ public partial class ColorBlockComponent : ChildComponent public static readonly UiColor DefaultHighlightedColor = JsonDefaults.ColorBlock.HighlightedColor; public static readonly UiColor DefaultPressedColor = JsonDefaults.ColorBlock.PressedColor; public static readonly UiColor DefaultSelectedColor = JsonDefaults.ColorBlock.SelectedColor; + public static readonly UiColor DefaultDisabledColor = JsonDefaults.ColorBlock.DisabledColor; public override void WriteComponent(JsonFrameworkWriter writer, SerializeMode mode) { writer.AddField(JsonDefaults.ColorBlock.HighlightedColorName, HighlightedColorTracked, mode); writer.AddField(JsonDefaults.ColorBlock.PressedColorName, PressedColorTracked, mode); writer.AddField(JsonDefaults.ColorBlock.SelectedColorName, SelectedColorTracked, mode); + writer.AddField(JsonDefaults.ColorBlock.DisabledColorName, DisabledColorTracked, mode); writer.AddField(JsonDefaults.ColorBlock.ColorMultiplierName, ColorMultiplierTracked, mode); writer.AddField(JsonDefaults.ColorBlock.FadeDurationName, FadeDurationTracked, mode); } diff --git a/src/Rust.UIFramework/Components/Core/ButtonComponent.cs b/src/Rust.UIFramework/Components/Core/ButtonComponent.cs index 97c7494a..b888bece 100644 --- a/src/Rust.UIFramework/Components/Core/ButtonComponent.cs +++ b/src/Rust.UIFramework/Components/Core/ButtonComponent.cs @@ -53,12 +53,13 @@ protected override void WriteComponentFields(JsonFrameworkWriter writer, Seriali internal ColorBlockComponent GetOrCreateColorBlock() => ColorBlock ??= PluginPool.Get(); - internal ColorBlockComponent AddColorBlock(in UiColor? highlightColor, in UiColor? pressedColor, in UiColor? selectedColor, in float? colorMultiplier, in float? fadeDuration) + internal ColorBlockComponent AddColorBlock(in UiColor? highlightColor, in UiColor? pressedColor, in UiColor? selectedColor, in UiColor? disabledColor, in float? colorMultiplier, in float? fadeDuration) { ColorBlockComponent colors = GetOrCreateColorBlock(); if(highlightColor.HasValue) colors.HighlightedColor = highlightColor.Value; if(pressedColor.HasValue) colors.PressedColor = pressedColor.Value; if(selectedColor.HasValue) colors.SelectedColor = selectedColor.Value; + if(disabledColor.HasValue) colors.DisabledColor = disabledColor.Value; if(colorMultiplier.HasValue) colors.ColorMultiplier = colorMultiplier.Value; if(fadeDuration.HasValue) colors.FadeDuration = fadeDuration.Value; return colors; diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ColorBlockComponentAnimationExt.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ColorBlockComponentAnimationExt.g.cs index ca8e4f23..4562acfe 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ColorBlockComponentAnimationExt.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Animations.FieldAnimationsGenerator/ColorBlockComponentAnimationExt.g.cs @@ -12,6 +12,7 @@ public static partial class ColorBlockComponentAnimationExt public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateHighlightedColor() => animation.AnimateField(static a => a.HighlightedColorTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimatePressedColor() => animation.AnimateField(static a => a.PressedColorTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateSelectedColor() => animation.AnimateField(static a => a.SelectedColorTracked); + public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateDisabledColor() => animation.AnimateField(static a => a.DisabledColorTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateColorMultiplier() => animation.AnimateField(static a => a.ColorMultiplierTracked); public Oxide.Ext.UiFramework.Animation.AnimationRef> AnimateFadeDuration() => animation.AnimateField(static a => a.FadeDurationTracked); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ColorBlockComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ColorBlockComponent.g.cs index ee059f0c..3ab8a499 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ColorBlockComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Common.BuilderMethodsGenerator/ColorBlockComponent.g.cs @@ -28,6 +28,13 @@ public ColorBlockComponent SetSelectedColor(Oxide.Ext.UiFramework.Colors.UiColor return this; } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public ColorBlockComponent SetDisabledColor(Oxide.Ext.UiFramework.Colors.UiColor disabledColor) + { + DisabledColor = disabledColor; + return this; + } + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public ColorBlockComponent SetColorMultiplier(float colorMultiplier) { diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ColorBlockComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ColorBlockComponent.g.cs index 4c55b2fc..1262c006 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ColorBlockComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentGenerator/ColorBlockComponent.g.cs @@ -11,6 +11,7 @@ public partial class ColorBlockComponent : IColorBlockComponent internal readonly Oxide.Ext.UiFramework.Types.Tracked HighlightedColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ColorBlock.HighlightedColor); internal readonly Oxide.Ext.UiFramework.Types.Tracked PressedColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ColorBlock.PressedColor); internal readonly Oxide.Ext.UiFramework.Types.Tracked SelectedColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ColorBlock.SelectedColor); + internal readonly Oxide.Ext.UiFramework.Types.Tracked DisabledColorTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ColorBlock.DisabledColor); internal readonly Oxide.Ext.UiFramework.Types.Tracked ColorMultiplierTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ColorBlock.ColorMultiplier); internal readonly Oxide.Ext.UiFramework.Types.Tracked FadeDurationTracked = new(Oxide.Ext.UiFramework.Json.JsonDefaults.ColorBlock.FadeDuration); @@ -35,6 +36,13 @@ public partial Oxide.Ext.UiFramework.Colors.UiColor SelectedColor [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] set => SelectedColorTracked.Value = value; } + public partial Oxide.Ext.UiFramework.Colors.UiColor DisabledColor + { + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get => DisabledColorTracked.Value; + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + set => DisabledColorTracked.Value = value; + } public partial float ColorMultiplier { [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] @@ -50,7 +58,7 @@ public partial float FadeDuration set => FadeDurationTracked.Value = value; } - public override bool HasChanged() => false || (HighlightedColorTracked.HasChanged || PressedColorTracked.HasChanged || SelectedColorTracked.HasChanged || ColorMultiplierTracked.HasChanged || FadeDurationTracked.HasChanged) || base.HasChanged(); + public override bool HasChanged() => false || (HighlightedColorTracked.HasChanged || PressedColorTracked.HasChanged || SelectedColorTracked.HasChanged || DisabledColorTracked.HasChanged || ColorMultiplierTracked.HasChanged || FadeDurationTracked.HasChanged) || base.HasChanged(); public override void ResetHasChanged() { @@ -58,6 +66,7 @@ public override void ResetHasChanged() HighlightedColorTracked.ResetHasChanged(); PressedColorTracked.ResetHasChanged(); SelectedColorTracked.ResetHasChanged(); + DisabledColorTracked.ResetHasChanged(); ColorMultiplierTracked.ResetHasChanged(); FadeDurationTracked.ResetHasChanged(); } @@ -68,6 +77,7 @@ public override void Reset() HighlightedColorTracked.Reset(); PressedColorTracked.Reset(); SelectedColorTracked.Reset(); + DisabledColorTracked.Reset(); ColorMultiplierTracked.Reset(); FadeDurationTracked.Reset(); } diff --git a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IColorBlockComponent.g.cs b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IColorBlockComponent.g.cs index 928aa28d..be890f08 100644 --- a/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IColorBlockComponent.g.cs +++ b/src/Rust.UIFramework/Generated/Rust.UiFramework.SourceGenerators/Rust.UiFramework.SourceGenerators.Generators.Components.ComponentInterfaceGenerator/IColorBlockComponent.g.cs @@ -10,12 +10,14 @@ public interface IColorBlockComponent Oxide.Ext.UiFramework.Colors.UiColor HighlightedColor { get; set; } Oxide.Ext.UiFramework.Colors.UiColor PressedColor { get; set; } Oxide.Ext.UiFramework.Colors.UiColor SelectedColor { get; set; } + Oxide.Ext.UiFramework.Colors.UiColor DisabledColor { get; set; } float ColorMultiplier { get; set; } float FadeDuration { get; set; } Oxide.Ext.UiFramework.Components.ColorBlockComponent SetHighlightedColor(Oxide.Ext.UiFramework.Colors.UiColor highlightedColor); Oxide.Ext.UiFramework.Components.ColorBlockComponent SetPressedColor(Oxide.Ext.UiFramework.Colors.UiColor pressedColor); Oxide.Ext.UiFramework.Components.ColorBlockComponent SetSelectedColor(Oxide.Ext.UiFramework.Colors.UiColor selectedColor); + Oxide.Ext.UiFramework.Components.ColorBlockComponent SetDisabledColor(Oxide.Ext.UiFramework.Colors.UiColor disabledColor); Oxide.Ext.UiFramework.Components.ColorBlockComponent SetColorMultiplier(float colorMultiplier); Oxide.Ext.UiFramework.Components.ColorBlockComponent SetFadeDuration(float fadeDuration); } diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index cabd1318..1093e3a8 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -270,6 +270,9 @@ public static class ColorBlock public static readonly Utf8String SelectedColorName = "selectedColor"; public static readonly UiColor SelectedColor = UiColor.ParseHexColor("#F5F5F5FF"); + + public static readonly Utf8String DisabledColorName = "selectedColor"; + public static readonly UiColor DisabledColor = UiColor.ParseHexColor("##808080FF"); public static readonly Utf8String ColorMultiplierName = "colorMultiplier"; public const float ColorMultiplier = 1f; diff --git a/src/Rust.UIFramework/UiElements/UiButton.cs b/src/Rust.UIFramework/UiElements/UiButton.cs index 80a4e23c..66895822 100644 --- a/src/Rust.UIFramework/UiElements/UiButton.cs +++ b/src/Rust.UIFramework/UiElements/UiButton.cs @@ -80,9 +80,9 @@ public UiButton SetClose(string close) return this; } - public ColorBlockComponent AddColorBlock(in UiColor? highlightColor = null, in UiColor? pressedColor = null, in UiColor? selectedColor = null, in float? colorMultiplier = null, in float? fadeDuration = null) + public ColorBlockComponent AddColorBlock(in UiColor? highlightColor = null, in UiColor? pressedColor = null, in UiColor? selectedColor = null, in UiColor? disabledColor = null, in float? colorMultiplier = null, in float? fadeDuration = null) { - return Button.AddColorBlock(highlightColor, pressedColor, selectedColor, colorMultiplier, fadeDuration); + return Button.AddColorBlock(highlightColor, pressedColor, selectedColor, disabledColor, colorMultiplier, fadeDuration); } public ColorBlockComponent GetOrAddColorBlock() => Button.GetOrCreateColorBlock(); From f54ed5f2db235426cfb425105ae380065fa97421 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Sun, 19 Jul 2026 08:09:08 -0500 Subject: [PATCH 16/21] Fixed CanvasGroup having the wrong Type --- src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs b/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs index 065f4569..df07e1fa 100644 --- a/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs +++ b/src/Rust.UIFramework/Components/Sub/CanvasGroupComponent.cs @@ -21,7 +21,7 @@ public partial class CanvasGroupComponent : SubComponent [TrackedDefaults(typeof(JsonDefaults.CanvasGroup), nameof(JsonDefaults.CanvasGroup.Fade))] public partial UiCanvasGroupFade Fade { get; set; } - public override Utf8String Type => JsonDefaults.Slot.Type; + public override Utf8String Type => JsonDefaults.CanvasGroup.Type; public override ComponentType ComponentType => ComponentType.CanvasGroup; public override bool AllowMultiple => false; From 69dd9b802f9856cfc742e9f15bd5986776421fb6 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Sun, 19 Jul 2026 10:13:57 -0500 Subject: [PATCH 17/21] Updated Unit Tests for CUI Updates --- src/Rust.UIFramework/Json/JsonDefaults.cs | 2 +- .../Libraries/Channels/UiChannel.cs | 8 +++++-- .../Components/Child/ChildComponentHelpers.cs | 2 ++ .../Components/Core/ButtonComponentTests.cs | 2 +- .../Components/Core/ComponentHelpers.cs | 9 ++++++++ ...lValues_GeneratesCorrectJson.verified.json | 2 ++ ...nent_AllValues_MatchExpected.verified.json | 2 ++ ...alues_ResetToCorrectDefaults.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...ose, AddColorBlock = False }.verified.json | 2 ++ ...lose, AddColorBlock = True }.verified.json | 3 +++ ...and, AddColorBlock = False }.verified.json | 2 ++ ...mand, AddColorBlock = True }.verified.json | 3 +++ ...ose, AddColorBlock = False }.verified.json | 2 ++ ...lose, AddColorBlock = True }.verified.json | 3 +++ ...and, AddColorBlock = False }.verified.json | 2 ++ ...mand, AddColorBlock = True }.verified.json | 3 +++ ..._Update_GeneratesCorrectJson.verified.json | 2 ++ ...lValues_GeneratesCorrectJson.verified.json | 7 ++++++ ...nent_AllValues_MatchExpected.verified.json | 13 +++++++++++ ...alues_ResetToCorrectDefaults.verified.json | 12 ++++++++++ ...nt_FromPool_HasDefaultValues.verified.json | 12 ++++++++++ ..._Update_GeneratesCorrectJson.verified.json | 7 ++++++ ...llValues_GeneratesCorrectJson.verified.txt | 1 + ...nent_AllValues_MatchExpected.verified.json | 1 + ...t_Update_GeneratesCorrectJson.verified.txt | 1 + ...lValues_GeneratesCorrectJson.verified.json | 2 ++ ...nent_AllValues_MatchExpected.verified.json | 2 ++ ...alues_ResetToCorrectDefaults.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ..._Update_GeneratesCorrectJson.verified.json | 2 ++ ...lValues_GeneratesCorrectJson.verified.json | 2 ++ ...nent_AllValues_MatchExpected.verified.json | 2 ++ ...alues_ResetToCorrectDefaults.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ..._Update_GeneratesCorrectJson.verified.json | 2 ++ ...lValues_GeneratesCorrectJson.verified.json | 2 ++ ...nent_AllValues_MatchExpected.verified.json | 2 ++ ...alues_ResetToCorrectDefaults.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ..._Update_GeneratesCorrectJson.verified.json | 2 ++ ...lValues_GeneratesCorrectJson.verified.json | 4 ++++ ...nent_AllValues_MatchExpected.verified.json | 7 ++++++ ...alues_ResetToCorrectDefaults.verified.json | 7 ++++++ ...nt_FromPool_HasDefaultValues.verified.json | 7 ++++++ ..._Update_GeneratesCorrectJson.verified.json | 4 ++++ ...lValues_GeneratesCorrectJson.verified.json | 1 + ...nent_AllValues_MatchExpected.verified.json | 2 ++ ...alues_ResetToCorrectDefaults.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...lValues_GeneratesCorrectJson.verified.json | 1 + ...nent_AllValues_MatchExpected.verified.json | 1 + ...alues_ResetToCorrectDefaults.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...eamId = 256705178760118272 }.verified.json | 1 + ...ype = Large, SteamId = 999 }.verified.json | 1 + ...eamId = 256705178760118272 }.verified.json | 1 + ...eamId = 256705178760118272 }.verified.json | 1 + ...eamId = 256705178760118272 }.verified.json | 1 + ...ype = Large, SteamId = 999 }.verified.json | 1 + ...eamId = 256705178760118272 }.verified.json | 1 + ...eamId = 256705178760118272 }.verified.json | 1 + ..._Update_GeneratesCorrectJson.verified.json | 1 + ...lValues_GeneratesCorrectJson.verified.json | 1 + ...nent_AllValues_MatchExpected.verified.json | 1 + ...alues_ResetToCorrectDefaults.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ...nk = Ace, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ce, CardType = Transparent }.verified.json | 1 + ...k = Back, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...ck, CardType = Transparent }.verified.json | 1 + ... = Joker, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...er, CardType = Transparent }.verified.json | 1 + ...nk = Two, CardType = Small }.verified.json | 1 + ...ardType = SmallTransparent }.verified.json | 1 + ...wo, CardType = Transparent }.verified.json | 1 + ..._Update_GeneratesCorrectJson.verified.json | 1 + ...lValues_GeneratesCorrectJson.verified.json | 1 + ...nent_AllValues_MatchExpected.verified.json | 1 + ...alues_ResetToCorrectDefaults.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...n_row=TheoryRow { Image = }.verified.json | 1 + ...ow=TheoryRow { Image = 789 }.verified.json | 1 + ...tent-ui-ui.spashscreen.psd }.verified.json | 1 + ...tp---example.com-image.png }.verified.json | 1 + ...d_row=TheoryRow { Image = }.verified.json | 1 + ...ow=TheoryRow { Image = 789 }.verified.json | 1 + ...tent-ui-ui.spashscreen.psd }.verified.json | 1 + ...tp---example.com-image.png }.verified.json | 1 + ..._Update_GeneratesCorrectJson.verified.json | 1 + ...lValues_GeneratesCorrectJson.verified.json | 8 +++---- ...nent_AllValues_MatchExpected.verified.json | 4 ++-- ..._Update_GeneratesCorrectJson.verified.json | 8 +++---- ...lValues_GeneratesCorrectJson.verified.json | 1 + ...nent_AllValues_MatchExpected.verified.json | 1 + ...alues_ResetToCorrectDefaults.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ..._Update_GeneratesCorrectJson.verified.json | 1 + ...l = False, Vertical = True }.verified.json | 1 + ...l = True, Vertical = False }.verified.json | 1 + ...al = True, Vertical = True }.verified.json | 2 ++ ...lValues_GeneratesCorrectJson.verified.json | 1 + ...nent_AllValues_MatchExpected.verified.json | 1 + ...alues_ResetToCorrectDefaults.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ..._Update_GeneratesCorrectJson.verified.json | 1 + ...lValues_GeneratesCorrectJson.verified.json | 9 ++++++++ ...nent_AllValues_MatchExpected.verified.json | 12 ++++++++++ ...alues_ResetToCorrectDefaults.verified.json | 8 +++++++ ...nt_FromPool_HasDefaultValues.verified.json | 8 +++++++ ..._Update_GeneratesCorrectJson.verified.json | 9 ++++++++ .../Sub/CanvasGroupComponentTests.cs | 5 ++++ .../Components/Sub/MaskComponentTests.cs | 5 ++++ .../Components/Sub/SubComponentHelpers.cs | 23 +++++++++++++++++++ .../Components/Sub/TooltipComponentTests.cs | 5 ++++ .../Libraries/Pooling/UiPoolingTests.cs | 3 ++- ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...lose, AddColorBlock = True }.verified.json | 1 + ...mand, AddColorBlock = True }.verified.json | 1 + ...rrectDefaults_PopulateFluent.verified.json | 2 ++ ...rectDefaults_PopulateSetters.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...rrectDefaults_PopulateFluent.verified.json | 2 ++ ...rectDefaults_PopulateSetters.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...rrectDefaults_PopulateFluent.verified.json | 2 ++ ...rectDefaults_PopulateSetters.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...rrectDefaults_PopulateFluent.verified.json | 2 ++ ...rectDefaults_PopulateSetters.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...rrectDefaults_PopulateFluent.verified.json | 1 + ...rectDefaults_PopulateSetters.verified.json | 1 + ...MatchExpected_PopulateFluent.verified.json | 2 ++ ...atchExpected_PopulateSetters.verified.json | 2 ++ ...rrectDefaults_PopulateFluent.verified.json | 2 ++ ...rectDefaults_PopulateSetters.verified.json | 2 ++ ...nt_FromPool_HasDefaultValues.verified.json | 2 ++ ...MatchExpected_PopulateFluent.verified.json | 1 + ...atchExpected_PopulateSetters.verified.json | 1 + ...rrectDefaults_PopulateFluent.verified.json | 1 + ...rectDefaults_PopulateSetters.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...MatchExpected_PopulateFluent.verified.json | 1 + ...atchExpected_PopulateSetters.verified.json | 1 + ...rrectDefaults_PopulateFluent.verified.json | 1 + ...rectDefaults_PopulateSetters.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...nt_FromPool_HasDefaultValues.verified.json | 1 + ...rrectDefaults_PopulateFluent.verified.json | 1 + ...rectDefaults_PopulateSetters.verified.json | 1 + .../UiElements/UiButtonTests.cs | 3 ++- 239 files changed, 460 insertions(+), 16 deletions(-) create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_MatchExpected.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_FromPool_HasDefaultValues.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_Update_GeneratesCorrectJson.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_MatchExpected.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_FromPool_HasDefaultValues.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_Update_GeneratesCorrectJson.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_MatchExpected.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_FromPool_HasDefaultValues.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_Update_GeneratesCorrectJson.verified.json create mode 100644 src/Rust.UiFramework.UnitTests/Components/Sub/CanvasGroupComponentTests.cs create mode 100644 src/Rust.UiFramework.UnitTests/Components/Sub/MaskComponentTests.cs create mode 100644 src/Rust.UiFramework.UnitTests/Components/Sub/TooltipComponentTests.cs diff --git a/src/Rust.UIFramework/Json/JsonDefaults.cs b/src/Rust.UIFramework/Json/JsonDefaults.cs index 1093e3a8..c608d2b0 100644 --- a/src/Rust.UIFramework/Json/JsonDefaults.cs +++ b/src/Rust.UIFramework/Json/JsonDefaults.cs @@ -271,7 +271,7 @@ public static class ColorBlock public static readonly Utf8String SelectedColorName = "selectedColor"; public static readonly UiColor SelectedColor = UiColor.ParseHexColor("#F5F5F5FF"); - public static readonly Utf8String DisabledColorName = "selectedColor"; + public static readonly Utf8String DisabledColorName = "disabledColor"; public static readonly UiColor DisabledColor = UiColor.ParseHexColor("##808080FF"); public static readonly Utf8String ColorMultiplierName = "colorMultiplier"; diff --git a/src/Rust.UIFramework/Libraries/Channels/UiChannel.cs b/src/Rust.UIFramework/Libraries/Channels/UiChannel.cs index b6e9955c..0b05552d 100644 --- a/src/Rust.UIFramework/Libraries/Channels/UiChannel.cs +++ b/src/Rust.UIFramework/Libraries/Channels/UiChannel.cs @@ -50,7 +50,7 @@ private void StartWorkers() int workersToStart = Math.Min(_options.MaxConcurrency - _activeWorkerCount, _queue.Count); for (int i = 0; i < workersToStart; i++) { - UniTask.RunOnThreadPool(Run, false, _cancellationTokenSource.Token); + Run().Forget(); Interlocked.Increment(ref _activeWorkerCount); _logger.Debug("Started new worker task. Active workers: {0}/{1}", _activeWorkerCount, _options.MaxConcurrency); } @@ -65,7 +65,11 @@ private bool CanStartNewWorkers() private async UniTaskVoid Run() { - if (!_options.EnableMultithreading) + if (_options.EnableMultithreading) + { + await UniTask.SwitchToThreadPool(); + } + else { #if SERVER await UniTask.SwitchToMainThread(); diff --git a/src/Rust.UiFramework.UnitTests/Components/Child/ChildComponentHelpers.cs b/src/Rust.UiFramework.UnitTests/Components/Child/ChildComponentHelpers.cs index c9964e64..5ee350d0 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Child/ChildComponentHelpers.cs +++ b/src/Rust.UiFramework.UnitTests/Components/Child/ChildComponentHelpers.cs @@ -15,6 +15,7 @@ public static void PopulateColorBlock(ColorBlockComponent block) block.HighlightedColor = UiColors.Red; block.PressedColor = UiColors.Green; block.SelectedColor = UiColors.Blue; + block.DisabledColor = UiColors.Magenta; block.ColorMultiplier = 0.5f; block.FadeDuration = 1.5f; } @@ -30,6 +31,7 @@ public static void PopulateScrollBar(ScrollbarComponent scrollbar) scrollbar.HighlightColor = UiColors.Maroon; scrollbar.PressedColor = UiColors.Navy; scrollbar.TrackColor = UiColors.Olive; + scrollbar.FadeDuration = 1.5f; } public static void PopulateScrollViewContent(ScrollViewContentComponent content) diff --git a/src/Rust.UiFramework.UnitTests/Components/Core/ButtonComponentTests.cs b/src/Rust.UiFramework.UnitTests/Components/Core/ButtonComponentTests.cs index 04f732ce..c9f7d926 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Core/ButtonComponentTests.cs +++ b/src/Rust.UiFramework.UnitTests/Components/Core/ButtonComponentTests.cs @@ -14,7 +14,7 @@ protected override void PopulateTheory(ButtonComponent component, TheoryRow row) component.ButtonType = row.ButtonType; if(row.AddColorBlock) { - component.AddColorBlock(UiColors.Blue, UiColors.Orange, UiColors.Green, 0.5f, 1.5f); + component.AddColorBlock(UiColors.Blue, UiColors.Orange, UiColors.Green, UiColors.Magenta, 0.5f, 1.5f); } } diff --git a/src/Rust.UiFramework.UnitTests/Components/Core/ComponentHelpers.cs b/src/Rust.UiFramework.UnitTests/Components/Core/ComponentHelpers.cs index 3d0ed633..0eb3aba5 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Core/ComponentHelpers.cs +++ b/src/Rust.UiFramework.UnitTests/Components/Core/ComponentHelpers.cs @@ -24,6 +24,8 @@ public static void PopulateImage(ImageComponent image) image.PlaceholderFor = new UiReference("parent", "name"); image.FillCenter = false; image.Png = "png"; + image.PixelPerUnitMultiplier = 2f; + image.AllowRaycast = false; } public static void PopulateNineSlice(NineSliceComponent slice) @@ -40,6 +42,8 @@ public static void PopulateButton(ButtonComponent button) button.Material = UiMaterials.Icons.IconMaterial; button.ImageType = Image.Type.Sliced; button.Command = "command"; + button.Interactable = false; + button.AllowRaycast = false; } public static void PopulateItemIcon(ItemIconComponent icon) @@ -59,6 +63,7 @@ public static void PopulateText(TextComponent text) text.Text = "text 123"; text.VerticalOverflow = VerticalWrapMode.Overflow; text.PlaceholderFor = new UiReference("parent", "name"); + text.AllowRaycast = false; } public static void PopulateInput(InputComponent input) @@ -69,6 +74,8 @@ public static void PopulateInput(InputComponent input) input.Mode = InputMode.NeedsKeyboard | InputMode.AutoFocus; input.LineType = InputField.LineType.MultiLineNewline; input.Placeholder = new UiReference("parent", "name"); + input.AllowRaycast = false; + input.Interactable = false; } public static void PopulateRawImage(RawImageComponent image) @@ -78,6 +85,7 @@ public static void PopulateRawImage(RawImageComponent image) image.Material = UiMaterials.Content.Ui.NameFontMaterial; image.Image = "https://www.example.com"; image.PlaceholderFor = new UiReference("parent", "name"); + image.AllowRaycast = false; } public static void PopulatePlayerAvatar(PlayerAvatarComponent avatar) @@ -107,5 +115,6 @@ public static void PopulatePlayingCard(PlayingCardComponent card) card.FadeIn = 1.5f; card.Material = UiMaterials.Content.Ui.UiBackgroundBlur; card.Color = UiColors.Orange; + card.AllowRaycast = false; } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 52c59c19..f3a1bc61 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,8 +1,10 @@ { + "blocksRaycast": 0, "color": "1 0 0", "command": "command", "fadeIn": 1, "imagetype": "1", + "interactable": 0, "material": "assets/icons/iconmaterial.mat", "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_MatchExpected.verified.json index 934ef804..617391d0 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,10 +1,12 @@ { + "AllowRaycast": false, "Color": "#FF0000FF", "Command": "command", "ComponentType": "Button", "Enabled": true, "FadeIn": 1.0, "ImageType": "Sliced", + "Interactable": false, "Material": "assets/icons/iconmaterial.mat", "Sprite": "assets/content/ui/ui.background.rounded.png", "Type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index dc56c898..79e39ba2 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,6 +1,8 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Button", "Enabled": true, + "Interactable": true, "Type": "UnityEngine.UI.Button" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_FromPool_HasDefaultValues.verified.json index dc56c898..79e39ba2 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,6 +1,8 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Button", "Enabled": true, + "Interactable": true, "Type": "UnityEngine.UI.Button" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json index 6f6a65bd..56c85838 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json @@ -1,8 +1,10 @@ { + "blocksRaycast": 0, "close": "command", "color": "1 0 0", "fadeIn": 1, "imagetype": "1", + "interactable": 0, "material": "assets/icons/iconmaterial.mat", "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json index 16f09310..709ae639 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json @@ -1,11 +1,14 @@ { + "blocksRaycast": 0, "close": "command", "color": "1 0 0", "colorMultiplier": 0.5, + "disabledColor": "1 0 1", "fadeDuration": 1.5, "fadeIn": 1, "highlightedColor": "0 0 1", "imagetype": "1", + "interactable": 0, "material": "assets/icons/iconmaterial.mat", "pressedColor": "1 0.6471 0", "selectedColor": "0 0.502 0", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json index 52c59c19..f3a1bc61 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json @@ -1,8 +1,10 @@ { + "blocksRaycast": 0, "color": "1 0 0", "command": "command", "fadeIn": 1, "imagetype": "1", + "interactable": 0, "material": "assets/icons/iconmaterial.mat", "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json index 0264e70e..e07c2e44 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json @@ -1,11 +1,14 @@ { + "blocksRaycast": 0, "color": "1 0 0", "colorMultiplier": 0.5, "command": "command", + "disabledColor": "1 0 1", "fadeDuration": 1.5, "fadeIn": 1, "highlightedColor": "0 0 1", "imagetype": "1", + "interactable": 0, "material": "assets/icons/iconmaterial.mat", "pressedColor": "1 0.6471 0", "selectedColor": "0 0.502 0", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json index 917b4abe..b89722e3 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = False }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "ButtonType": "Close", "Color": "#FF0000FF", "Command": "command", @@ -6,6 +7,7 @@ "Enabled": true, "FadeIn": 1.0, "ImageType": "Sliced", + "Interactable": false, "Material": "assets/icons/iconmaterial.mat", "Sprite": "assets/content/ui/ui.background.rounded.png", "Type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json index 449feb91..ee29e011 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json @@ -1,9 +1,11 @@ { + "AllowRaycast": false, "ButtonType": "Close", "Color": "#FF0000FF", "ColorBlock": { "ColorMultiplier": 0.5, "ComponentType": "ColorBlock", + "DisabledColor": "#FF00FFFF", "FadeDuration": 1.5, "HighlightedColor": "#0000FFFF", "PressedColor": "#FFA500FF", @@ -14,6 +16,7 @@ "Enabled": true, "FadeIn": 1.0, "ImageType": "Sliced", + "Interactable": false, "Material": "assets/icons/iconmaterial.mat", "Sprite": "assets/content/ui/ui.background.rounded.png", "Type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json index 934ef804..617391d0 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = False }.verified.json @@ -1,10 +1,12 @@ { + "AllowRaycast": false, "Color": "#FF0000FF", "Command": "command", "ComponentType": "Button", "Enabled": true, "FadeIn": 1.0, "ImageType": "Sliced", + "Interactable": false, "Material": "assets/icons/iconmaterial.mat", "Sprite": "assets/content/ui/ui.background.rounded.png", "Type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json index 0eb69492..32dc768a 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json @@ -1,8 +1,10 @@ { + "AllowRaycast": false, "Color": "#FF0000FF", "ColorBlock": { "ColorMultiplier": 0.5, "ComponentType": "ColorBlock", + "DisabledColor": "#FF00FFFF", "FadeDuration": 1.5, "HighlightedColor": "#0000FFFF", "PressedColor": "#FFA500FF", @@ -13,6 +15,7 @@ "Enabled": true, "FadeIn": 1.0, "ImageType": "Sliced", + "Interactable": false, "Material": "assets/icons/iconmaterial.mat", "Sprite": "assets/content/ui/ui.background.rounded.png", "Type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 52c59c19..f3a1bc61 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ButtonComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,8 +1,10 @@ { + "blocksRaycast": 0, "color": "1 0 0", "command": "command", "fadeIn": 1, "imagetype": "1", + "interactable": 0, "material": "assets/icons/iconmaterial.mat", "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Button" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json new file mode 100644 index 00000000..21ea8ec7 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -0,0 +1,7 @@ +{ + "alpha": 0.05, + "blocksRaycast": 0, + "fade": "0.5 0.25", + "interactable": 0, + "type": "UnityEngine.UI.CanvasGroup" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_MatchExpected.verified.json new file mode 100644 index 00000000..5ee72e9b --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_MatchExpected.verified.json @@ -0,0 +1,13 @@ +{ + "AllowMultiple": false, + "AllowRaycast": false, + "Alpha": 0.05, + "ComponentType": "CanvasGroup", + "Enabled": true, + "Fade": { + "Duration": 0.25, + "ToAlpha": 0.5 + }, + "Interactable": false, + "Type": "UnityEngine.UI.CanvasGroup" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json new file mode 100644 index 00000000..56b73aa1 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -0,0 +1,12 @@ +{ + "AllowMultiple": false, + "AllowRaycast": true, + "Alpha": 1.0, + "ComponentType": "CanvasGroup", + "Enabled": true, + "Fade": { + "Duration": 1.0 + }, + "Interactable": true, + "Type": "UnityEngine.UI.CanvasGroup" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_FromPool_HasDefaultValues.verified.json new file mode 100644 index 00000000..56b73aa1 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -0,0 +1,12 @@ +{ + "AllowMultiple": false, + "AllowRaycast": true, + "Alpha": 1.0, + "ComponentType": "CanvasGroup", + "Enabled": true, + "Fade": { + "Duration": 1.0 + }, + "Interactable": true, + "Type": "UnityEngine.UI.CanvasGroup" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_Update_GeneratesCorrectJson.verified.json new file mode 100644 index 00000000..21ea8ec7 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/CanvasGroupComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -0,0 +1,7 @@ +{ + "alpha": 0.05, + "blocksRaycast": 0, + "fade": "0.5 0.25", + "interactable": 0, + "type": "UnityEngine.UI.CanvasGroup" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_GeneratesCorrectJson.verified.txt b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_GeneratesCorrectJson.verified.txt index 8093798c..84c3f8bf 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_GeneratesCorrectJson.verified.txt +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_GeneratesCorrectJson.verified.txt @@ -1,5 +1,6 @@ "highlightedColor": "1 0 0", "pressedColor": "0 0.502 0", "selectedColor": "0 0 1", +"disabledColor": "1 0 1", "colorMultiplier": 0.5, "fadeDuration": 1.5 \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_MatchExpected.verified.json index 119d69ba..9a61e3a9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,6 +1,7 @@ { "ColorMultiplier": 0.5, "ComponentType": "ColorBlock", + "DisabledColor": "#FF00FFFF", "FadeDuration": 1.5, "HighlightedColor": "#FF0000FF", "PressedColor": "#008000FF", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_Update_GeneratesCorrectJson.verified.txt b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_Update_GeneratesCorrectJson.verified.txt index 8093798c..84c3f8bf 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_Update_GeneratesCorrectJson.verified.txt +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ColorBlockComponentTests.Component_Update_GeneratesCorrectJson.verified.txt @@ -1,5 +1,6 @@ "highlightedColor": "1 0 0", "pressedColor": "0 0.502 0", "selectedColor": "0 0 1", +"disabledColor": "1 0 1", "colorMultiplier": 0.5, "fadeDuration": 1.5 \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 101a1582..b4e08d25 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0 0", "fadeIn": 1, "fillCenter": 0, @@ -6,6 +7,7 @@ "material": "assets/icons/iconmaterial.mat", "placeholderParentId": "name", "png": "png", + "ppuMultiplier": 0, "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_MatchExpected.verified.json index 107a7fcb..91ef12f7 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FF0000FF", "ComponentType": "Image", "Enabled": true, @@ -6,6 +7,7 @@ "FillCenter": false, "ImageType": "Sliced", "Material": "assets/icons/iconmaterial.mat", + "PixelPerUnitMultiplier": 2.0, "PlaceholderFor": "parent:name", "Png": "png", "Sprite": "assets/content/ui/ui.background.rounded.png", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index 7822d84d..9262f85d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,7 +1,9 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_FromPool_HasDefaultValues.verified.json index 7822d84d..9262f85d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,7 +1,9 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 101a1582..b4e08d25 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0 0", "fadeIn": 1, "fillCenter": 0, @@ -6,6 +7,7 @@ "material": "assets/icons/iconmaterial.mat", "placeholderParentId": "name", "png": "png", + "ppuMultiplier": 0, "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 4567523e..f3dc248d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,12 +1,14 @@ { "align": "2", "autofocus": 1, + "blocksRaycast": 0, "characterLimit": 16, "color": "0 0.502 0", "command": "command", "fadeIn": 2, "font": "permanentmarker.ttf", "fontSize": 24, + "interactable": 0, "lineType": "2", "needsKeyboard": 1, "placeholderId": "name", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_MatchExpected.verified.json index 4934093b..aecfb98b 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,5 +1,6 @@ { "Align": "UpperRight", + "AllowRaycast": false, "AutoFocus": true, "CharsLimit": 16, "Color": "#008000FF", @@ -10,6 +11,7 @@ "Font": "permanentmarker.ttf", "FontSize": 24, "HudNeedsKeyboard": false, + "Interactable": false, "IsPassword": false, "LineType": "MultiLineNewline", "Mode": "NeedsKeyboard, AutoFocus", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index 143de4ca..e895159f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,10 +1,12 @@ { + "AllowRaycast": true, "AutoFocus": false, "Color": "#FFFFFFFF", "ComponentType": "Input", "Enabled": true, "FontSize": 14, "HudNeedsKeyboard": false, + "Interactable": true, "IsPassword": false, "NeedsKeyboard": false, "ReadOnly": false, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_FromPool_HasDefaultValues.verified.json index 143de4ca..e895159f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,10 +1,12 @@ { + "AllowRaycast": true, "AutoFocus": false, "Color": "#FFFFFFFF", "ComponentType": "Input", "Enabled": true, "FontSize": 14, "HudNeedsKeyboard": false, + "Interactable": true, "IsPassword": false, "NeedsKeyboard": false, "ReadOnly": false, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 9f9469ea..64b2532a 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/InputComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,5 +1,6 @@ { "align": "2", + "blocksRaycast": 0, "characterLimit": 16, "color": "0 0.502 0", "command": "command", @@ -7,6 +8,7 @@ "font": "permanentmarker.ttf", "fontSize": 24, "hudMenuInput": 0, + "interactable": 0, "lineType": "2", "password": 0, "placeholderId": "name", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index e9652dc2..d5c104ea 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0 0", "fadeIn": 1, "fillCenter": 0, @@ -7,6 +8,7 @@ "material": "assets/icons/iconmaterial.mat", "placeholderParentId": "name", "png": "png", + "ppuMultiplier": 0, "skinid": 34621422135410688, "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Image" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_MatchExpected.verified.json index 9defa823..f7426c49 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FF0000FF", "ComponentType": "ItemIcon", "Enabled": true, @@ -7,6 +8,7 @@ "ImageType": "Sliced", "ItemId": 123, "Material": "assets/icons/iconmaterial.mat", + "PixelPerUnitMultiplier": 2.0, "PlaceholderFor": "parent:name", "Png": "png", "SkinId": 34621422135410688, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index ceb09029..519820bc 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,7 +1,9 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "ItemIcon", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_FromPool_HasDefaultValues.verified.json index ceb09029..519820bc 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,7 +1,9 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "ItemIcon", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_Update_GeneratesCorrectJson.verified.json index e9652dc2..d5c104ea 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ItemIconComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0 0", "fadeIn": 1, "fillCenter": 0, @@ -7,6 +8,7 @@ "material": "assets/icons/iconmaterial.mat", "placeholderParentId": "name", "png": "png", + "ppuMultiplier": 0, "skinid": 34621422135410688, "sprite": "assets/content/ui/ui.background.rounded.png", "type": "UnityEngine.UI.Image" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json new file mode 100644 index 00000000..3aad12a5 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -0,0 +1,4 @@ +{ + "showMaskGraphic": 0, + "type": "UnityEngine.UI.Mask" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_MatchExpected.verified.json new file mode 100644 index 00000000..89ac2455 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_MatchExpected.verified.json @@ -0,0 +1,7 @@ +{ + "AllowMultiple": false, + "ComponentType": "Mask", + "Enabled": true, + "ShowMaskGraphic": false, + "Type": "UnityEngine.UI.Mask" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json new file mode 100644 index 00000000..10a57d1f --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -0,0 +1,7 @@ +{ + "AllowMultiple": false, + "ComponentType": "Mask", + "Enabled": true, + "ShowMaskGraphic": true, + "Type": "UnityEngine.UI.Mask" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_FromPool_HasDefaultValues.verified.json new file mode 100644 index 00000000..10a57d1f --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -0,0 +1,7 @@ +{ + "AllowMultiple": false, + "ComponentType": "Mask", + "Enabled": true, + "ShowMaskGraphic": true, + "Type": "UnityEngine.UI.Mask" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_Update_GeneratesCorrectJson.verified.json new file mode 100644 index 00000000..3aad12a5 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/MaskComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -0,0 +1,4 @@ +{ + "showMaskGraphic": 0, + "type": "UnityEngine.UI.Mask" +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 8eb5ec9d..7355a2df 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -2,6 +2,7 @@ "fillCenter": 0, "imagetype": "1", "png": "png", + "ppuMultiplier": 0, "slice": "1 8 4 2", "type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_MatchExpected.verified.json index 2e17f6a0..40ca997c 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,9 +1,11 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "NineSlice", "Enabled": true, "FillCenter": false, "ImageType": "Sliced", + "PixelPerUnitMultiplier": 1.0, "Png": "png", "Slice": "UiBorderWidth { Left = 1, Top = 2, Right = 4, Bottom = 8 }", "Type": "UnityEngine.UI.Image" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index 281fcfd3..0dc755e1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,8 +1,10 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "NineSlice", "Enabled": true, "FillCenter": false, "ImageType": "Sliced", + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_FromPool_HasDefaultValues.verified.json index 281fcfd3..0dc755e1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/NineSliceComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,8 +1,10 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "NineSlice", "Enabled": true, "FillCenter": false, "ImageType": "Sliced", + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index a1a2e6e2..741ac5f4 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_MatchExpected.verified.json index 0489ff07..450ed275 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "AvatarType": "Medium", "Color": "#FFEB04FF", "ComponentType": "PlayerAvatar", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index ea1c5402..9cfaf5ba 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "AvatarType": "Medium", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_FromPool_HasDefaultValues.verified.json index ea1c5402..9cfaf5ba 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "AvatarType": "Medium", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json index ccb31a9b..a47854fa 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json index 11ff3872..5df53480 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json index 29a5e253..bb80d4a7 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json index 29a5e253..bb80d4a7 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json index 8cd7d748..70f3b46e 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 256705178760118272 }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "AvatarType": "Large", "Color": "#FFEB04FF", "ComponentType": "PlayerAvatar", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json index 2074f269..64eff7a1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Large, SteamId = 999 }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "AvatarType": "Large", "Color": "#FFEB04FF", "ComponentType": "PlayerAvatar", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json index 01d1905b..6e510a72 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Medium, SteamId = 256705178760118272 }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "AvatarType": "Medium", "Color": "#FFEB04FF", "ComponentType": "PlayerAvatar", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json index b28ae389..f1f72f1d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { AvatarType = Small, SteamId = 256705178760118272 }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FFEB04FF", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Update_GeneratesCorrectJson.verified.json index a1a2e6e2..741ac5f4 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayerAvatarComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 80fb8369..34a6a7d1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_MatchExpected.verified.json index e9f122e0..c39a39f1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index c0c3897c..2ff7d367 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "PlayingCard", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_FromPool_HasDefaultValues.verified.json index c0c3897c..2ff7d367 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "PlayingCard", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json index 55c89ec0..feda4ba3 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json index e3ac25bb..7301babe 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json index f426d56a..ec302f5b 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json index 6731789e..754cfad9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json index 7ea3369b..e89c5029 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json index 5525de34..027b2b4d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json index e722a446..12943906 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json index 40321ecd..945e5087 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json index 758e0c69..c1869a74 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json index 8f1d1189..d3ad8715 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json index 8dbbc1be..498f9a6a 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json index 6731789e..754cfad9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json index 62acd3c1..5a1bed44 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json index 7d801028..25660f00 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json index 1cfdb58b..010b5d7e 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json index 8a995455..c333347c 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json index cef465a7..7dd15909 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json index 55519afd..d9d52074 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json index 55c77e52..5987ef61 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json index 6731789e..754cfad9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json index 62acd3c1..5a1bed44 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json index a0d1ab41..ea5bfdbe 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json index 2098f846..a36484da 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json index 8b6ee5b5..69a334ba 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json index 84e190f9..5bad6538 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json index 1741e129..816ba17d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json index 63ea7485..c7bfa78f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json index e76c4ccb..8b3cbf68 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json index 6731789e..754cfad9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json index 0c043491..3da42983 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json index 7ea3369b..e89c5029 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json index ccd1e1ea..800ff4e2 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json index 6c0a5ed1..5b7d4b08 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json index bab85b11..d2844426 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json index 767592e8..d0c74a51 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json index 90b96a05..a26c20ff 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json index 70254c00..5c287298 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json index c653de4b..6ab4abb0 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json index 783588cf..6bb185b8 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json index f9029b00..ff143ffb 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json index f07b5913..71b3ffd2 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json index 355f774a..8b4628ed 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json index 5b9e42f8..ac266a5f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json index 40573589..fcea7240 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json index 86a562cd..556c9f79 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json index 598f39ae..996f8cd0 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Clubs, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json index aaab6e40..44c94d8d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json index 9915a16a..964ba5ca 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json index 106520bc..d0ae0f20 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json index 07e1b464..a80ea8d6 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json index b44a3205..f1ec341a 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json index 5cdacfbf..2a8c445f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json index cbe67730..7a5e2a27 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json index 1e0edd18..8c8c8550 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json index 7ba17846..c7f0d507 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json index 5f1b1717..f420fb4a 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json index 576deb34..821dc5b0 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json index 20b12bbf..7820b213 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Diamonds, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json index e5bae07f..0b55e4d5 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json index ee1d5f2e..c181cc38 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json index f27ae008..94a59cf1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json index e5f7ae4e..58e4b39d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json index c79111d2..a30ae4d9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json index 12e68e03..36a3be7c 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json index 92d1714e..52e14806 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json index 542049e5..ddca9ffe 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json index dc77ef10..84818020 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json index f9b22ea7..72082af7 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json index fbee0849..1a5b77fd 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json index 3f18fbcb..00130086 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Hearts, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json index c9dedd3e..e2c57df9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json index a3ad45a9..4f454e1d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json index ef59b8d9..e36f917a 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Ace, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json index f369ad7d..c00ece9f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json index d56965db..3c574ccb 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json index ca4ae196..3c154898 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Back, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json index 36f28846..94e316b3 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json index 9f53792c..362c68dc 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json index c8b805bd..9ef42e22 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Joker, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json index 44841032..a3bcb197 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Small }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Small", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json index 07abc42b..df040685 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = SmallTransparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "SmallTransparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json index a8c82262..62015556 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Suit = Spades, Rank = Two, CardType = Transparent }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "CardType": "Transparent", "Color": "#FFA500FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 80fb8369..34a6a7d1 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/PlayingCardComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.6471 0", "fadeIn": 1.5, "material": "assets/content/ui/uibackgroundblur.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 91a97464..b1f5a009 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_MatchExpected.verified.json index d8d8b32e..e8406d3d 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FFEB04FF", "ComponentType": "RawImage", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index f62a5d7e..cd27c9b7 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "ComponentType": "RawImage", "Enabled": true, "Type": "UnityEngine.UI.RawImage" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_FromPool_HasDefaultValues.verified.json index f62a5d7e..cd27c9b7 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "ComponentType": "RawImage", "Enabled": true, "Type": "UnityEngine.UI.RawImage" diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = }.verified.json index 0be45453..1135f79c 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = 789 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = 789 }.verified.json index ec67b5ef..f0da0eff 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = 789 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = 789 }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json index dd69ad4e..6964b634 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = http---example.com-image.png }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = http---example.com-image.png }.verified.json index cf651b2e..d87d07cd 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = http---example.com-image.png }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_GeneratesCorrectJson_row=TheoryRow { Image = http---example.com-image.png }.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = }.verified.json index f397e21e..09801edc 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FFEB04FF", "ComponentType": "RawImage", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = 789 }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = 789 }.verified.json index 8d1bb33c..352bf13f 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = 789 }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = 789 }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FFEB04FF", "ComponentType": "RawImage", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json index 884e1257..70770fb6 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = assets-content-ui-ui.spashscreen.psd }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FFEB04FF", "ComponentType": "RawImage", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = http---example.com-image.png }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = http---example.com-image.png }.verified.json index 70c64fe1..de97bc04 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = http---example.com-image.png }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Image = http---example.com-image.png }.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": false, "Color": "#FFEB04FF", "ComponentType": "RawImage", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 91a97464..b1f5a009 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RawRawImageComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "blocksRaycast": 0, "color": "1 0.9216 0.0157", "fadeIn": 3.5, "material": "assets/content/ui/namefontmaterial.mat", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 712a6d82..6e6d03d4 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,8 +1,8 @@ { - "anchormax": "3.1 4.9", - "anchormin": "1.5 3.7", - "offsetmax": "7.1 8.9", - "offsetmin": "5.5 7.7", + "anchormax": "3.1 5.3", + "anchormin": "1.5 4.1", + "offsetmax": "7.1 9.3", + "offsetmin": "5.5 8.1", "pivot": "1 0", "rotation": 360, "setParent": "newParent", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_MatchExpected.verified.json index a682d003..dd5c92ef 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_AllValues_MatchExpected.verified.json @@ -4,12 +4,12 @@ "ComponentType": "RectTransform", "Enabled": true, "Offset": "(5, 6) (7, 8)", - "OffsetPadding": "0.2 0.8 0.6 0.4", + "OffsetPadding": "0.2 0.4 0.6 0.8", "OffsetScale": "1.2 1.2", "OffsetTranslate": "0.25% 0.75%", "Pivot": "1 0", "Position": "(1, 2) (3, 4)", - "PositionPadding": "0.1 0.7 0.5 0.3", + "PositionPadding": "0.1 0.3 0.5 0.7", "PositionScale": "1.1 1.1", "PositionTranslate": "0.5px 1.5px", "Rotation": "360", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 712a6d82..6e6d03d4 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/RectTransformComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,8 +1,8 @@ { - "anchormax": "3.1 4.9", - "anchormin": "1.5 3.7", - "offsetmax": "7.1 8.9", - "offsetmin": "5.5 7.7", + "anchormax": "3.1 5.3", + "anchormin": "1.5 4.1", + "offsetmax": "7.1 9.3", + "offsetmin": "5.5 8.1", "pivot": "1 0", "rotation": 360, "setParent": "newParent", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 84317280..3f39ab0e 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,4 +1,5 @@ { + "fadeDuration": 1.5, "handleColor": "0 0 0", "handleSprite": "assets/icons/add.png", "highlightColor": "0.502 0 0", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_MatchExpected.verified.json index 05a2c453..96db0736 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,6 +1,7 @@ { "AutoHide": false, "ComponentType": "ScrollBar", + "FadeDuration": 1.5, "HandleColor": "#000000FF", "HandleSprite": "assets/icons/add.png", "HighlightColor": "#800000FF", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index 5e719a3b..eda0ef29 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,6 +1,7 @@ { "AutoHide": false, "ComponentType": "ScrollBar", + "FadeDuration": 0.1, "HandleColor": "#262626FF", "HighlightColor": "#2B2B2BFF", "Invert": false, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_FromPool_HasDefaultValues.verified.json index 5e719a3b..eda0ef29 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,6 +1,7 @@ { "AutoHide": false, "ComponentType": "ScrollBar", + "FadeDuration": 0.1, "HandleColor": "#262626FF", "HighlightColor": "#2B2B2BFF", "Invert": false, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 0a57170a..dc276009 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollBarComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,5 +1,6 @@ { "autoHide": 0, + "fadeDuration": 1.5, "handleColor": "0 0 0", "handleSprite": "assets/icons/add.png", "highlightColor": "0.502 0 0", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = False, Vertical = True }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = False, Vertical = True }.verified.json index 6dea18d6..6cd53443 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = False, Vertical = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = False, Vertical = True }.verified.json @@ -18,6 +18,7 @@ "VerticalScrollbar": { "AutoHide": false, "ComponentType": "ScrollBar", + "FadeDuration": 0.1, "HandleColor": "#00FFFFFF", "HandleSprite": "assets/icons/subtract.png", "HighlightColor": "#00FF00FF", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = False }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = False }.verified.json index 16018797..42779c38 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = False }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = False }.verified.json @@ -13,6 +13,7 @@ "HorizontalScrollbar": { "AutoHide": true, "ComponentType": "ScrollBar", + "FadeDuration": 0.1, "HandleColor": "#008000FF", "HandleSprite": "assets/icons/add.png", "HighlightColor": "#0000FFFF", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = True }.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = True }.verified.json index 1c27c00c..205b771c 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/ScrollViewComponentTests.Component_Theory_AllValues_MatchExpected_row=TheoryRow { Horizontal = True, Vertical = True }.verified.json @@ -13,6 +13,7 @@ "HorizontalScrollbar": { "AutoHide": true, "ComponentType": "ScrollBar", + "FadeDuration": 0.1, "HandleColor": "#008000FF", "HandleSprite": "assets/icons/add.png", "HighlightColor": "#0000FFFF", @@ -30,6 +31,7 @@ "VerticalScrollbar": { "AutoHide": false, "ComponentType": "ScrollBar", + "FadeDuration": 0.1, "HandleColor": "#00FFFFFF", "HandleSprite": "assets/icons/subtract.png", "HighlightColor": "#00FF00FF", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json index 8c65792c..6f04f546 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -1,5 +1,6 @@ { "align": "2", + "blocksRaycast": 0, "color": "0 0.502 0", "fadeIn": 2, "font": "permanentmarker.ttf", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_MatchExpected.verified.json index 102ba5c6..93e762a9 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_MatchExpected.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_MatchExpected.verified.json @@ -1,5 +1,6 @@ { "Align": "UpperRight", + "AllowRaycast": false, "Color": "#008000FF", "ComponentType": "Text", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json index f39d4b07..6213d2aa 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Text", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_FromPool_HasDefaultValues.verified.json index f39d4b07..6213d2aa 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -1,4 +1,5 @@ { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Text", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_Update_GeneratesCorrectJson.verified.json index 8c65792c..6f04f546 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_Update_GeneratesCorrectJson.verified.json +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TextComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -1,5 +1,6 @@ { "align": "2", + "blocksRaycast": 0, "color": "0 0.502 0", "fadeIn": 2, "font": "permanentmarker.ttf", diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json new file mode 100644 index 00000000..874ff312 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_GeneratesCorrectJson.verified.json @@ -0,0 +1,9 @@ +{ + "delay": "1", + "offset": "5 10", + "position": "5", + "text": "text", + "tooltipType": "2", + "type": "Tooltip", + "useCentre": 0 +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_MatchExpected.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_MatchExpected.verified.json new file mode 100644 index 00000000..afc7dfc6 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_MatchExpected.verified.json @@ -0,0 +1,12 @@ +{ + "AllowMultiple": false, + "ComponentType": "ToolTip", + "Delay": "Long", + "Enabled": true, + "Offset": "5 10", + "Position": "TopLeft", + "Text": "text", + "TooltipType": "AlwaysOnTopEmoji", + "Type": "Tooltip", + "UseCenter": false +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json new file mode 100644 index 00000000..a5c9adc6 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_AllValues_ResetToCorrectDefaults.verified.json @@ -0,0 +1,8 @@ +{ + "AllowMultiple": false, + "ComponentType": "ToolTip", + "Enabled": true, + "Offset": "8 8", + "Type": "Tooltip", + "UseCenter": true +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_FromPool_HasDefaultValues.verified.json new file mode 100644 index 00000000..a5c9adc6 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_FromPool_HasDefaultValues.verified.json @@ -0,0 +1,8 @@ +{ + "AllowMultiple": false, + "ComponentType": "ToolTip", + "Enabled": true, + "Offset": "8 8", + "Type": "Tooltip", + "UseCenter": true +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_Update_GeneratesCorrectJson.verified.json b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_Update_GeneratesCorrectJson.verified.json new file mode 100644 index 00000000..874ff312 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Snapshots/TooltipComponentTests.Component_Update_GeneratesCorrectJson.verified.json @@ -0,0 +1,9 @@ +{ + "delay": "1", + "offset": "5 10", + "position": "5", + "text": "text", + "tooltipType": "2", + "type": "Tooltip", + "useCentre": 0 +} \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Sub/CanvasGroupComponentTests.cs b/src/Rust.UiFramework.UnitTests/Components/Sub/CanvasGroupComponentTests.cs new file mode 100644 index 00000000..46eba423 --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Sub/CanvasGroupComponentTests.cs @@ -0,0 +1,5 @@ +using Oxide.Ext.UiFramework.Components; + +namespace Rust.UiFramework.UnitTests.Components.Sub; + +public class CanvasGroupComponentTests() : BasePopulateComponentTests(SubComponentHelpers.PopulateCanvasGroup); \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Sub/MaskComponentTests.cs b/src/Rust.UiFramework.UnitTests/Components/Sub/MaskComponentTests.cs new file mode 100644 index 00000000..51b6c16f --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Sub/MaskComponentTests.cs @@ -0,0 +1,5 @@ +using Oxide.Ext.UiFramework.Components; + +namespace Rust.UiFramework.UnitTests.Components.Sub; + +public class MaskComponentTests() : BasePopulateComponentTests(SubComponentHelpers.PopulateMask); \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Sub/SubComponentHelpers.cs b/src/Rust.UiFramework.UnitTests/Components/Sub/SubComponentHelpers.cs index ddb33f31..c5cefd36 100644 --- a/src/Rust.UiFramework.UnitTests/Components/Sub/SubComponentHelpers.cs +++ b/src/Rust.UiFramework.UnitTests/Components/Sub/SubComponentHelpers.cs @@ -116,4 +116,27 @@ public static void PopulateNeedsMouse(NeedsMouseComponent mouse) { mouse.Enabled = false; } + + public static void PopulateCanvasGroup(CanvasGroupComponent canvas) + { + canvas.Alpha = 0.05f; + canvas.AllowRaycast = false; + canvas.Interactable = false; + canvas.Fade = new UiCanvasGroupFade(0.5f, 0.25f); + } + + public static void PopulateMask(MaskComponent mask) + { + mask.ShowMaskGraphic = false; + } + + public static void PopulateTooltip(TooltipComponent tooltip) + { + tooltip.Text = "text"; + tooltip.TooltipType = CommunityEntity.TooltipType.AlwaysOnTopEmoji; + tooltip.Delay = Tooltip.DelayType.Long; + tooltip.Position = TooltipContainer.PositionMode.TopLeft; + tooltip.Offset = new Vector2(5, 10); + tooltip.UseCenter = false; + } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Components/Sub/TooltipComponentTests.cs b/src/Rust.UiFramework.UnitTests/Components/Sub/TooltipComponentTests.cs new file mode 100644 index 00000000..24ed978c --- /dev/null +++ b/src/Rust.UiFramework.UnitTests/Components/Sub/TooltipComponentTests.cs @@ -0,0 +1,5 @@ +using Oxide.Ext.UiFramework.Components; + +namespace Rust.UiFramework.UnitTests.Components.Sub; + +public class TooltipComponentTests() : BasePopulateComponentTests(SubComponentHelpers.PopulateTooltip); \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/Libraries/Pooling/UiPoolingTests.cs b/src/Rust.UiFramework.UnitTests/Libraries/Pooling/UiPoolingTests.cs index 5171032d..4e26dc54 100644 --- a/src/Rust.UiFramework.UnitTests/Libraries/Pooling/UiPoolingTests.cs +++ b/src/Rust.UiFramework.UnitTests/Libraries/Pooling/UiPoolingTests.cs @@ -1,6 +1,7 @@ using System.Collections.Concurrent; using System.Reflection; using System.Text; +using Oxide.Ext.UiFramework.Builder; using Oxide.Ext.UiFramework.Builder.Cached; using Oxide.Ext.UiFramework.Libraries; using Oxide.Ext.UiFramework.Plugins; @@ -148,7 +149,7 @@ private void BasePoolable_PoolsCorrectly(Type type) private static IEnumerable GetBasePoolables() => GetLoadableTypes(typeof(BasePoolable).Assembly) .Where(t => !t.IsAbstract && !t.ContainsGenericParameters && t.IsSubclassOf(typeof(BasePoolable)) && !IgnoredBasePoolables.Contains(t)); - private static readonly List IgnoredBasePoolables = [typeof(ExecutionData), typeof(CachedUiBuilder)]; + private static readonly List IgnoredBasePoolables = [typeof(ExecutionData), typeof(CachedUiBuilder), typeof(CachedPieMenu)]; private static IEnumerable GetLoadableTypes(Assembly assembly) { diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_FromPool_HasDefaultValues.verified.json index 26db8e5d..80f59590 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_FromPool_HasDefaultValues.verified.json @@ -1,9 +1,11 @@ { "Active": true, "Button": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Button", "Enabled": true, + "Interactable": true, "Type": "UnityEngine.UI.Button" }, "Color": "#FFFFFFFF", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json index 4ab9add7..71e1d4f4 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Close, AddColorBlock = True }.verified.json @@ -4,6 +4,7 @@ "close": "command", "color": "0.502 0.502 0.502", "colorMultiplier": 2, + "disabledColor": "1 0 1", "fadeDuration": 3, "fadeIn": 1.5, "highlightedColor": "0 0 1", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json index 0eaa82da..403e1fda 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_GeneratesCorrectJson_PopulateSetters_row=TheoryRow { ButtonType = Command, AddColorBlock = True }.verified.json @@ -4,6 +4,7 @@ "color": "0.502 0.502 0.502", "colorMultiplier": 2, "command": "command", + "disabledColor": "1 0 1", "fadeDuration": 3, "fadeIn": 1.5, "highlightedColor": "0 0 1", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json index 26db8e5d..80f59590 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -1,9 +1,11 @@ { "Active": true, "Button": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Button", "Enabled": true, + "Interactable": true, "Type": "UnityEngine.UI.Button" }, "Color": "#FFFFFFFF", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json index 26db8e5d..80f59590 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiButtonTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -1,9 +1,11 @@ { "Active": true, "Button": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Button", "Enabled": true, + "Interactable": true, "Type": "UnityEngine.UI.Button" }, "Color": "#FFFFFFFF", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_FromPool_HasDefaultValues.verified.json index 15c4d1d5..ece81a5c 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_FromPool_HasDefaultValues.verified.json @@ -4,10 +4,12 @@ "Enabled": true, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json index 15c4d1d5..ece81a5c 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -4,10 +4,12 @@ "Enabled": true, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json index 15c4d1d5..ece81a5c 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -4,10 +4,12 @@ "Enabled": true, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_FromPool_HasDefaultValues.verified.json index 43d9861f..a34f89e7 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_FromPool_HasDefaultValues.verified.json @@ -6,12 +6,14 @@ "FontSize": 14, "HudNeedsKeyboard": false, "Input": { + "AllowRaycast": true, "AutoFocus": false, "Color": "#FFFFFFFF", "ComponentType": "Input", "Enabled": true, "FontSize": 14, "HudNeedsKeyboard": false, + "Interactable": true, "IsPassword": false, "NeedsKeyboard": false, "ReadOnly": false, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json index 43d9861f..a34f89e7 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -6,12 +6,14 @@ "FontSize": 14, "HudNeedsKeyboard": false, "Input": { + "AllowRaycast": true, "AutoFocus": false, "Color": "#FFFFFFFF", "ComponentType": "Input", "Enabled": true, "FontSize": 14, "HudNeedsKeyboard": false, + "Interactable": true, "IsPassword": false, "NeedsKeyboard": false, "ReadOnly": false, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json index 43d9861f..a34f89e7 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiInputTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -6,12 +6,14 @@ "FontSize": 14, "HudNeedsKeyboard": false, "Input": { + "AllowRaycast": true, "AutoFocus": false, "Color": "#FFFFFFFF", "ComponentType": "Input", "Enabled": true, "FontSize": 14, "HudNeedsKeyboard": false, + "Interactable": true, "IsPassword": false, "NeedsKeyboard": false, "ReadOnly": false, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_FromPool_HasDefaultValues.verified.json index baa3934d..9ee1f5e8 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_FromPool_HasDefaultValues.verified.json @@ -3,10 +3,12 @@ "Color": "#FFFFFFFF", "Enabled": true, "Icon": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "ItemIcon", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json index baa3934d..9ee1f5e8 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -3,10 +3,12 @@ "Color": "#FFFFFFFF", "Enabled": true, "Icon": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "ItemIcon", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json index baa3934d..9ee1f5e8 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiItemIconTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -3,10 +3,12 @@ "Color": "#FFFFFFFF", "Enabled": true, "Icon": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "ItemIcon", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_FromPool_HasDefaultValues.verified.json index b5a0d69f..c7fd264d 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_FromPool_HasDefaultValues.verified.json @@ -4,6 +4,7 @@ "Enabled": true, "FontSize": 14, "Text": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Text", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json index b5a0d69f..c7fd264d 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -4,6 +4,7 @@ "Enabled": true, "FontSize": 14, "Text": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Text", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json index b5a0d69f..c7fd264d 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiLabelTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -4,6 +4,7 @@ "Enabled": true, "FontSize": 14, "Text": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Text", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json index b42fd515..0092e8d5 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json @@ -5,6 +5,7 @@ "FadeIn": 1.5, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#808080FF", "ComponentType": "Image", "Enabled": true, @@ -12,6 +13,7 @@ "FillCenter": true, "ImageType": "Tiled", "Material": "assets/icons/iconmaterial.mat", + "PixelPerUnitMultiplier": 1.0, "Sprite": "assets/icons/authorize.png", "Type": "UnityEngine.UI.Image" }, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json index b42fd515..0092e8d5 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json @@ -5,6 +5,7 @@ "FadeIn": 1.5, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#808080FF", "ComponentType": "Image", "Enabled": true, @@ -12,6 +13,7 @@ "FillCenter": true, "ImageType": "Tiled", "Material": "assets/icons/iconmaterial.mat", + "PixelPerUnitMultiplier": 1.0, "Sprite": "assets/icons/authorize.png", "Type": "UnityEngine.UI.Image" }, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json index 15c4d1d5..ece81a5c 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -4,10 +4,12 @@ "Enabled": true, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json index 15c4d1d5..ece81a5c 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -4,10 +4,12 @@ "Enabled": true, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_FromPool_HasDefaultValues.verified.json index 15c4d1d5..ece81a5c 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPanelTests.Element_FromPool_HasDefaultValues.verified.json @@ -4,10 +4,12 @@ "Enabled": true, "FillCenter": true, "Image": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "Image", "Enabled": true, "FillCenter": true, + "PixelPerUnitMultiplier": 1.0, "Type": "UnityEngine.UI.Image" } } \ No newline at end of file diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json index 3dbec5de..52561351 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Avatar": { + "AllowRaycast": true, "Color": "#808080FF", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json index 3dbec5de..52561351 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Avatar": { + "AllowRaycast": true, "Color": "#808080FF", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json index c431a5c2..03ab48b1 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Avatar": { + "AllowRaycast": true, "AvatarType": "Medium", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json index c431a5c2..03ab48b1 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Avatar": { + "AllowRaycast": true, "AvatarType": "Medium", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_FromPool_HasDefaultValues.verified.json index c431a5c2..03ab48b1 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayerAvatarTests.Element_FromPool_HasDefaultValues.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Avatar": { + "AllowRaycast": true, "AvatarType": "Medium", "ComponentType": "PlayerAvatar", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json index 3cebc9af..fb3a04ef 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateFluent.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Card": { + "AllowRaycast": true, "CardType": "SmallTransparent", "Color": "#808080FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json index 3cebc9af..fb3a04ef 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_MatchExpected_PopulateSetters.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Card": { + "AllowRaycast": true, "CardType": "SmallTransparent", "Color": "#808080FF", "ComponentType": "PlayingCard", diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json index 2605d2ed..42e8e3f5 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Card": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "PlayingCard", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json index 2605d2ed..42e8e3f5 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_AllValues_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Card": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "PlayingCard", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_FromPool_HasDefaultValues.verified.json index 2605d2ed..42e8e3f5 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiPlayingCardTests.Element_FromPool_HasDefaultValues.verified.json @@ -1,6 +1,7 @@ { "Active": true, "Card": { + "AllowRaycast": true, "Color": "#FFFFFFFF", "ComponentType": "PlayingCard", "Enabled": true, diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_FromPool_HasDefaultValues.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_FromPool_HasDefaultValues.verified.json index d3d66e1e..a7763e0d 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_FromPool_HasDefaultValues.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_FromPool_HasDefaultValues.verified.json @@ -2,6 +2,7 @@ "Active": true, "Enabled": true, "RawImage": { + "AllowRaycast": true, "ComponentType": "RawImage", "Enabled": true, "Type": "UnityEngine.UI.RawImage" diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json index d3d66e1e..a7763e0d 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateFluent.verified.json @@ -2,6 +2,7 @@ "Active": true, "Enabled": true, "RawImage": { + "AllowRaycast": true, "ComponentType": "RawImage", "Enabled": true, "Type": "UnityEngine.UI.RawImage" diff --git a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json index d3d66e1e..a7763e0d 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json +++ b/src/Rust.UiFramework.UnitTests/UiElements/Snapshots/UiRawImageTests.Element_Theory_ResetToCorrectDefaults_PopulateSetters.verified.json @@ -2,6 +2,7 @@ "Active": true, "Enabled": true, "RawImage": { + "AllowRaycast": true, "ComponentType": "RawImage", "Enabled": true, "Type": "UnityEngine.UI.RawImage" diff --git a/src/Rust.UiFramework.UnitTests/UiElements/UiButtonTests.cs b/src/Rust.UiFramework.UnitTests/UiElements/UiButtonTests.cs index 8d4e072d..97d42b58 100644 --- a/src/Rust.UiFramework.UnitTests/UiElements/UiButtonTests.cs +++ b/src/Rust.UiFramework.UnitTests/UiElements/UiButtonTests.cs @@ -27,6 +27,7 @@ public record TheoryRow(ButtonType ButtonType, bool AddColorBlock); HighlightedColor = UiColors.Blue, PressedColor = UiColors.Orange, SelectedColor = UiColors.Green, + DisabledColor = UiColors.Magenta, ColorMultiplier = 2f, FadeDuration = 3f }; @@ -69,7 +70,7 @@ private static void PopulateSetters(UiButton button, TheoryRow row) button.ButtonType = row.ButtonType; if(row.AddColorBlock) { - button.AddColorBlock(ColorBlock.HighlightedColor, ColorBlock.PressedColor, ColorBlock.SelectedColor, ColorBlock.ColorMultiplier, ColorBlock.FadeDuration); + button.AddColorBlock(ColorBlock.HighlightedColor, ColorBlock.PressedColor, ColorBlock.SelectedColor, ColorBlock.DisabledColor, ColorBlock.ColorMultiplier, ColorBlock.FadeDuration); } } From bc6d8f06042510101bb7a4dd479033a8e75e944a Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Sun, 19 Jul 2026 10:37:35 -0500 Subject: [PATCH 18/21] Fixed PieMenuBuilder missing EnterPool --- .../Builder/PieMenu/PieMenuItemBuilder.cs | 97 +++++++++++-------- 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs b/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs index fb51eab5..ea4f842f 100644 --- a/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs +++ b/src/Rust.UIFramework/Builder/PieMenu/PieMenuItemBuilder.cs @@ -7,123 +7,136 @@ namespace Oxide.Ext.UiFramework.Builder; public class PieMenuItemBuilder : BasePoolable { - public string Name; - public string Description; - public string Command; - public string Image; - public bool Disabled; - public bool Selected; - public int Order; - public PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption ColorMode; - public UiColor Color; - public string NextCommand; - public string PrevCommand; - public string DisabledCommand; + private string _name; + private string _description; + private string _command; + private string _image; + private bool _disabled; + private bool _selected; + private int _order; + private PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption _colorMode; + private UiColor _color; + private string _nextCommand; + private string _prevCommand; + private string _disabledCommand; public static PieMenuItemBuilder Create(IUiFrameworkPlugin plugin) => plugin.PluginPool.Get().Init(); - public PieMenuItemBuilder Init() - { - return this; - } + public PieMenuItemBuilder Init() => this; public PieMenuItemBuilder SetName(string name) { - Name = name; + _name = name; return this; } public PieMenuItemBuilder SetDescription(string description) { - Description = description; + _description = description; return this; } public PieMenuItemBuilder SetCommand(string command) { - Command = command; + _command = command; return this; } public PieMenuItemBuilder SetImage(string image) { - Image = image; + _image = image; return this; } public PieMenuItemBuilder SetDisabled(bool disabled) { - Disabled = disabled; + _disabled = disabled; return this; } public PieMenuItemBuilder SetSelected(bool selected) { - Selected = selected; + _selected = selected; return this; } public PieMenuItemBuilder SetOrder(int order) { - Order = order; + _order = order; return this; } public PieMenuItemBuilder SetColorMode(PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption colorMode) { - ColorMode = colorMode; + _colorMode = colorMode; return this; } public PieMenuItemBuilder SetColor(UiColor color) { - Color = color; + _color = color; return this; } public PieMenuItemBuilder SetNextCommand(string command) { - NextCommand = command; + _nextCommand = command; return this; } public PieMenuItemBuilder SetPreviousCommand(string command) { - PrevCommand = command; + _prevCommand = command; return this; } public PieMenuItemBuilder SetDisabledCommand(string command) { - DisabledCommand = command; + _disabledCommand = command; return this; } public CustomPieMenu Build() { CustomPieMenu menu = Facepunch.Pool.Get(); - menu.name = Name; - menu.description = Description; - menu.command = Command; - menu.disabled = Disabled; - menu.selected = Selected; - menu.order = Order; - menu.colorMode = (int)ColorMode; - menu.color = Color; - menu.nextCommand = NextCommand; - menu.prevCommand = PrevCommand; - menu.disabledCommand = DisabledCommand; - if (!string.IsNullOrEmpty(Image)) + menu.name = _name; + menu.description = _description; + menu.command = _command; + menu.disabled = _disabled; + menu.selected = _selected; + menu.order = _order; + menu.colorMode = (int)_colorMode; + menu.color = _color; + menu.nextCommand = _nextCommand; + menu.prevCommand = _prevCommand; + menu.disabledCommand = _disabledCommand; + if (!string.IsNullOrEmpty(_image)) { - if (uint.TryParse(Image, out uint imageId)) + if (uint.TryParse(_image, out uint imageId)) { menu.imageId = imageId; } else { - menu.sprite = Image; + menu.sprite = _image; } } return menu; } + + protected override void EnterPool() + { + _name = null; + _description = null; + _command = null; + _image = null; + _disabled = false; + _selected = false; + _order = 0; + _colorMode = PieMenu.MenuOption.ColorMode.PieMenuSpriteColorOption.CustomColor; + _color = UiColors.Clear; + _nextCommand = null; + _prevCommand = null; + _disabledCommand = null; + } } \ No newline at end of file From 97632a03382e3cd810c1a728d71cb9e978fe0f02 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Sun, 19 Jul 2026 10:54:01 -0500 Subject: [PATCH 19/21] UI Debug cleanup --- .../Builder/UiDebug/UiDebugHandler.cs | 15 +++++++++------ .../Builder/UiDebug/UiDebugOptions.cs | 11 ++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Rust.UIFramework/Builder/UiDebug/UiDebugHandler.cs b/src/Rust.UIFramework/Builder/UiDebug/UiDebugHandler.cs index d8665cbc..e9b9cdcf 100644 --- a/src/Rust.UIFramework/Builder/UiDebug/UiDebugHandler.cs +++ b/src/Rust.UIFramework/Builder/UiDebug/UiDebugHandler.cs @@ -12,13 +12,19 @@ internal static class UiDebugHandler public static void HandleDebug(IUiFrameworkPlugin plugin, JsonFrameworkWriter writer, in UiDebugOptions options) { WriteToStream(plugin, writer, options); - WriteToConsole(writer.ToString(), options); + if (options.Mode.HasFlag(UiDebugModes.Console)) + { + WriteToConsole(writer.ToString(), options); + } } public static void HandleDebug(IUiFrameworkPlugin plugin, byte[] bytes, in UiDebugOptions options) { WriteToStream(plugin, bytes, options); - WriteToConsole(Encoding.UTF8.GetString(bytes), options); + if (options.Mode.HasFlag(UiDebugModes.Console)) + { + WriteToConsole(Encoding.UTF8.GetString(bytes), options); + } } public static void WriteToStream(IUiFrameworkPlugin plugin, JsonFrameworkWriter writer, in UiDebugOptions options) @@ -50,9 +56,6 @@ private static FileStream GetDebugStream(IUiFrameworkPlugin plugin, in UiDebugOp public static void WriteToConsole(string json, in UiDebugOptions options) { - if (options.Mode.HasFlag(UiDebugModes.Console)) - { - UiFrameworkExtension.GlobalLogger.Debug($"{options.Identifier}:\n{new string('=', 20)}\n{json}\n{new string('=', 20)}"); - } + UiFrameworkExtension.GlobalLogger.Debug($"{options.Identifier}:\n{new string('=', 20)}\n{json}\n{new string('=', 20)}"); } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Builder/UiDebug/UiDebugOptions.cs b/src/Rust.UIFramework/Builder/UiDebug/UiDebugOptions.cs index c460d5ac..06fc7268 100644 --- a/src/Rust.UIFramework/Builder/UiDebug/UiDebugOptions.cs +++ b/src/Rust.UIFramework/Builder/UiDebug/UiDebugOptions.cs @@ -2,17 +2,14 @@ namespace Oxide.Ext.UiFramework.Builder; -public readonly struct UiDebugOptions(string identifier, UiDebugModes modes = UiDebugModes.File) +public readonly record struct UiDebugOptions(string Identifier, UiDebugModes Mode = UiDebugModes.File) { - public readonly string Identifier = identifier; - public readonly UiDebugModes Mode = modes; - [Pure] - public UiDebugOptions WithModes(UiDebugModes mode) => new(Identifier, mode); + public UiDebugOptions WithModes(UiDebugModes mode) => this with { Mode = mode }; [Pure] - public UiDebugOptions NotWithModes(UiDebugModes modes) => new(Identifier, Mode & ~modes); + public UiDebugOptions NotWithModes(UiDebugModes modes) => this with { Mode = Mode & ~modes }; [Pure] - public UiDebugOptions WithIdentifier(string identifier) => new(identifier, Mode); + public UiDebugOptions WithIdentifier(string identifier) => this with { Identifier = identifier }; } \ No newline at end of file From 81be7e56dfe01f9f283735ee0c5f7c782c3027b2 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Sun, 19 Jul 2026 10:57:22 -0500 Subject: [PATCH 20/21] Removed Oxide AddUi Harmony Patch --- .../Config/UiHarmonyConfig.cs | 4 +- .../Harmony/CuiHelper_AddUi_Patch.cs | 74 ------------------- src/Rust.UIFramework/Harmony/UiHarmony.cs | 2 +- .../Plugins/Core/UiFrameworkPlugin.cs | 28 ------- .../Sending/OxideCuiElementsRequest.cs | 33 --------- .../Threading/Sending/OxideCuiJsonRequest.cs | 31 -------- 6 files changed, 2 insertions(+), 170 deletions(-) delete mode 100644 src/Rust.UIFramework/Harmony/CuiHelper_AddUi_Patch.cs delete mode 100644 src/Rust.UIFramework/Threading/Sending/OxideCuiElementsRequest.cs delete mode 100644 src/Rust.UIFramework/Threading/Sending/OxideCuiJsonRequest.cs diff --git a/src/Rust.UIFramework/Config/UiHarmonyConfig.cs b/src/Rust.UIFramework/Config/UiHarmonyConfig.cs index 07dd5272..12bfa8e3 100644 --- a/src/Rust.UIFramework/Config/UiHarmonyConfig.cs +++ b/src/Rust.UIFramework/Config/UiHarmonyConfig.cs @@ -5,7 +5,5 @@ namespace Oxide.Ext.UiFramework.Config; internal class UiHarmonyConfig { - [DefaultValue(false)] - [JsonProperty("Harmony Patch Oxide Add UI Method")] - public bool PatchAddUiMethod { get; set; } = false; + } \ No newline at end of file diff --git a/src/Rust.UIFramework/Harmony/CuiHelper_AddUi_Patch.cs b/src/Rust.UIFramework/Harmony/CuiHelper_AddUi_Patch.cs deleted file mode 100644 index dbbea97b..00000000 --- a/src/Rust.UIFramework/Harmony/CuiHelper_AddUi_Patch.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections.Generic; -using HarmonyLib; -using Oxide.Core; -using Oxide.Ext.UiFramework.Builder; -using Oxide.Ext.UiFramework.Config; -using Oxide.Ext.UiFramework.Threading; -using Oxide.Game.Rust.Cui; - -namespace Oxide.Ext.UiFramework.Harmony; - -internal static class CuiHelper_AddUi_Patch -{ - private static readonly ToggleablePatch[] Patches = - [ - new(typeof(CuiHelper).GetMethod(nameof(CuiHelper.AddUi), [typeof(BasePlayer), typeof(List)]), - HarmonyPatchType.Prefix, - new HarmonyMethod(typeof(CuiHelper_AddUi_Patch), nameof(CuiHelper_AddUi_Prefix_Elements))), - - new(typeof(CuiHelper).GetMethod(nameof(CuiHelper.AddUi), [typeof(BasePlayer), typeof(string)]), - HarmonyPatchType.Prefix, - new HarmonyMethod(typeof(CuiHelper_AddUi_Patch), nameof(CuiHelper_AddUi_Prefix_Json))) - ]; - - internal static void Patch() - { - if (UiFrameworkConfig.Instance.Harmony.PatchAddUiMethod) - { - foreach (ToggleablePatch patch in Patches) - { - patch.Patch(); - } - } - } - - private static void Unpatch() - { - foreach (ToggleablePatch patch in Patches) - { - patch.Unpatch(); - } - } - - internal static void ToggleState(bool enabled) - { - if (enabled) - { - Patch(); - } - else - { - Unpatch(); - } - } - - private static bool CuiHelper_AddUi_Prefix_Elements(BasePlayer player, List elements) - { - if (player?.net == null || Interface.CallHook("CanUseUI", player, elements) != null) - { - return false; - } - OxideCuiElementsRequest.Create(elements, SendInfoBuilder.Get(player)).Enqueue(); - return false; - } - - private static bool CuiHelper_AddUi_Prefix_Json(BasePlayer player, string json) - { - if (player?.net == null || Interface.CallHook("CanUseUI", player, json) != null) - { - return false; - } - OxideCuiJsonRequest.Create(json, SendInfoBuilder.Get(player)).Enqueue(); - return false; - } -} \ No newline at end of file diff --git a/src/Rust.UIFramework/Harmony/UiHarmony.cs b/src/Rust.UIFramework/Harmony/UiHarmony.cs index 8dd6f250..ef4bbed9 100644 --- a/src/Rust.UIFramework/Harmony/UiHarmony.cs +++ b/src/Rust.UIFramework/Harmony/UiHarmony.cs @@ -13,6 +13,6 @@ static UiHarmony() internal static void Initialize() { - CuiHelper_AddUi_Patch.Patch(); + } } \ No newline at end of file diff --git a/src/Rust.UIFramework/Plugins/Core/UiFrameworkPlugin.cs b/src/Rust.UIFramework/Plugins/Core/UiFrameworkPlugin.cs index 7822a6fe..704d9e76 100644 --- a/src/Rust.UIFramework/Plugins/Core/UiFrameworkPlugin.cs +++ b/src/Rust.UIFramework/Plugins/Core/UiFrameworkPlugin.cs @@ -40,7 +40,6 @@ internal void Init() { #if SERVER AddCovalenceCommand(["uif.version"], nameof(VersionCommand), "uif.version"); - AddCovalenceCommand(["uif.harmony.oxide.addui"], nameof(HarmonyAddUiPatch), "uif.harmony.oxide.addui"); foreach (KeyValuePair> language in Localization.Languages) { @@ -188,33 +187,6 @@ private void VersionCommand(IPlayer player) Chat(player, LangKeys.Version, UiFrameworkExtension.Instance.Version); } - [HookMethod(nameof(HarmonyAddUiPatch))] - private void HarmonyAddUiPatch(IPlayer player, string cmd, string[] args) - { - if (args.Length == 0) - { - Chat(player, LangKeys.Harmony.Patch.AddUi.Show, GetLang(UiFrameworkConfig.Instance.Harmony.PatchAddUiMethod ? LangKeys.Enabled : LangKeys.Disabled)); - return; - } - - if (!args[0].TryParseBool(out bool state)) - { - Chat(player, LangKeys.Harmony.Patch.AddUi.InvalidArg, args[0]); - return; - } - - if (state == UiFrameworkConfig.Instance.Harmony.PatchAddUiMethod) - { - Chat(player, LangKeys.Harmony.Patch.AddUi.Show, GetLang(state ? LangKeys.Enabled : LangKeys.Disabled)); - return; - } - - UiFrameworkConfig.Instance.Harmony.PatchAddUiMethod = state; - CuiHelper_AddUi_Patch.ToggleState(state); - Chat(player, LangKeys.Harmony.Patch.AddUi.Set, GetLang(state ? LangKeys.Enabled : LangKeys.Disabled)); - UiFrameworkConfig.Instance.OnDataChanged(); - } - [HookMethod(nameof(SetAnimationEnabled))] private void SetAnimationEnabled(IPlayer player, string cmd, string[] args) { diff --git a/src/Rust.UIFramework/Threading/Sending/OxideCuiElementsRequest.cs b/src/Rust.UIFramework/Threading/Sending/OxideCuiElementsRequest.cs deleted file mode 100644 index 023801cd..00000000 --- a/src/Rust.UIFramework/Threading/Sending/OxideCuiElementsRequest.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Collections.Generic; -using Network; -using Oxide.Ext.UiFramework.Helpers; -using Oxide.Ext.UiFramework.Libraries; -using Oxide.Game.Rust.Cui; - -namespace Oxide.Ext.UiFramework.Threading; - -internal class OxideCuiElementsRequest : BaseUiRequest -{ - private List _elements; - - public static OxideCuiElementsRequest Create(List elements, SendInfo send) => UiPool.Internal.Get().Init(elements, send); - - private OxideCuiElementsRequest Init(List elements, SendInfo send) - { - base.Init(send); - _elements = elements; - return this; - } - - public override ProcessResult Process() - { - RpcFunctions.SendAddUi(Send, CuiHelper.ToJson(_elements)); - return ProcessResult.Success; - } - - protected override void EnterPool() - { - base.EnterPool(); - _elements = null; - } -} \ No newline at end of file diff --git a/src/Rust.UIFramework/Threading/Sending/OxideCuiJsonRequest.cs b/src/Rust.UIFramework/Threading/Sending/OxideCuiJsonRequest.cs deleted file mode 100644 index 60a01fbd..00000000 --- a/src/Rust.UIFramework/Threading/Sending/OxideCuiJsonRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Network; -using Oxide.Ext.UiFramework.Helpers; -using Oxide.Ext.UiFramework.Libraries; - -namespace Oxide.Ext.UiFramework.Threading; - -internal class OxideCuiJsonRequest : BaseUiRequest -{ - private string _json; - - public static OxideCuiJsonRequest Create(string json, SendInfo send) => UiPool.Internal.Get().Init(json, send); - - private OxideCuiJsonRequest Init(string json, SendInfo send) - { - base.Init(send); - _json = json; - return this; - } - - public override ProcessResult Process() - { - RpcFunctions.SendAddUi(Send, _json); - return ProcessResult.Success; - } - - protected override void EnterPool() - { - base.EnterPool(); - _json = null; - } -} \ No newline at end of file From 14e09c1a87deaab6ab0eb3c15e44f65e8e8aa1b3 Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Tue, 21 Jul 2026 07:20:11 -0500 Subject: [PATCH 21/21] Removed RectMask2D ComponentType --- src/Rust.UIFramework/Components/ComponentType.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Rust.UIFramework/Components/ComponentType.cs b/src/Rust.UIFramework/Components/ComponentType.cs index 4957e78c..7a14c52e 100644 --- a/src/Rust.UIFramework/Components/ComponentType.cs +++ b/src/Rust.UIFramework/Components/ComponentType.cs @@ -26,9 +26,8 @@ public enum ComponentType : ushort ContentSizeFitter = 109, LayoutElement = 110, CanvasGroup = 111, - RectMask2D = 112, - Mask = 113, - ToolTip = 114, + Mask = 112, + ToolTip = 113, ColorBlock = 1000, ScrollBar = 1001,