Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Fix guest textbox field
Browse files Browse the repository at this point in the history
  • Loading branch information
misandrie committed May 26, 2024
1 parent 48b0a6e commit c25049d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions SS14.Launcher/ViewModels/MainWindowTabs/OptionsTabViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public OptionsTabViewModel()

Persist.UpdateLauncherConfig();
SetTempHwid();
SetTempGuestUsername();
}

#if RELEASE
Expand Down Expand Up @@ -324,6 +325,11 @@ private void SetTempHwid()
_hwidString = _loginManager.ActiveAccount != null ? _loginManager.ActiveAccount.LoginInfo.HWID : "";
}

private void SetTempGuestUsername()
{
_guestUname = Cfg.GetCVar(CVars.GuestUsername);
}

private string _hwidString = "";
public string HWIdString
{
Expand All @@ -345,11 +351,11 @@ public Brush? HWIDTextBoxBorderBrush
}
}

private string _GuestUname;
private string _guestUname = "";
public string GuestName
{
get => Cfg.GetCVar(CVars.GuestUsername);
set => _GuestUname = value;
get => _guestUname;
set => _guestUname = value;
}

public bool MarseySlightOutOfDate
Expand Down Expand Up @@ -511,7 +517,7 @@ private void OnSetUsernameClick()

private void OnSetGuestUsernameClick()
{
Cfg.SetCVar(CVars.GuestUsername, _GuestUname);
Cfg.SetCVar(CVars.GuestUsername, _guestUname);
Cfg.CommitConfig();
}

Expand Down

0 comments on commit c25049d

Please sign in to comment.