From c79cd82fd4070836d19658cab8477620cb52d564 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 30 Dec 2024 18:59:45 -0600 Subject: [PATCH] Fix code warnings. --- .../CustomEditors/Editors/ControlReferenceEditor.cs | 2 +- Source/Engine/UI/ControlReference.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs b/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs index c93a2aff3..8a0595a0f 100644 --- a/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs +++ b/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs @@ -18,7 +18,7 @@ namespace FlaxEditor.CustomEditors.Editors; public class UIControlRefPickerControl : Control { private Type _controlType; - public UIControl _value; + private UIControl _value; private ActorTreeNode _linkedTreeNode; private string _valueName; private bool _supportsPickDropDown; diff --git a/Source/Engine/UI/ControlReference.cs b/Source/Engine/UI/ControlReference.cs index b05f73682..a708e48fa 100644 --- a/Source/Engine/UI/ControlReference.cs +++ b/Source/Engine/UI/ControlReference.cs @@ -86,6 +86,17 @@ public struct ControlReference : IControlReference where T : Control _uiControl = null; } + /// + /// The implicit operator for the Control. + /// + /// The ControlReference + /// The Control. public static implicit operator T(ControlReference reference) => reference.Control; + + /// + /// The implicit operator for the UIControl + /// + /// The ControlReference + /// The UIControl. public static implicit operator UIControl(ControlReference reference) => reference.UIControl; }