inspect_panel
Find a Garry's Mod VGUI panel by its registered name, class, or displayed text. Returns screen rectangle, text content, keyboard focus status, and other matching panels.
Instructions
Finds a panel by NAME, class and/or displayed text, and returns its screen rectangle, its text, whether it holds keyboard focus, and the other matches. NAME is the registered vgui name (R_CharCreate, R_UI_Button, echat.textentry) and is what you want: class is the VGUI base the panel derives from, so a kit panel's class reads Label or Panel and searching by class can never find it. Off-screen panels are excluded unless onScreen:false -- a live tree measured 1408 panels of which 5 were on screen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Registered vgui name, e.g. R_UI_Button. Exact match. | |
| class | No | VGUI base class, e.g. Label, Panel, TextEntry. Exact match. | |
| index | No | Which match to return when several qualify. | |
| contains | No | Substring of the panel's displayed text, case-insensitive -- 'the button that says ÉCROUER'. | |
| onScreen | No | Keep only panels whose whole ancestry is visible. false includes closed menus. |