From 5a9b05288a6d75f04b213e6d9f612ec630406d6b Mon Sep 17 00:00:00 2001 From: kmyuhkyuk <72241714+kmyuhkyuk@users.noreply.github.com> Date: Mon, 23 Mar 2026 08:58:30 +0800 Subject: [PATCH] Update --- .../Components/CopiedLabel.cs | 2 +- .../Components/IPAddressInfoPanel.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SlayTheSpire2.LAN.Multiplayer/Components/CopiedLabel.cs b/SlayTheSpire2.LAN.Multiplayer/Components/CopiedLabel.cs index a172f91..107837a 100644 --- a/SlayTheSpire2.LAN.Multiplayer/Components/CopiedLabel.cs +++ b/SlayTheSpire2.LAN.Multiplayer/Components/CopiedLabel.cs @@ -32,7 +32,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components base._Ready(); } - public void ShowWithPosition(Vector2 position) + public void ShowWithGlobalPosition(Vector2 position) { _tween?.Kill(); diff --git a/SlayTheSpire2.LAN.Multiplayer/Components/IPAddressInfoPanel.cs b/SlayTheSpire2.LAN.Multiplayer/Components/IPAddressInfoPanel.cs index a9da405..19b2140 100644 --- a/SlayTheSpire2.LAN.Multiplayer/Components/IPAddressInfoPanel.cs +++ b/SlayTheSpire2.LAN.Multiplayer/Components/IPAddressInfoPanel.cs @@ -193,7 +193,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components !string.IsNullOrEmpty(_ipAddressLabel.Text)) { DisplayServer.ClipboardSet(_ipAddressLabel.Text); - _copiedLabel.ShowWithPosition(inputEventMouseButton.GlobalPosition); + _copiedLabel.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition); } }; @@ -210,7 +210,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components !string.IsNullOrEmpty(_ipv6AddressLabel.Text)) { DisplayServer.ClipboardSet(_ipv6AddressLabel.Text); - _copiedLabel.ShowWithPosition(inputEventMouseButton.GlobalPosition); + _copiedLabel.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition); } }; @@ -304,6 +304,8 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components ipAddressLabel.SetTextAutoSize($"{localIPAddress}:{port}"); + _localIPAddressContainer.AddChildSafely(ipAddressLabel); + ipAddressLabel.GuiInput += inputEvent => { if (inputEvent is InputEventMouseButton @@ -313,12 +315,10 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components !string.IsNullOrEmpty(ipAddressLabel.Text)) { DisplayServer.ClipboardSet(ipAddressLabel.Text); - _copiedLabel?.ShowWithPosition(inputEventMouseButton.GlobalPosition); + _copiedLabel?.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition); } }; - _localIPAddressContainer.AddChildSafely(ipAddressLabel); - hasLocalIPAddress = true; } }