widget_code
The rows a code widget reads: what it highlights and its gutter. The widget_code component of the Balaur game engine: its 7 properties, and the functions…
Na této stránce
ui · 7 properties · UI
The rows a code widget reads: what it highlights and its gutter.
In a scene, widget_code is the node key that applies it. A script reaches each property below as a field on node.widget_code: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_code.get() and node.widget_code.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
breakpoints |
list | [] |
The lines a code widget dots in its gutter, counting from 1; whole numbers or the text of them. A click on the gutter reports its line through on_gutter and the script decides what the mark means |
current_line |
int | 0 |
The line a code widget fills across its whole width, counting from 1, for the row a debugger is stopped on; 0 fills none At least 0. |
gutter_width |
float | 0 |
How wide a code widget's gutter is, in design pixels; 0 takes the built-in width, which holds four digits At least 0. |
language |
string | — | The language a code widget highlights |
on_gutter |
string | — | Script method called with the line a click on a code widget's gutter landed on, on this node or the nearest ancestor whose script declares it |
problems |
list | [] |
The lines a code widget underlines as errors, counting from 1, each also marked on the inner edge of its gutter |
warnings |
list | [] |
The lines a code widget underlines as warnings, counting from 1; an error on the same line outranks it |