Skip to main content Link Menu Expand (external link) Document Search Copy Copied

TouchGauge

The TouchGauge is used to allow user interaction. There are two ways a touch gauge can be used:

  • Via an actual touch screen device (you must be using the supported device)
  • Via hardware momentary buttons
  • Via a rotary encoder

Example:

<gauge>
    <name>Clustertouch</name>
    <type>TouchGauge</type>
    <x>70</x>
    <y>300</y>
    <w>150</w>
    <h>150</h>
    <action>page=0</action>
    <background>clustericon_new.bmp</background>
    <colours>blackwhite</colours>
    <outline>0</outline>
    <selectable>1</selectable>
</gauge>
Attribute Mandatory? Value Type Description
x Yes Integer The x coordinate of the bottom left of the gauge
y Yes Integer The y coordinate of the bottom left of the gauge
w Yes Integer The width of the touch area in pixels
h Yes Integer The height of the touch area in pixels
action Yes String The action that will be taken when the button is activated
colours Yes String Colour information for the highlight rectangle. See the colour definitions page for more details
background No String The icon to display representing the on-screen button. Although this is optional, most of the time you will want a background. The only time you might not is if you want to be able to touch another control to activate something (by overlaying the TouchGauge coordinates onto another gauge’s screen location), or possibly have a ‘secret’ area that has no visible button to access something that you don’t want anyone else to know is there.
selectable No Integer 1 or 0 Defines whether the button is added to a selection list when the page is loaded. This list is used for the next/previous control actions that can be linked to hardware buttons or rotary encoders
imagex No Integer The x coordinate of the image. Defaults to the x setting above if not specified. This is used to allow the image to be smaller than the touch rectangle specified by x,y,w,h, and for it to be placed in the middle of the touch rectangle.
imagey No Integer The y coordinate of the image. Defaults to the y setting above if not specified. This is used to allow the image to be smaller than the touch rectangle specified by x,y,w,h, and for it to be placed in the middle of the touch rectangle.
outline No Integer 1 or 0 Defines whether an outline should be drawn around the touch rectangle. The gauge name will also be drawn. This is really only useful for debug purposes when trying to align touch gauges with screen areas.
xscale No Floating point Enables the bitmap being used for the touch control to be scaled horizontally. Values less than 1 make it smaller. Values greater than 1 make it larger (1.5 would be 1.5 times as wide)
yscale No Floating point Enables the bitmap being used for the touch control to be scaled vertically. Values less than 1 make it smaller. Values greater than 1 make it larger (1.5 would be 1.5 times as tall)
action_script No String Specifies a script to be executed when the icon is activated either via touch or via a hardware button. If this script is defined it is run before the action is executed.
rotateleftaction No String Specifies a touch action to perform when the encoder is in mode 3 and is rotated left. This action is only executed if the ini file action is left empty
rotaterightaction No String Specifies a touch action to perform when the encoder is in mode 3 and is rotated right. This action is only executed if the ini file action is left empty