Fetch the player name from itch.io

This commit is contained in:
Matthias Mailänder
2024-01-06 16:32:15 +01:00
committed by Gustas
parent bd809e5af7
commit ff276b4877
3 changed files with 114 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var nameTextfield = widget.Get<TextFieldWidget>("PLAYERNAME");
nameTextfield.IsDisabled = () => worldRenderer.World.Type != WorldType.Shellmap;
nameTextfield.Text = Settings.SanitizedPlayerName(ps.Name);
var itchIntegration = modData.Manifest.Get<ItchIntegration>();
itchIntegration.GetPlayerName(name => nameTextfield.Text = Settings.SanitizedPlayerName(name));
nameTextfield.OnLoseFocus = () =>
{
if (escPressed)