Editor/Attack/StartingPanel.cs
using Editor;
using Sandbox;
namespace MANIFOLD.BHLib.Editor {
public class StartingPanel : Widget {
private readonly AttackEditor editor;
public StartingPanel(AttackEditor editor) : base(editor) {
this.editor = editor;
HorizontalSizeMode = VerticalSizeMode = SizeMode.CanShrink;
Layout = Layout.Column();
Layout.Margin = 24;
Layout.Spacing = 4;
Layout.Alignment = TextFlag.Center;
Layout.Add(new Label("An object with an AttackCaster needs to be selected."));
Layout.Add(new Label("The caster also needs at least one attack to edit."));
Layout.AddSpacingCell(20);
Layout.Add(new Button("Refresh", "refresh") { Clicked = editor.ScanSelectedObject });
}
protected override void OnPaint() {
base.OnPaint();
Paint.SetBrushAndPen(Theme.BaseAlt);
Paint.DrawRect(LocalRect);
}
}
}