Skip to content
Dustin edited this page Jun 12, 2018 · 3 revisions

glgui-inputlabel creates a label widget from a string, which takes focus on being clicked, thus making it editable. It behaves just like glgui-label, taking the same parameters and having the same attributes. The only difference is that this function gets assigned focus when clicked, which allows keyboard manipulation of its string. In addition, the label is copyable and pastable by default; set the attributes 'copyable?, 'pastable? to #f to disable this behaviour.

Parameter Description
g The Graphical User Interface (GUI) belonging to this widget
x The lower left corner along the x-axis in pixels
y The lower left corner along the y-axis in pixels
w The width of the element in pixels
h The height of the element in pixels
label The string for label
fnt The font used to render the label string
color The widget color
bgcolor Optional: The widget background color

Example

Example 1: Create a phonebook directory name label, that becomes editable when clicked.

(set! phonebook-name (glgui-inputlabel g (+ x 150) 300 150 24 "" ascii_24.fnt White))
Clone this wiki locally