Skip to content

Commit 3e44ceb

Browse files
fix: opening admin panel (#2185)
fixes a bug where you had to press the hot key to open the admin panel twice before it would open for the first time
1 parent 8ec4b29 commit 3e44ceb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Intersect.Client/Interface/Game/GameInterface.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ public void NotifyOpenAdminWindow()
155155

156156
public void OpenAdminWindow()
157157
{
158-
mAdminWindow ??= new AdminWindow(GameCanvas);
159-
160-
if (mAdminWindow.IsVisible())
158+
if (mAdminWindow == null)
159+
{
160+
mAdminWindow ??= new AdminWindow(GameCanvas);
161+
}
162+
else if (mAdminWindow.IsVisible())
161163
{
162164
mAdminWindow.Hide();
163165
}

0 commit comments

Comments
 (0)