From 1dbecc3ff10bc7a2bb0398d7a9a0bd68c4b79c7a Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Tue, 3 Oct 2023 19:30:57 +0200 Subject: [PATCH] Add C# compat members for 4.2 changes --- .../mono/glue/GodotSharp/GodotSharp/Compat.cs | 102 +++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs b/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs index 48b47b166a8b..bf8b2f10dc7d 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs @@ -7,6 +7,8 @@ using System.ComponentModel; namespace Godot; +#pragma warning disable CS1734 // XML comment on 'X' has a paramref tag for 'Y', but there is no parameter by that name. + partial class AnimationNode { /// @@ -24,6 +26,44 @@ partial class AnimationNode } } +partial class AnimationPlayer +{ + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public AnimationMethodCallMode MethodCallMode + { + get => (AnimationMethodCallMode)CallbackModeMethod; + set => CallbackModeMethod = (AnimationCallbackModeMethod)value; + } + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public bool PlaybackActive + { + get => Active; + set => Active = value; + } + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public AnimationProcessCallback PlaybackProcessMode + { + get => (AnimationProcessCallback)CallbackModeProcess; + set => CallbackModeProcess = (AnimationCallbackModeProcess)value; + } +} + +partial class AnimationTree +{ + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public AnimationProcessCallback ProcessCallback + { + get => (AnimationProcessCallback)CallbackModeProcess; + set => CallbackModeProcess = (AnimationCallbackModeProcess)value; + } +} + partial class CodeEdit { /// @@ -36,7 +76,7 @@ partial class CodeEdit partial class Geometry3D { - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static Vector3[] SegmentIntersectsConvex(Vector3 from, Vector3 to, Godot.Collections.Array planes) { @@ -44,6 +84,51 @@ partial class Geometry3D } } +partial class GraphEdit +{ + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public bool ArrangeNodesButtonHidden + { + get => !ShowArrangeButton; + set => ShowArrangeButton = !value; + } + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public HBoxContainer GetZoomHBox() + { + return GetMenuHBox(); + } + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public int SnapDistance + { + get => SnappingDistance; + set => SnappingDistance = value; + } + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public bool UseSnap + { + get => SnappingEnabled; + set => SnappingEnabled = value; + } +} + +partial class GraphNode +{ + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public event Action CloseRequest + { + add => DeleteRequest += value; + remove => DeleteRequest -= value; + } +} + partial class MeshInstance3D { /// @@ -108,6 +193,19 @@ partial class SurfaceTool } } +partial class TileMap +{ + /// + /// The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public int CellQuadrantSize + { + get => RenderingQuadrantSize; + set => RenderingQuadrantSize = value; + } +} + partial class Tree { /// @@ -127,3 +225,5 @@ partial class UndoRedo CreateAction(name, mergeMode, backwardUndoOps: false); } } + +#pragma warning restore CS1734