Add functions to the RPC Settings

This commit is contained in:
Maroxy 2021-12-11 12:56:38 +01:00
parent f84d59919a
commit d8a112e14c
No known key found for this signature in database
GPG key ID: F4B27EADB21E3021

View file

@ -229,6 +229,31 @@ $(() => {
ipcRenderer.send('rpc-toggle'); ipcRenderer.send('rpc-toggle');
}); });
$('#rpc-launch-details').on('change', () => {
if ($('#rpc-launch-details').val() == "")
LauncherLib.updateConfig('rpcsettings.launcher', 'Preparing to launch');
LauncherLib.updateConfig('rpcsettings.launcher', $('#rpc-launch-details').val() as string);
});
$('#rpc-game-details').on('change', () => {
if ($('#rpc-game-details').val() == "")
LauncherLib.updateConfig('rpcsettings.ingame.details', 'In-Game');
LauncherLib.updateConfig('rpcsettings.ingame.details', $('#rpc-game-details').val() as string);
});
$('#rpc-game-state').on('change', () => {
if ($('#rpc-game-state').val() == "")
LauncherLib.updateConfig('rpcsettings.ingame.state', null);
LauncherLib.updateConfig('rpcsettings.ingame.state', $('#rpc-game-state').val() as string);
});
$('#rpc-game-elapsed').on('classChange', () => {
LauncherLib.updateConfig('rpcsettings.ingame.elapsed', $('#rpc-game-elapsed').hasClass('checkbox-active'));
});
/** /**
* Auto-delete DXVK logs * Auto-delete DXVK logs
*/ */