Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

glgui-keypad create a keypad widget with the specified dimensions. The keypad will generate fake keyboard events that must be processed in the event loop. The default keypad is a full qwerty layout. keypad:numeric will give a simple numeric layout, while keypad:calculator gives a calculator layout. Custom keypads can also be specified. Note: An improved version of this widget is currently under development.

Parameter Description
g Graphical User Interface (GUI) for this widget
x Lower left corner along the x-axis in pixels
y Lower left corner along the y-axis in pixels
w Width of the element in pixels
h Height of the element in pixels
fnt The font used to render the keyboard characters in
keypad Optional: An alternate keypad to be used

Example

Example 1: Here is an example of a simple ASCII calculator. Lower left corner is at (0,0), height is fixed at 140 pixels, and width depends on screen size.

(glgui-keypad gui 0 0 (glgui-width-get) 140 ascii_18.fnt keypad:calculator)
Clone this wiki locally