Skip to content

Plugin Settings

felixkmh edited this page Sep 19, 2022 · 11 revisions

Game Properties

Using the PluginSettings markup extension, some properties of the currently selected games can be changed. The lie in the Game subsection of the settings. Hidden and Favorite can be bound to booleans as follows:

IsChecked="{PluginSettings Plugin=ThemeExtras, Path=Game.Hidden, Mode=TwoWay, FallbackValue={StaticResource False}}"

And Notes can be bound to a string:

Text="{PluginSettings Plugin=ThemeExtras, Path=Game.Notes, Mode=TwoWay, FallbackValue=''}"

Commands

Commands can be bound via

Command="{PluginSettings Plugin=ThemeExtras, Path=Commands.{Command}, FallbackValue={x:Null}}"

where {Command} can be one of the following options:

Command CommandParameters Description
UpdateGamesCommand - Update selected games
ResetScoreCommand "User|Community|Critic" Reset score of selected games
OpenGameAssetFolderCommand Game Open asset folder of the supplied game. Leave parameter empty to open asset folder of currently selected game
OpenPlayniteSettings - Open Playnite settings
OpenAddonWindowCommand - Open the Add-on browser
SwitchModeCommand - Switch between fullscreen and desktop mode
OpenPluginSettingsCommand PluginId (GenericPlugin.Id) Opens plugin settings for the plugin with PluginId
OpenPluginConfigDirCommand PluginId (GenericPlugin.Id) Opens config directory for the plugin with PluginId
OpenPlayniteLogCommand - Opens playnite.log
OpenExtensionsLogCommand - Opens extensions.log
OpenUrlCommand string/Uri Opens the given uri
DiscardNotificationCommand NotificationMessage Discards the NotificationMessage passed as the CommandParameter (Example). (Will be supported natively starting with Playnite 10)
SwitchToDetailsViewCommand Game Playnite 10 Only: Switches to the details view and selects the game if provided
SwitchToGridViewCommand Game Playnite 10 Only: Switches to the gird view and selects the game if provided
SwitchToListViewCommand Game Playnite 10 Only: Switches to the list view and selects the game if provided
BackCommand - Limited functionality with Playnite 9. Navigates back to the previous game selection / view (Example)
ForwardCommand - Limited functionality with Playnite 9. Navigates forward to the next game selection / view (Example)

Menus

grafik

There is also a subsection for menus, intended to be used as the context menu for the background image, that provides quick access to the settings and game menu items of ExtraMetadataLoader and BackgroundChanger. The IsOpen property must also be bound to Menus.IsOpen, see the example. This prevents the menu items from being requested before the context menu actually opens.

Example:

<ContextMenu 
    Visibility="{PluginStatus Plugin=felixkmh_Extras_Plugin, Path=IsInstalled}"
    IsOpen="{PluginSettings Plugin=ThemeExtras, Path=Menus.IsOpen, Mode=OneWayToSource, FallbackValue={StaticResource False}}">
    <MenuItem Header="ExtraMetadataLoader" 
                Visibility="{PluginStatus Plugin=ExtraMetadataLoader_705fdbca-e1fc-4004-b839-1d040b8b4429, Path=IsInstalled}"
                ItemsSource="{PluginSettings Plugin=ThemeExtras, Path=Menus.EMLGameMenuItems, FallbackValue={x:Null}}"/>
    <MenuItem Header="BackgroundChanger" 
                Visibility="{PluginStatus Plugin=playnite-backgroundchanger-plugin, Path=IsInstalled}"
                ItemsSource="{PluginSettings Plugin=ThemeExtras, Path=Menus.BackgroundChangerGameMenuItems, FallbackValue={x:Null}}"/>
    <Separator/>
    <MenuItem Header="{DynamicResource LOCOpenMetadataFolder}" 
                            Command="{PluginSettings Plugin=ThemeExtras, Path=Commands.OpenGameAssetFolderCommand,FallbackValue={x:Null}}"/>
</ContextMenu>
Clone this wiki locally