Warning
This documentation is currently under development! It should not be relied upon at this time.
Tooltips#
Tooltips are shown as part of a knob or slider animation, or
a tooltip animation.
Tooltips are actually an instance of a popup, which are temporary
on-screen notifications that are not associated with a visual location
(unlike tooltips which typically are). Triggering a popup (eg by pressing
pause) clears any active tooltip.
Note that behavioural aspects of the tooltip are controlled by centralized properties, so that a user can configure them according to their preferences and accessibility needs. For example disabling them entirely, or increasing the hysteresis or timeout.
Translation#
In the near future, it will become possible to use a translation ID
in tooltips, probably by specifying a label-id` property which will
be looked up as described here, translated, and formatting
of substitution elements applied.
Tooltip Commands#
set-tooltipSets the current tooltip. This does not show the tooltip, but resets or updates the show timer, based on the
tooltip-id.
Tooltip Command Properties#
Possible arguments to setting a tooltip.
tooltip-idDefines a unique internal name for the tooltip. This is used to distuinguish an existing tooltip being updated vs a new tooltip being shown.
labelDefines the main text shown in the tooltip. It can contain substitution elements, currently formatted via
sprintf, but this syntax will likely change tofmtsyntax in the near future.propertyOne or more properties to display in the tooltip. The value of the property is formatted as a string based on the
mappingproperty.A listener is attached to each property, so that live changes are reflected in the tooltip automatically. This is especially relevant for live feedback during continuous updates.
mappingDefines how property values are mapped to strings. Possible values are:
percentThe value is multiplied by 100 and rounded to an integer
headingThe value is normalized to 1..360 and rounded to an integer
nasalThe
<script>child of the node is evaluated each time a property changes, and its result is used as the displayed valueon-offValue is mapped to a boolean and shown as the strings ‘ON’ or ‘OFF’
arm-disarmValue is mapped to a boolean and shown as the strings ‘ARMED’ or ‘DISARMED’
open-closedValue is mapped to a boolean and shown as the strings ‘OPEN’ (true) or ‘CLOSED’ (false)
closed-openValue is mapped to a boolean and shown as the strings ‘OPEN’ (false) or ‘CLOSED’ (true)
Adding additional format modes is easily done via Nasal.