-
-
Notifications
You must be signed in to change notification settings - Fork 1
Addition in a custom theme
Lacro59 edited this page Sep 3, 2021
·
11 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 CheckLocalizations
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. |
EnableIntegrationViewItem | bool | false | Parameters to display or not a simple item games list. |
EnableIntegrationListLanguages | bool | false | Settings to display or not the list of supported languages. |
EnableIntegrationFlags | bool | false | Settings to display or not the list of available language flags. |
CustomOption | Type | Default | Description |
---|---|---|---|
HasData | bool | false | Indicates if the game has data. |
HasNativeSupport | bool | false | Indicates if the game support the native language. |
ListNativeSupport | List | List empty | details |
Integration of plugin elements with ContentControl
<StackPanel Visibility="{PluginStatus Plugin=<PluginId>, Status=Installed}">
</StackPanel>
If the item is not enabled in the plugin settings, it is collapsed.
<StackPanel Visibility="{Binding ElementName=<SourceName>_<ElementName>, Path=Visibility}">
</StackPanel>
<ContentControl x:Name="CheckLocalizations_PluginViewItem" />
<ContentControl x:Name="CheckLocalizations_PluginButton" />
<ContentControl x:Name="CheckLocalizations_PluginFlags" />
<ContentControl x:Name="CheckLocalizations_CheckLocListLanguages" />
Height is managed in plugin settings but you can defined a MinHeight
and MaxHeight
.
<Button Name="PART_CustomCheckLocButton">
<ContentControl x:Name="CheckLocalizations_PluginViewItem" />
</Button>
<ListBox ItemsSource="{PluginSettings Plugin=CheckLocalizations, Path=ListNativeSupport}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding DisplayName}" />
<Image Grid.Column="1" HorizontalAlignment="Center" Height="24" VerticalAlignment="Center" Width="24" Source="{Binding UiIcon}"/>
<Image Grid.Column="2" HorizontalAlignment="Center" Height="24" VerticalAlignment="Center" Width="24" Source="{Binding AudioIcon}"/>
<Image Grid.Column="3" HorizontalAlignment="Center" Height="24" VerticalAlignment="Center" Width="24" Source="{Binding SubIcon}"/>
<TextBlock Grid.Column="4" Text="{Binding Notes}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>