make glgui lockpane - part-cw/lambdanative GitHub Wiki
(make-glgui-lockpane x y w h splash fnt callback)
make-glgui-lockpane creates a lockpane with a splash screen image.
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 |
splash | The splash screen image texture |
fnt | The font for the number string |
callback | The function called when characters are entered |
Example
Example 1: Here is a real example from an app with a lockpane at x=0 and y=0. Width and Height are defined based device specifications. icon_splash.img specifies the splash screen image.
(define (lockcallback g wgt t x y)
(let* ((label (glgui-widget-get g wgt 'label))
(labelno (if label (string->number label) #f)))
(if (and labelno (fx= labelno 1234)) (begin (set! lockedout #f) #t) #f)))
(make-glgui-lockpane 0 0 (glgui-width-get) (glgui-height-get)
icon_splash.img ascii_16.fnt lockcallback)