mirror of
https://github.com/amiayweb/Hytale-F2P.git
synced 2026-02-26 18:41:58 -03:00
Add install path handling to preload.js
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
launchGame: (playerName, javaPath) => ipcRenderer.invoke('launch-game', playerName, javaPath),
|
||||
launchGame: (playerName, javaPath, installPath) => ipcRenderer.invoke('launch-game', playerName, javaPath, installPath),
|
||||
closeWindow: () => ipcRenderer.invoke('window-close'),
|
||||
minimizeWindow: () => ipcRenderer.invoke('window-minimize'),
|
||||
saveUsername: (username) => ipcRenderer.invoke('save-username', username),
|
||||
loadUsername: () => ipcRenderer.invoke('load-username'),
|
||||
saveJavaPath: (javaPath) => ipcRenderer.invoke('save-java-path', javaPath),
|
||||
loadJavaPath: () => ipcRenderer.invoke('load-java-path'),
|
||||
saveInstallPath: (installPath) => ipcRenderer.invoke('save-install-path', installPath),
|
||||
loadInstallPath: () => ipcRenderer.invoke('load-install-path'),
|
||||
selectInstallPath: () => ipcRenderer.invoke('select-install-path'),
|
||||
isGameInstalled: () => ipcRenderer.invoke('is-game-installed'),
|
||||
uninstallGame: () => ipcRenderer.invoke('uninstall-game'),
|
||||
onProgressUpdate: (callback) => {
|
||||
ipcRenderer.on('progress-update', (event, data) => callback(data));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user