v1.0.0.6: Minimap stays open after client restart (restore on login)

Made-with: Cursor
This commit is contained in:
2026-02-27 21:43:37 -05:00
parent c9b50f8f72
commit d10a550136
3 changed files with 15 additions and 3 deletions
+13 -1
View File
@@ -11,6 +11,8 @@ namespace Mappy.Windows;
public class MinimapWindow : Window
{
private bool _wasLoggedIn;
public MinimapWindow() : base("HSMappy Minimap###HSMappyMinimap", new Vector2(200.0f, 200.0f))
{
DisableWindowSounds = true;
@@ -22,8 +24,18 @@ public class MinimapWindow : Window
public override void PreOpenCheck()
{
if (Service.ClientState is { IsLoggedIn: false } or { IsPvP: true })
var isLoggedIn = Service.ClientState is { IsLoggedIn: true, IsPvP: false };
if (!isLoggedIn)
{
IsOpen = false;
_wasLoggedIn = false;
return;
}
// Restore minimap when transitioning from login screen to in-game (ShowMinimap persists in config)
if (!_wasLoggedIn && System.SystemConfig.ShowMinimap)
UnCollapseOrShow();
_wasLoggedIn = true;
}
protected override unsafe void DrawContents()