This commit is contained in:
kmyuhkyuk
2026-03-23 08:59:25 +08:00
parent 5a9b05288a
commit 06727be024
2 changed files with 5 additions and 5 deletions
@@ -32,13 +32,13 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
base._Ready(); base._Ready();
} }
public void ShowWithGlobalPosition(Vector2 position) public void Show(Vector2 globalPosition)
{ {
_tween?.Kill(); _tween?.Kill();
Modulate = new Color(Colors.White); Modulate = new Color(Colors.White);
GlobalPosition = position; GlobalPosition = globalPosition;
_tween = GetTree().CreateTween(); _tween = GetTree().CreateTween();
@@ -193,7 +193,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
!string.IsNullOrEmpty(_ipAddressLabel.Text)) !string.IsNullOrEmpty(_ipAddressLabel.Text))
{ {
DisplayServer.ClipboardSet(_ipAddressLabel.Text); DisplayServer.ClipboardSet(_ipAddressLabel.Text);
_copiedLabel.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition); _copiedLabel.Show(inputEventMouseButton.GlobalPosition);
} }
}; };
@@ -210,7 +210,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
!string.IsNullOrEmpty(_ipv6AddressLabel.Text)) !string.IsNullOrEmpty(_ipv6AddressLabel.Text))
{ {
DisplayServer.ClipboardSet(_ipv6AddressLabel.Text); DisplayServer.ClipboardSet(_ipv6AddressLabel.Text);
_copiedLabel.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition); _copiedLabel.Show(inputEventMouseButton.GlobalPosition);
} }
}; };
@@ -315,7 +315,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
!string.IsNullOrEmpty(ipAddressLabel.Text)) !string.IsNullOrEmpty(ipAddressLabel.Text))
{ {
DisplayServer.ClipboardSet(ipAddressLabel.Text); DisplayServer.ClipboardSet(ipAddressLabel.Text);
_copiedLabel?.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition); _copiedLabel?.Show(inputEventMouseButton.GlobalPosition);
} }
}; };