Advanced Cluster Part 3
• In the “Custom_Gauge”, add new “StackLayout” and name it “StackLayout_Texts”
• Add 2 “Text” controls and 1 “Text Value” control to the “StackLayout_Texts”, rename the text controls to “Text_Top” and “Text_Bottom”


• 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)
• Set Variant = 205 for the “Value_TextPos_X” behavior and Variant = 230 for “Value_TextPos_Y”
• 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”, click on the “ControlValueProvider” behavior and set the Receivers Maximum value to 8000. Then try to change its Variant value so you can see the text and needle updated.
• Right-click at the “Custom_Gauge” and select “Control Properties…”. We will choose which properties should be available from the scene as the control properties
• Follow the settings from the pictures below:


BackgroundImage:


NeedleImage:


NeedleEffectImage:


Text_Bottom:


Text_Top:


Text_Value:


Value_TextPosX and Value_TextPosY:


• The custom gauge control should now be finished and ready to use