-
Notifications
You must be signed in to change notification settings - Fork 86
glgui valuelabel
Chris Petersen edited this page Oct 16, 2014
·
1 revision
glgui-valuelabel creates value indicator composed of a right aligned number and a left aligned label, e.g. for units.
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 |
img | The image or pixmap texture for the unit label |
fnt | The font for the number string |
color | Color for the value and unit label |
bgcolor | Optional: Background color for the value |
Example 1: Display a HR value (of 80) in green. label_hr is a texture created with the "cmss.ttf 16 "HR//bpm" label_hr" entry in the applications STRINGS file, while num_40.fnt is made with the "cmss.ttf 40 num" line in the applications FONTS file.
(set! hr_value (glgui-valuelabel gui (- (glgui-width-get) 50) (- (glgui-height-get) 70)
label_hr.img num_40.fnt Green))
(let ((hr-val 80))
(glgui-widget-set! gui hr_value 'label (if hr-val (number->string (fix hr-val)) ""))
)
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip