Skip to content

Commit

Permalink
Merge pull request #364 from Kyusung4698/develop
Browse files Browse the repository at this point in the history
0.6.7 (2020-03-18)
  • Loading branch information
Kyusung4698 authored Mar 18, 2020
2 parents a6a9654 + 5b32d4a commit f7eb804
Show file tree
Hide file tree
Showing 59 changed files with 67,614 additions and 804 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
78 changes: 44 additions & 34 deletions hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
return new Promise<boolean>(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<void> {
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();
}
});
}
24 changes: 17 additions & 7 deletions main.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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();
}

Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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', () => {
Expand Down
Loading

0 comments on commit f7eb804

Please sign in to comment.