Allow changing displayed fields in DriverView

This commit is contained in:
2023-03-20 23:31:28 +01:00
parent c8ee51a78f
commit 0d7cc03e02
28 changed files with 603 additions and 68 deletions

View File

@ -403,9 +403,81 @@
"Width": 160,
"Height": 80,
"CustomContainerDefinitionName": "DriverViewField"
},
{
"Type": "ScrollWheel",
"Name": "fieldTypeSelection",
"Y": 80,
"Width": 160,
"Height": 240,
"Visible": false,
"SelectedItemOffset": 94,
"IsCircular": true,
"ItemTemplateName": "DriverViewFieldSelection",
"NumberofItems": 1,
"Easing": "Back",
"EasingOption": "Out",
"SwipeAcceleration": 1.0,
"DragAcceleration": 1.0
}
],
"Interactions": []
"Interactions": [
{
"InteractionName": "SelectPreviousField",
"Trigger": {
"Type": "TriggerPhysicalButtonClicked",
"ButtonKey": 22
},
"Action": {
"Type": "ActionCustom",
"FunctionName": "selectPrevField"
}
},
{
"InteractionName": "SelectNextField",
"Trigger": {
"Type": "TriggerPhysicalButtonClicked",
"ButtonKey": 21
},
"Action": {
"Type": "ActionCustom",
"FunctionName": "selectNextField"
}
},
{
"InteractionName": "SelectPreviousFieldType",
"Trigger": {
"Type": "TriggerPhysicalButtonClicked",
"ButtonKey": 24
},
"Action": {
"Type": "ActionCustom",
"FunctionName": "selectPrevFieldType"
}
},
{
"InteractionName": "SelectNextFieldType",
"Trigger": {
"Type": "TriggerPhysicalButtonClicked",
"ButtonKey": 23
},
"Action": {
"Type": "ActionCustom",
"FunctionName": "selectNextFieldType"
}
},
{
"InteractionName": "ConfirmFieldType",
"Trigger": {
"Type": "TriggerPhysicalButtonClicked",
"ButtonKey": 6
},
"Action": {
"Type": "ActionCustom",
"FunctionName": "confirmFieldType"
}
}
]
}
],
"CustomContainerDefinitions": [
@ -537,6 +609,84 @@
}
],
"Interactions": []
},
{
"Name": "DriverViewFieldSelection",
"X": 100,
"Y": 227,
"Width": 160,
"Height": 26,
"Components": [
{
"Type": "Box",
"Name": "bg",
"Width": 160,
"Height": 25,
"Color": {
"Red": 34,
"Green": 34,
"Blue": 34
}
},
{
"Type": "TextArea",
"Name": "name",
"Width": 160,
"Height": 25,
"TextId": "__SingleUse_PNKR",
"TextRotation": "0",
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
}
},
{
"Type": "Line",
"Name": "line1",
"Y": 25,
"Width": 160,
"Height": 1,
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
},
"EndX": 160.0,
"LineWidth": 10.0,
"LineEndingStyle": "Round"
},
{
"Type": "Line",
"Name": "line2",
"Width": 1,
"Height": 26,
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
},
"EndY": 26.0,
"LineWidth": 10.0,
"LineEndingStyle": "Round"
},
{
"Type": "Line",
"Name": "line2_1",
"X": 159,
"Width": 1,
"Height": 26,
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
},
"EndY": 26.0,
"LineWidth": 10.0,
"LineEndingStyle": "Round"
}
],
"Interactions": []
}
],
"Name": "MyApplication",
@ -545,7 +695,7 @@
"Height": 480
},
"SelectedColorDepth": 16,
"StartupScreenName": "MissionSelect",
"StartupScreenName": "DriverView",
"SelectedStartupLanguage": "GB",
"TouchGfxPath": "../Middlewares/ST/touchgfx",
"UIPath": ".",