using System; using UnityEditor.UIElements; using UnityEngine.UIElements; namespace io.github.hatayama.uLoopMCP { /// /// UI section for server start/stop controls and port configuration. /// Part of McpEditorWindowUI's component hierarchy. /// public class ServerControlsSection { private readonly IntegerField _portField; private readonly VisualElement _portWarningContainer; private readonly Label _portWarningLabel; private readonly Button _toggleServerButton; private ServerControlsData _lastData; public event Action OnToggleServer; public event Action OnPortChanged; public ServerControlsSection(VisualElement root) { _portField = root.Q("port-field"); _portWarningContainer = root.Q("port-warning-container"); _portWarningLabel = root.Q