read_panel_text
Reads text from Garry's Mod UI panels to assert values, extracting text from GetText, GetValue, or label fields. Filters by visibility and depth.
Instructions
Dumps what the interface DISPLAYS, as text: name, class, screen rectangle and text content of each panel under a named root. Use this instead of capture_screen to assert a value -- a capture travels in 7KB chunks paced one per frame, and a number read off a compressed JPEG is not an assertion. Text comes from GetText, GetValue, or a .label/.text/.title field (kit buttons paint their label and answer '' to GetText). The list is depth-first with depth relative to the root, so the parent chain is recoverable from the ordering: the DTextEntry that follows the DLabel 'Prénom' is that field. capture_screen remains the tool for anything visual -- z-order, overlap, a missing glyph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Panel to dump from, matched as a NAME first then as a class. Omitted, dumps the whole screen. | |
| index | No | Which root when several match. | |
| limit | No | Maximum entries; the rest are counted in `truncated`. | |
| maxDepth | No | Depth below the root. | |
| onScreen | No | Skip panels whose ancestry is hidden. | |
| onlyText | No | Skip panels carrying no text. false dumps the structure too. |