diff --git a/CHANGELOG.md b/CHANGELOG.md index f784ab7e..c32b3d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## 0.6.7 (2020-03-18) + +- add traditional chinese support (Garena) +- add simplified chinese support (Tencent) +- add seperate ui language + - polish +- add search placeholder above stat list +- add stash highlight keybinding (#350) +- add stash navigation mode (disabled, normal, inverse) +- add alt modifier to bookmark hotkeys (#362) +- add unique select all (#360) +- update data to 3.10.0c +- fix uncaught exception on alert + ## 0.6.6 (2020-03-17) - add dps mod range (#294) diff --git a/README.md b/README.md index d51abdba..2ec94185 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PoE Overlay 0.6.6 +# PoE Overlay 0.6.7 An Overlay for Path of Exile. The ***core aspect*** is to blend in with the game. Built with Electron and Angular. @@ -87,11 +87,11 @@ These instructions will set you up to run and enjoy the overlay. #### Installing 1. Head over to [Releases](https://github.com/Kyusung4698/PoE-Overlay/releases) and download one of the following files - 1. `poe-overlay-Setup-0.6.6.exe` to install locally. This supports auto update/ auto launch. - 2. `poe-overlay-0.6.6.exe` portable version. This does not support auto update/ auto launch. + 1. `poe-overlay-Setup-0.6.7.exe` to install locally. This supports auto update/ auto launch. + 2. `poe-overlay-0.6.7.exe` portable version. This does not support auto update/ auto launch. 2. Run either of your downloaded file 3. Start Path of Exile -4. Wait until you can see `PoE Overlay 0.6.6` in the bottom left corner +4. Wait until you can see `PoE Overlay 0.6.7` in the bottom left corner 5. Hit `f7` and set `Language` and `League` to meet your game settings #### Shortcuts @@ -113,8 +113,8 @@ You can change these shortcuts in the user settings menu. | `f6` | Toggle DND | `f7` | Opens the user settings menu | `f8` | Exits overlay -| `numpad1` | Open `https://www.poelab.com/` -| `numpad2` | Open `https://wraeclast.com/` +| `alt + num1` | Open `https://www.poelab.com/` +| `alt + num2` | Open `https://wraeclast.com/` | `esc` | Close latest dialog | `space` | Close all dialogs diff --git a/hook.ts b/hook.ts index 90238694..cf48c721 100644 --- a/hook.ts +++ b/hook.ts @@ -104,44 +104,54 @@ export function off(event: 'change' | 'wheel') { } } -export function register(): void { - import('iohook').then(x => { - const iohook = x.default; - iohook.start(); - - activeCheckSubscription = activeCheck$.pipe( - throttleTime(500, undefined, { - trailing: true, - leading: false - }) - ).subscribe(() => { - checkActive(); - }); - - iohook.on('keydown', onKeydown); - iohook.on('keyup', onKeyup); - iohook.on('mousewheel', onMousewheel); - iohook.on('mouseup', onMouseclick); - }).catch(() => { - alert('Failed to import iohook. Please make sure you have vc_redist installed.'); - }); +export function register(): Promise { + return new Promise(async (resolve) => { + try { + const iohook = (await import('iohook')).default; + iohook.start(); + + activeCheckSubscription = activeCheck$.pipe( + throttleTime(500, undefined, { + trailing: true, + leading: false + }) + ).subscribe(() => { + checkActive(); + }); + + iohook.on('keydown', onKeydown); + iohook.on('keyup', onKeyup); + iohook.on('mousewheel', onMousewheel); + iohook.on('mouseup', onMouseclick); + resolve(true); + } + catch (error) { + console.error('An unexpected error occured while registering iohook', error); + resolve(false); + } + }) } -export function unregister(): void { - import('iohook').then(x => { - const iohook = x.default; +export function unregister(): Promise { + return new Promise(async (resolve, reject) => { + try { + const iohook = (await import('iohook')).default; - iohook.off('keydown', onKeydown); - iohook.off('keyup', onKeyup); - iohook.off('mousewheel', onMousewheel); - iohook.off('mouseup', onMouseclick); + iohook.off('keydown', onKeydown); + iohook.off('keyup', onKeyup); + iohook.off('mousewheel', onMousewheel); + iohook.off('mouseup', onMouseclick); - if (activeCheckSubscription) { - activeCheckSubscription.unsubscribe(); - } + if (activeCheckSubscription) { + activeCheckSubscription.unsubscribe(); + } - iohook.stop(); - }).catch(() => { - alert('Failed to import iohook. Please make sure you have vc_redist installed.'); + iohook.stop(); + resolve(); + } + catch (error) { + console.error('An unexpected error occured while unregistering iohook', error); + reject(); + } }); } \ No newline at end of file diff --git a/main.ts b/main.ts index b3495b52..c9513de3 100644 --- a/main.ts +++ b/main.ts @@ -1,5 +1,5 @@ import AutoLaunch from 'auto-launch'; -import { app, BrowserWindow, Display, ipcMain, Menu, MenuItem, MenuItemConstructorOptions, screen, systemPreferences, Tray } from 'electron'; +import { app, BrowserWindow, dialog, Display, ipcMain, Menu, MenuItem, MenuItemConstructorOptions, screen, systemPreferences, Tray } from 'electron'; import * as log from 'electron-log'; import { autoUpdater } from 'electron-updater'; import * as fs from 'fs'; @@ -13,7 +13,9 @@ if (!app.requestSingleInstanceLock()) { } if (process.platform === 'win32' && !systemPreferences.isAeroGlassEnabled()) { - alert('Aero needs to be enabled.') + dialog.showErrorBox( + 'Aero is required to run PoE Overlay', + 'Aero is currently disabled. Please enable Aero and try again.'); app.exit(); } @@ -149,7 +151,7 @@ autoUpdater.on('update-available', () => { title: 'New update available', content: 'A new update is available. Will be automatically downloaded unless otherwise specified.', }); - if (!autoUpdater.autoDownload && !downloadItem) { + if (!autoUpdater.autoDownload && !downloadItem) { downloadItem = new MenuItem({ label: 'Download Update', type: 'normal', @@ -381,10 +383,18 @@ try { app.on('ready', () => { /* delay create window in order to support transparent windows at linux. */ setTimeout(() => { - hook.register(); - createWindow(); - createTray(); - }, 1000); + hook.register().then(success => { + if (!success) { + dialog.showErrorBox( + 'Iohook is required to run PoE Overlay', + 'Iohook could not be loaded. Please make sure you have vc_redist installed and try again.'); + app.quit(); + } else { + createWindow(); + createTray(); + } + }); + }, 300); }); app.on('window-all-closed', () => { diff --git a/overlay.babel b/overlay.babel index 6e1137ac..83b7a40d 100644 --- a/overlay.babel +++ b/overlay.babel @@ -1,4 +1,4 @@ - +