glgui battery - part-cw/lambdanative GitHub Wiki
(glgui-battery g x y w h v)
glgui-battery adds a battery icon to the screen (without callback, i.e. not clickable). It changes it colors at predefined levels: yellow at <50% and red at <25%, and warning at <10%
Parameter | Description |
---|---|
g | The Graphical User Interface (GUI) this widget belongs to |
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 |
v | Specifies the battery filling value in percent |
Example
Example 1: Place a battery symbol at x=10, y=400, which is 40% full, thereby yellow
(set! gui:main (make-glgui))
(glgui-battery gui:main 10 400 40 18 40)