Garry's Mod Wiki

Panel:MakePopup

  Panel:MakePopup()

Description

Focuses the panel and enables it to receive input.

This automatically calls Panel:SetMouseInputEnabled and Panel:SetKeyboardInputEnabled and sets them to true.

Panels derived from Panel will not work properly with this function. Due to this, any children will not be intractable with keyboard. Derive from EditablePanel instead.

For non gui related mouse focus, you can use gui.EnableScreenClicker.