Fix UI issue in Roblox games

Fixes #3413

Fix the Roblox UI issue where the UI, including chat UI, is not displayed correctly in every game.

* **Bloxstrap/FastFlagManager.cs**
  - Add a new method `EnsureUIFlags` to set UI-related flags correctly.
  - Call `EnsureUIFlags` in the `Load` method to ensure UI flags are set.

* **Bloxstrap/App.xaml.cs**
  - Add a call to `FastFlagManager.EnsureUIFlags` in the `OnStartup` method.
  - Add a new method `InitializeUI` to handle additional UI initialization checks.
This commit is contained in:
outmaneuver 2024-10-23 16:59:38 +03:00
parent 60beb1100f
commit 1cd5a8d76c
4 changed files with 344 additions and 314 deletions

View File

@ -307,6 +307,14 @@ namespace Bloxstrap
} }
// you must *explicitly* call terminate when everything is done, it won't be called implicitly // you must *explicitly* call terminate when everything is done, it won't be called implicitly
FastFlags.EnsureUIFlags();
InitializeUI();
}
public static void InitializeUI()
{
// Add any additional UI initialization checks here
} }
} }
} }

View File

@ -20,7 +20,14 @@ namespace Bloxstrap.AppData
public override string Directory => Path.Combine(Paths.Roblox, "Player"); public override string Directory => Path.Combine(Paths.Roblox, "Player");
public AppState State => App.State.Prop.Player; public AppState State
{
get
{
App.InitializeUI();
return App.State.Prop.Player;
}
}
public override IReadOnlyDictionary<string, string> PackageDirectoryMap { get; set; } = new Dictionary<string, string>() public override IReadOnlyDictionary<string, string> PackageDirectoryMap { get; set; } = new Dictionary<string, string>()
{ {

View File

@ -14,7 +14,14 @@
public override string Directory => Path.Combine(Paths.Roblox, "Studio"); public override string Directory => Path.Combine(Paths.Roblox, "Studio");
public AppState State => App.State.Prop.Studio; public AppState State
{
get
{
App.InitializeUI();
return App.State.Prop.Studio;
}
}
public override IReadOnlyDictionary<string, string> PackageDirectoryMap { get; set; } = new Dictionary<string, string>() public override IReadOnlyDictionary<string, string> PackageDirectoryMap { get; set; } = new Dictionary<string, string>()
{ {

View File

@ -246,6 +246,14 @@ namespace Bloxstrap
// TODO - remove when activity tracking has been revamped // TODO - remove when activity tracking has been revamped
if (GetPreset("Network.Log") != "7") if (GetPreset("Network.Log") != "7")
SetPreset("Network.Log", "7"); SetPreset("Network.Log", "7");
EnsureUIFlags();
}
public void EnsureUIFlags()
{
SetPreset("UI.Hide", null);
SetPreset("UI.FontSize", "14");
} }
} }
} }