Advanced Cluster Part 3
•In Inpart 3 of this Best Practice the “Custom_Gauge”,Custom_Gauge addcontrol newwill “StackLayout”be further customized adding controls:
In order to make our control more versatile, various properties of our configured Custom_Gauge (like all images and nametext itstyles) “StackLayout_Texts”will be made public.
•Public AddControl 2Properties “Text”are controlsthose andthat 1can “Textbe Value”configured controlwhen using a Custom_Gauge in a scene.

• Ensure that the order of the items inside of this layout is the same as shown in the picture above.
• Set these parameters: Arrangement = Vertical, MinimumSize = 250, VerticalAlignment = VCenter

• Set these “Text_Top” values: VerticalAlignment = VCenter, HorizontalAlignment = HCenter, Text Alignment = Center, Text Style = OpenSans35, Text = “RPM”
• Same for the “Text_Bottom” values, but set Text = “” (to be empty)
• Almost the same for the “Text_Value”, with these differences: Format Text = “%04d”, Text Style = Vera96


• Select the “StackLayout_Texts” and add 2 Value behaviors (Toolbox->Behaviors->Value Processing->Value). Name them as “Value_TextPos_X” and “Value_TextPos_Y”



• For both of them, set the target node Custom_Gauge->StackLayout_Texts. Select the proper axis (X for Set Position_X, Y for Set Position_Y)
• For the “Value_TextPos_X” behavior set the Receiver property Variant= (Float) 205 and for the “Value_TextPos_Y” behavior, configure Variant = (Float) 230.
• Click at the “Custom_Gauge” control and put “Forward Value” behavior into it
• Set its target node to “Custom_Gauge->StackLayout_Texts->TextValue”

• Go to the “Custom_Gauge”, double-click on the “ControlValueProvider”"Custom_Gauge" behaviorcontrol.
From the Toolbox panel's Controls section under Common drag and drop 2 Text controls and 1 Text Value control into the Scene Tree panel directly onto the StackLayout.
In the Scene Tree panel select the StackLayout as well as the 2 Text controls one after the other and rename them according to the table below either via the context menu entry "Rename" or by pressing <F2> on your keyboard.
In the Scene Tree panel re-arrange StackLayout_Texts and its contents via drag and drop until it looks like in the image below.

In the Scene Tree panel select StackLayout_Texts controls. In the Properties panel under Layouter and Layout adjust the properties as in the table below.
In the Scene tree panel select Text_Top, Text Value and Text_Bottom one after the other. In the Properties panel under Layout and Control configure the properties as in the table below.
OpenSans35
Vera96 OpenSans35 TextAlignment Center Center Center TextFormat - %04d - In the Scene Tree panel select StackLayout_Texts. In the Scene Tree panel's right side click on the [Fusion...] button.StackLayout_Texts Fusion diagram will be displayed. It only has one Fusion Node.
In Fusion use the StackLayout_Texts' "Behaviors" connector to add 2 new Fusion Nodes: Connect 2 Value Processing > Value behaviors to the StackLayout_Texts Fusion Node.
Please check Fusion's Basic Operations documentation on how to add Fusion Nodes.
In Fusion select and right-click on the behavior nodes and rename them according to the table below.
In Fusion use the Value behaviors' "Receivers" connectors to add a Value Processing > Transformation > SetPosition Fusion Node to each of them.
In Fusion select and right-click on the behavior nodes and rename them according to the table below.
Fusion Node Property Set Position_X Set Position_Y TargetNode
Custom_Gauge > StackLayout_Texts
Custom_Gauge > StackLayout_Texts TranslationAxis2D AxisX AxisY Property Value_TextPosX Value_TextPosY Variant (Float) 205 (Float) 230In Fusion configure the Variant Property of Value_TextPosX and Value_TextPos_Y Nodes according to the table below.


In the Scene Tree panel select the Custom_Gauge node and view its Fusion diagram in Fusion. (If necessary, click on the [Fusion...] button on the Scene Tree panel's right side.)
In Fusion in the ControlValueProvider Fusion Node configure the property Maximum according to the table below.
Property Value Maximum (Float) 6000.00
Configure Public Control Properties
In the Configure Public Properties dialog the Properties which
•to Followbe marked with the settings"Is fromPublic" checkbox. Check the pictures"Is below:Public"

BackgroundImage:

NeedleImage:

NeedleEffectImage:

Text_Bottom:

Text_Top:

Text_Value:

Value_TextPosXcheckbox and Value_TextPosY:

•to the table and images below.

In the Configure Public Properties dialog check the "Is Public" checkbox and perform other configurations according to the table and images below.
The properties made public in this Configure Public Properties dialog will be configurable in the Properties panel's Controls section.
x TextColor Bottom_TextColor
x TextStyle Bottom_TextStyle Text_Top x Text Top_Text
x TextColor Top_TextColor
x TextStyle Top_TextStyle Text Value x FormatText Value_FormatText
x Style Value_Style
x TextColor Value_TextColor Behaviors > Value_TextPos_X x Variant TextPosX Behaviors > Value_TextPos_Y x Variant TextPosY
