diff options
author | lawncable.gitlab@simonlaux.de <lawncable.gitlab@simonlaux.de> | 2019-03-16 07:34:53 +0100 |
---|---|---|
committer | lawncable.gitlab@simonlaux.de <lawncable.gitlab@simonlaux.de> | 2019-03-16 07:34:53 +0100 |
commit | 25b567314d42a1906836cf7dc9fe0e38c3996996 (patch) | |
tree | 6b5df3ec2220795aac19b7d60d8ccc8ad95545f2 /src/main.ts | |
parent | 477f017eb25308c3bdcea148245457c296b7fb2f (diff) | |
download | electron-25b567314d42a1906836cf7dc9fe0e38c3996996.tar.gz electron-25b567314d42a1906836cf7dc9fe0e38c3996996.tar.bz2 electron-25b567314d42a1906836cf7dc9fe0e38c3996996.tar.xz electron-25b567314d42a1906836cf7dc9fe0e38c3996996.zip |
add experimental rich presence
Diffstat (limited to 'src/main.ts')
-rw-r--r-- | src/main.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.ts b/src/main.ts index 5200d0b..9009b6f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ +import * as path from 'path'; import { app, BrowserWindow, ipcMain, remote, Tray, Menu, dialog } from 'electron'; // Keep a global reference of the window object, if you don't, the window will @@ -80,10 +81,10 @@ import {Status, EventEmitter} from './main/status'; -//import {quit as drpcQuit} from './main/richpresence'; +import {quit as drpcQuit} from './main/richpresence'; app.on('quit', () => { - //drpcQuit(); + drpcQuit(); if (appIcon) appIcon.destroy() }); @@ -158,14 +159,13 @@ ManaPlus.init(); ipcMain.on('play', async (event:any, arg:any) => { if(Status.getStatus().playing)return; //console.log("play", arg); + Status.setGameStatus({server: arg.address}) Status.setPlaying(true); await ManaPlus.start(arg); //Status.showError("Failed To Launch Mana Plus","Not implemented yet!","Launch Manaplus faild: Not Implemented"); return false; }); -import * as path from 'path'; - ipcMain.on('dragFileOut', (event:any, filepath:any) => { event.sender.startDrag({ file: filepath, |