Skip to content

Commit

Permalink
penalties renders fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaac committed Jun 11, 2024
1 parent 058c894 commit 55520b2
Show file tree
Hide file tree
Showing 17 changed files with 1,477 additions and 1,012 deletions.
114 changes: 70 additions & 44 deletions components/card_universal.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"ComponentName": "card_universal",
"BlockType" : "stack",
"BackgroundImage" : "<platebg>",
"Width" : "<plateWidth>",
"Height" : "<plateHeight>",
"Margin" : "<plateMargin>",
"BackgroundImage" : "plates/plate_bg_<{DriverVar.Position}>",
"Width" : 430,
"Height" : 560,
"Margin" : "0,0,0,8",
"Items" : [
{
"BlockType" : "dock",
"BlockType" : "stack",
"Orientation" : "Vertical",
"BackgroundImage" : "card_blank.png",
"HorizontalAlignment" : "Center",
"Margin" : "<cardMargin>",
"Width" : "<cardWidth>",
"Height" : "<cardHeight>",
"Margin" : "28,8,28,64",
"Width" : "374",
"Height" : "469",
"Items" : [
{
"BlockType" : "dock",
Expand All @@ -22,7 +22,7 @@
{
"BlockType" : "image",
"HorizontalAlignment" : "Right",
"Source" : "<Suit>",
"Source" : "suit/<{DriverVar.Team.Name}>_<{DriverVar.SeatPosition}>",
"ImageOptions" : {
"DefaultPath" : "suit/Neutral.png"
//"Triggers" : [
Expand All @@ -38,13 +38,13 @@
"Condition" : "{UseDriverAvatars}",
"ConditionAnd" : "{F1Mode}",
"Property" : "Source",
"Value" : "{Item.Driver.LogoPath}"
"Value" : "<{DriverVar.Driver.LogoPath}>"
},
{
"Condition" : "{UseDriverAvatars}",
"ConditionAnd" : "{F1Mode, Converter=BoolReverse}",
"Property" : "Source",
"Value" : "{Item.Driver.LogoPath}"
"Value" : "<{DriverVar.Driver.LogoPath}>"
},
{
"Condition" : "{UseDriverAvatars, Converter=BoolReverse}",
Expand All @@ -53,8 +53,8 @@
"Value" : "suit/Neutral.png"
}
],
"Width" : "<SuitWidth>",
"Margin" : "<SuitMargin>"
"Width" : 210,
"Margin" : "0,52,40,0"
},
{
"BlockType" : "stack",
Expand All @@ -63,55 +63,53 @@
"Items" : [
{
"BlockType" : "text",
"Source" : "{Item.Driver.RaceNumber}",
"Source" : "<{DriverVar.Driver.RaceNumber}>",
"Foreground" : "#ffffff",
"FontName" : "{FontNameBold}",
"FontSize" : "<RacNoFontS>",
"Margin" : "<RaceNoMargin>",
"FontSize" : 45,
"Margin" : "46,68,0,0",
"TextOptions" : {
"HorizontalAlignment" : "Center"
},
"Triggers" : [
{
"Condition" : "{Item.Driver.RaceNumber, Converter=NumberLess, Parameter=10}",
"Condition" : "<{DriverVar.Driver.RaceNumber, Converter=NumberLess, Parameter=10}>",
"Property" : "Source",
"Value" : "0{Item.Driver.RaceNumber}"
"Value" : "0<{DriverVar.Driver.RaceNumber}>"
}
]
},
{
"BlockType" : "image",
"Source" : "platform/platform_{Item.Driver.GamePlatform}.png",
"Height" : "<PlatformHeight>",
"Margin" : "<PlatformMargin>"
"Source" : "platform/platform_<{DriverVar.Driver.GamePlatform}>.png",
"Height" : 44,
"Margin" : "44,14,0,0"
},
{
"BlockType": "image",
"Height": "<FlagHeight>",
"Margin" : "<FlagMargin>",
"Height": 30,
"Margin" : "41,30,0,0",
"VerticalAlignment": "Center",
"ImageOptions": {
"Path": "flags/flag_{Item.Driver.Nationality.Code}.png",
"Path": "flags/flag_<{DriverVar.Driver.Nationality.Code}>.png",
"VerticalAlignment": "Center"
}
},
{
"BlockType" : "itemstack",
"Orientation" : "Horizontal",
"Height" : "<RoleSize>",
"Width" : "<RoleSize>",
"RenderIf" : "{Item.Driver.LeagueRoles, Converter=EmptyObjectToFalse}",
"Height" : 40,
"Width" : 40,
"RenderIf" : "<{DriverVar.Driver.LeagueRoles, Converter=EmptyObjectToFalse}>",
"MarginTop" : 20,
"MarginLeft" : 43,
"ItemStackOptions": {
"ItemSource": "{Item.Driver.LeagueRoles}",
"ItemSource": "<{DriverVar.Driver.LeagueRoles}>",
"Limit" : 1,
"ItemTemplate": {
"BlockType" : "image",
"Height" : "<RoleSize>",
"Width" : "<RoleSize>",
//"MarginRight" : 8,
//"MarginLeft" : 8,
"Height" : 40,
"Width" : 40,
"Source" : "roles/{Item.Name}_role.png"
}
}
Expand All @@ -122,26 +120,24 @@
},
{
"BlockType" : "text",
"Source" : "{Item.Driver.Name}",
"Source" : "<{DriverVar.Driver.Name}>",
"Foreground" : "#ffffff",
"FontName" : "{FontNameBold}",
"DriverNameFontSize" : "26",
"DriverNameMargin" : "0,12,0,0",
"FontSize" : "<DriverNameFontSize>",
"Margin" : "<DriverNameMargin>",
"FontSize" : 26,
"MarginTop" : 6,
"HorizontalAlignment" : "Center"
},
{
"BlockType" : "dock",
"Orientation" : "Horizontal",
"Margin" : "<logosMargin>",
"Margin" : "0,30,0,0",
"Items" : [
{
"BlockType" : "image",
"Source" : "{Season.LeagueInfo.LeagueLogo}",
"HorizontalAlignment" : "Left",
"Margin" : "<LeagueLogoMargin>",
"Height" : "<LeagueLogoHeight>",
"Margin" : "36,0,0,0",
"Height" : 35,
"RenderIf" : true,
"Triggers" : [
{
Expand All @@ -153,7 +149,7 @@
},
{
"Property" : "Margin",
"Value" : "<LeagueLogoMarginNonF1>"
"Value" : "-44,0,0,0"
}
]
}
Expand All @@ -164,8 +160,20 @@
"Source": "f1_logo.png",
"HorizontalAlignment" : "Right",
"RenderIf" : "{F1Mode}",
"Margin" : "<F1LogoMargin>",
"Height" : "<F1LogoHeight>"
"Margin" : "0,0,104,0",
"Height" : 30
}
]
}
],
"Triggers" : [
{
"Condition" : "{LayoutInfo.RenderType, Converter=StringEquals, Parameter=PenaltyItem}",
"ConditionOr" : "{LayoutInfo.RenderType, Converter=StringEquals, Parameter=PenaltyItems}",
"Setters" : [
{
"Property" : "Margin",
"Value" : "0"
}
]
}
Expand All @@ -174,9 +182,27 @@
],
"Triggers" : [
{
"Condition" : "{Item.Position, Converter=StringEquals, Parameter=3}",
"Condition" : "<{DriverVar.Position, Converter=StringEquals, Parameter=3}>",
"Property" : "MarginBottom",
"Value" : "0"
},
{
"Condition" : "{LayoutInfo.RenderType, Converter=StringEquals, Parameter=PenaltyItem}",
"ConditionOr" : "{LayoutInfo.RenderType, Converter=StringEquals, Parameter=PenaltyItems}",
"Setters" : [
{
"Property" : "BackgroundImage",
"Value" : ""
},
{
"Property" : "Height",
"Value" : "469"
},
{
"Property" : "Width",
"Value" : "380"
}
]
}
]
}
Loading

0 comments on commit 55520b2

Please sign in to comment.