Update
This commit is contained in:
@@ -32,7 +32,7 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
|
|||||||
base._Ready();
|
base._Ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowWithPosition(Vector2 position)
|
public void ShowWithGlobalPosition(Vector2 position)
|
||||||
{
|
{
|
||||||
_tween?.Kill();
|
_tween?.Kill();
|
||||||
|
|
||||||
|
|||||||
@@ -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.ShowWithPosition(inputEventMouseButton.GlobalPosition);
|
_copiedLabel.ShowWithGlobalPosition(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.ShowWithPosition(inputEventMouseButton.GlobalPosition);
|
_copiedLabel.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -304,6 +304,8 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
|
|||||||
|
|
||||||
ipAddressLabel.SetTextAutoSize($"{localIPAddress}:{port}");
|
ipAddressLabel.SetTextAutoSize($"{localIPAddress}:{port}");
|
||||||
|
|
||||||
|
_localIPAddressContainer.AddChildSafely(ipAddressLabel);
|
||||||
|
|
||||||
ipAddressLabel.GuiInput += inputEvent =>
|
ipAddressLabel.GuiInput += inputEvent =>
|
||||||
{
|
{
|
||||||
if (inputEvent is InputEventMouseButton
|
if (inputEvent is InputEventMouseButton
|
||||||
@@ -313,12 +315,10 @@ namespace SlayTheSpire2.LAN.Multiplayer.Components
|
|||||||
!string.IsNullOrEmpty(ipAddressLabel.Text))
|
!string.IsNullOrEmpty(ipAddressLabel.Text))
|
||||||
{
|
{
|
||||||
DisplayServer.ClipboardSet(ipAddressLabel.Text);
|
DisplayServer.ClipboardSet(ipAddressLabel.Text);
|
||||||
_copiedLabel?.ShowWithPosition(inputEventMouseButton.GlobalPosition);
|
_copiedLabel?.ShowWithGlobalPosition(inputEventMouseButton.GlobalPosition);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_localIPAddressContainer.AddChildSafely(ipAddressLabel);
|
|
||||||
|
|
||||||
hasLocalIPAddress = true;
|
hasLocalIPAddress = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user