diff --git a/src/SharpIDE.Godot/Features/CustomControls/InvertedVSplitContainer.cs b/src/SharpIDE.Godot/Features/CustomControls/InvertedVSplitContainer.cs new file mode 100644 index 0000000..5c648f0 --- /dev/null +++ b/src/SharpIDE.Godot/Features/CustomControls/InvertedVSplitContainer.cs @@ -0,0 +1,28 @@ +using Godot; + +namespace SharpIDE.Godot.Features.CustomControls; + +[GlobalClass, Tool] +public partial class InvertedVSplitContainer : VSplitContainer +{ + [Export] + private int _invertedOffset = 200; + + public override void _Ready() + { + Dragged += OnDragged; + } + + private void OnDragged(long offset) + { + _invertedOffset = (int)Size.Y - SplitOffset; + } + + public override void _Notification(int what) + { + if (what == NotificationResized) + { + SplitOffset = (int)Size.Y - _invertedOffset; + } + } +} \ No newline at end of file diff --git a/src/SharpIDE.Godot/Features/CustomControls/InvertedVSplitContainer.cs.uid b/src/SharpIDE.Godot/Features/CustomControls/InvertedVSplitContainer.cs.uid new file mode 100644 index 0000000..7ac5634 --- /dev/null +++ b/src/SharpIDE.Godot/Features/CustomControls/InvertedVSplitContainer.cs.uid @@ -0,0 +1 @@ +uid://kvnhndc3l6ih