Newer
Older
DungeonShooting / DungeonShooting_Godot / editor / src / IdePanel.cs
@小李xl 小李xl on 21 Sep 2022 396 bytes 编写代码ide样式
using Godot;

namespace Editor
{
	public class IdePanel : Control
	{
		private Vector2 StartScale;
		private Control ScalePanel;
		
		public override void _Ready()
		{
			ScalePanel = GetNode<Control>("ScalePanel");
			StartScale = ScalePanel.RectScale;
		}

		private void _on_ScalePanel_resized()
		{
			if (ScalePanel != null)
			{
				ScalePanel.SetSize(RectSize / StartScale);
			}
		}
	}
}