Create InvertedVSplitContainer node type
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://kvnhndc3l6ih
|
||||
Reference in New Issue
Block a user