8000 Workshop Center Star Rating Override by CaptainMagma · Pull Request #3 · somini/Pixelvision2 · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"resource/layout/gamespage_details_community_file.layout"
{
controls
{
communityfile { controlname="CCommunityFilePanel" }
communityfile_image_border { controlname="Panel" style="communityfile_image_border" }
communityfile_image { controlname="ImagePanel" image=resource/icon_community_preview zpos=-1 style="communityfile_image" }
communityfile_name { controlname="Label" style="communityfile_name" labeltext="" }
communityfile_rating_image_background { controlname="Panel" zpos=-1 style="communityfile_rating_image_background" }
communityfile_rating_image { controlname="ImagePanel" zpos=2 image=resource/1_star style="communityfile_rating_image" }
friendimage { controlname="ImagePanel" zpos=2 }
}

colors
{
// The extra space needed vertical beyond the autocomputed size of the blurb contents
// this is used in code to make the vertical size of the panel fit the title/author/morelink
// and should be updated if you change vertical padding/margins/layout.
GameDetailsCommunityFile.ExtraVerticalSpacing "120"
GameDetailsCommunityFile.ExtraHorizontalSpacing "166"
GameDetailsCommunityFile.MaxTooltipWidth "300"
GameDetailsCommunityFile.MaxTooltipHeight "90"
}

styles
{
communityfile_name
{
inset-left=16
textcolor=Highlight2
font-size=16
font-family=semibold
font-style=outerglow
font-outerglow-color=TextD
font-outerglow-offset=1
font-outerglow-filtersize=1
render_bg
{
0="image( x0, y0 + 1, x1, y1, graphics/harrow_hover )"
}
}

communityfile_image_border
{
render_bg
{
0="fill( x0 , y0 , x1 , y0 + 3, Divider )" // Top
1="fill( x0 , y1 - 3, x1 , y1 , Divider )" // Bottom
2="fill( x0 , y0 , x0 + 3, y1 , Divider )" // Left
3="fill( x1 - 3, y0 , x1 , y1 , Divider )" // Right
}
}

communityfile_rating_image_background
{
render_bg
{
0="fill( x0 + 3, y0, x1 - 3, y1, BlackTr2 )"
}
}
}

layout
{
place { region=body control=communityfile_name x=0 y=94 width=160 }
place { region=body control=communityfile_image_border x=0 y=0 width=160 height=90 }
place { region=body control=communityfile_image x=0 y=0 width=160 height=90 }
place { region=body control=communityfile_rating_image_background x=0 y=66 width=160 height=21 }
place { region=body control=communityfile_rating_image x=0 y=70 width=max height=13 margin-right=4 }
place { region=body control=friendimage width=42 height=40 spacing=10 x=117 y=47 }
}
}
0