using Godot; using System; public partial class ChatLogContainer : VBoxContainer { private const float MaxChatLogContainerSize = 220; private Vector2 _initialPosition; // Called when the node enters the scene tree for the first time. public override void _Ready() { _initialPosition = Position; } // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _PhysicsProcess(double delta) { if (Size.Y > MaxChatLogContainerSize) { Position = _initialPosition + new Vector2(Size.X, MaxChatLogContainerSize) - Size; } } }