diff --git a/Client/ContextMenu.lua b/Client/ContextMenu.lua index 0bfdcd7..8c57e2d 100644 --- a/Client/ContextMenu.lua +++ b/Client/ContextMenu.lua @@ -1,6 +1,8 @@ ContextMenuOpened = ContextMenuOpened or false Input.Bind("ContextMenu", InputEvent.Pressed, function() + if (SpawnMenuOpened) then return end + if (ContextMenuOpened) then MainHUD:CallEvent("ToggleContextMenuVisibility", false) diff --git a/Client/SpawnMenu.lua b/Client/SpawnMenu.lua index 5fe8be6..3ed9c26 100644 --- a/Client/SpawnMenu.lua +++ b/Client/SpawnMenu.lua @@ -13,6 +13,8 @@ ToolGunsTutorials = ToolGunsTutorials or {} -- WORKAROUND used for weapons Patterns SelectedOption = SelectedOption or "" +SpawnMenuOpened = SpawnMenuOpened or false + -- Configures the Highlight colors to be used Client.SetHighlightColor(Color(0, 20, 0, 1.20), 0, HighlightMode.Always) -- Index 0 Client.SetOutlineColor(Color(0, 0, 300), 2) -- Index 2 @@ -58,13 +60,19 @@ Package.Subscribe("Load", function() end) Input.Bind("SpawnMenu", InputEvent.Released, function() + if (ContextMenuOpened) then return end + MainHUD:CallEvent("ToggleSpawnMenuVisibility", false) + SpawnMenuOpened = false Client.SetMouseEnabled(false) Client.SetChatVisibility(true) end) Input.Bind("SpawnMenu", InputEvent.Pressed, function() + if (ContextMenuOpened) then return end + MainHUD:CallEvent("ToggleSpawnMenuVisibility", true) + SpawnMenuOpened = true Client.SetMouseEnabled(true) Client.SetChatVisibility(false) MainHUD:BringToFront() diff --git a/Client/UI/index.html b/Client/UI/index.html index 18ad7c3..69638b6 100644 --- a/Client/UI/index.html +++ b/Client/UI/index.html @@ -19,10 +19,10 @@