Skip to content

Addition in a custom theme

Lacro59 edited this page Mar 25, 2023 · 18 revisions

You can see a example with https://github.com/Lacro59/playnite-defaultextend-theme.

Differents resources disponible with PluginSettings

The SourceName for the plugin is GameActivity

Plugin settings

CustomOption Type Default Description
EnableIntegrationButton bool false Parameters to display or not the plugin button.
EnableIntegrationButtonDetails bool false Parameters to display or not more infos in the plugin button.
EnableIntegrationChartTime bool false Settings to display or not the chart with times session.
EnableIntegrationChartLog bool false Settings to display or not the char with logs session.

Plugin data for game selected

CustomOption Type Default Description
HasData bool false Indicates if the game has data.
HasDataLog bool false Indicates if the game has logs data.
LastDateSession string string.Empty The date of the last game session.
LastDateTimeSession string string.Empty The date & time of the last game session.
LastPlaytimeSession string string.Empty The playtime of the last game session.
AvgFpsAllSession int 0 Average FPS of all game session.
RecentActivity string string.Empty Recent activity (ex: "23.3 hours pas 2 weeks")

Integration of plugin elements with ContentControl

Visibility

Visibility according to the presence of the plugin

<StackPanel Visibility="{PluginStatus Plugin=<PluginId>, Status=Installed}">
</StackPanel>

Visibility depending the element visibility parameter in plugin settings

If the item is not enabled in the plugin settings, it is collapsed.

Visibility according to the visibility of the element

<StackPanel Visibility="{Binding ElementName=<SourceName>_<ElementName>, Path=Visibility}">
</StackPanel>

Plugin elements

Button (supporting the different options in the plugin settings)

<ContentControl x:Name="GameActivity_PluginButton" />

Chart with times session (supporting the different options in the plugin settings)

<ContentControl x:Name="GameActivity_PluginChartTime" />

Height is managed in plugin settings but you can defined a MinHeight and MaxHeight.

Chart with times session (supporting the different options in the plugin settings)

<ContentControl x:Name="GameActivity_PluginChartLog" />

Height is managed in plugin settings but you can defined a MinHeight and MaxHeight.

Custom elements with plugin data

Button (example)

<Button Name="PART_CustomGameActivityButton">your custom template here</Button>