Create InvertedVSplitContainer node type

This commit is contained in:
Matt Parker
2025-08-27 19:48:09 +10:00
parent e2d8fdddb3
commit cff8876446
2 changed files with 29 additions and 0 deletions

View File

@@ -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;
}
}
}

View File

@@ -0,0 +1 @@
uid://kvnhndc3l6ih