Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ae71b78

Browse filesBrowse files
committed
DAdjustableModelPanel "fix" for when main menu is open
1 parent a89bae4 commit ae71b78
Copy full SHA for ae71b78

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎garrysmod/lua/vgui/dadjustablemodelpanel.lua

Copy file name to clipboardExpand all lines: garrysmod/lua/vgui/dadjustablemodelpanel.lua
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ end
1515

1616
function PANEL:OnMousePressed( mousecode )
1717

18+
-- input.SetCursorPos does not work while main menu is open
19+
if ( !MENU_DLL and gui.IsGameUIVisible() ) then return end
20+
1821
self:SetCursor( "none" )
1922
self:MouseCapture( true )
2023
self.Capturing = true
@@ -60,6 +63,9 @@ end
6063

6164
function PANEL:CaptureMouse()
6265

66+
-- input.SetCursorPos does not work while main menu is open
67+
if ( !MENU_DLL and gui.IsGameUIVisible() ) then return 0, 0 end
68+
6369
local x, y = input.GetCursorPos()
6470

6571
local dx = x - self.mx

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.