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

glgui-inputlabel create a label widget from a string, which takes focus on being clicked, thus makes it changeable. It behaves just like glgui-label and takes the same parameters. The only difference is that this function gets assigned focus when clicked, which allows keyboard manipulation of its string. By default, the label is copyable and pastable; 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