Skip to content

Commit

Permalink
Merge pull request #613 from Kyusung4698/develop
Browse files Browse the repository at this point in the history
0.6.21 (2020-04-12)
  • Loading branch information
Kyusung4698 authored Apr 12, 2020
2 parents 5ffcb57 + 0d80aa4 commit f3f50de
Show file tree
Hide file tree
Showing 48 changed files with 520 additions and 133 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.6.21 (2020-04-12)

- add focus game after closing all dialogs (#606)
- add item frame opacity setting (#607)
- add standard league as fallback if poe ninja returns no results for selected league
- add own min max range settings for properties
- add preselect attack and defense as setting
- update keyboard support to be always enabled
- remove quality min/ max restriction (#611)
- fix move poe overlay to top after focusing poe (#608)

## 0.6.20 (2020-04-10)

- fix poe overlay losses focus after clicking on it (#602)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![GitHub Release Date](https://img.shields.io/github/release-date/Kyusung4698/PoE-Overlay)
<a href="https://www.patreon.com/bePatron?u=30666721"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron" width="85px" height="20px"></a>

# PoE Overlay 0.6.20
# PoE Overlay 0.6.21

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 @@ -74,11 +74,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.20.exe` to install locally. This supports auto update/ auto launch.
2. `poe-overlay-0.6.20.exe` portable version. This does not support auto update/ auto launch.
1. `poe-overlay-Setup-0.6.21.exe` to install locally. This supports auto update/ auto launch.
2. `poe-overlay-0.6.21.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.20` in the bottom left corner
4. Wait until you can see `PoE Overlay 0.6.21` in the bottom left corner
5. Hit `f7` and set `Language` and `League` to meet your game settings

#### Shortcuts
Expand Down
18 changes: 11 additions & 7 deletions electron/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,27 @@ export class Game {
export function register(ipcMain: IpcMain, onUpdate: (game: Game) => void): void {
const game = new Game();

let timeout = undefined;
function callback() {
clearTimeout(timeout);
timeout = setTimeout(() => {
onUpdate(game);
}, 550);
}

ipcMain.on('game-focus', event => {
game.focus();
event.returnValue = true;
});

ipcMain.on('game-send-active-change', event => {
onUpdate(game);
callback();
event.returnValue = true;
});

let timeout = 0;
setInterval(() => {
if (--timeout < 0 && game.update()) {
if (game.active) {
timeout = 2;
}
onUpdate(game);
if (game.update()) {
callback();
}
}, 500);
}
16 changes: 0 additions & 16 deletions electron/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ import * as fs from 'fs';
import * as path from 'path';

const ANIMATION_FILE = 'animation.flag'
const KEYBOARD_FILE = 'keyboard.flag'
const VERSION_FILE = 'version.txt'

const FLAG_FILE_VALUE = 'true';

export class State {
private readonly animationPath: string;
private readonly keyboardPath: string;
private readonly versionPath: string;

constructor(private readonly userDataPath: string) {
this.animationPath = path.join(this.userDataPath, ANIMATION_FILE);
this.keyboardPath = path.join(this.userDataPath, KEYBOARD_FILE);
this.versionPath = path.join(this.userDataPath, VERSION_FILE);
}

Expand All @@ -31,19 +28,6 @@ export class State {
}
}

public get keyboardSupport(): boolean {
const keyboardExists = fs.existsSync(this.keyboardPath);
return keyboardExists;
}

public set keyboardSupport(enable: boolean) {
if (enable) {
fs.writeFileSync(this.keyboardPath, FLAG_FILE_VALUE);
} else {
fs.unlinkSync(this.keyboardPath);
}
}

public isVersionUpdated(appVersion: string): boolean {
let versionUpdated = true;
const versionExists = fs.existsSync(this.versionPath);
Expand Down
11 changes: 2 additions & 9 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ function createWindow(): BrowserWindow {
allowRunningInsecureContent: serve,
webSecurity: false
},
focusable: state.keyboardSupport,
focusable: false,
skipTaskbar: true,
show: false
show: false,
});
win.removeMenu();
win.setIgnoreMouseEvents(true);
Expand Down Expand Up @@ -281,13 +281,6 @@ function createTray(): Tray {
label: 'Relaunch', type: 'normal',
click: () => send('app-relaunch')
},
{
label: 'Keyboard Support (experimental)', type: 'checkbox',
checked: state.keyboardSupport, click: () => {
state.keyboardSupport = !state.keyboardSupport;
send('app-relaunch');
}
},
{
label: 'Hardware Acceleration', type: 'checkbox',
checked: state.hardwareAcceleration, click: () => {
Expand Down
168 changes: 166 additions & 2 deletions overlay.babel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<babeledit_project be_version="2.6.1" version="1.2">
<babeledit_project version="1.2" be_version="2.6.1">
<!--

BabelEdit project file
Expand Down Expand Up @@ -2173,6 +2173,64 @@
</translation>
</translations>
</concept_node>
<folder_node>
<name>property</name>
<children>
<concept_node>
<name>range</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>de-DE</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
<translation>
<language>ko-KR</language>
<approved>false</approved>
</translation>
<translation>
<language>pl-PL</language>
<approved>false</approved>
</translation>
<translation>
<language>pt-BR</language>
<approved>false</approved>
</translation>
<translation>
<language>ru-RU</language>
<approved>false</approved>
</translation>
<translation>
<language>th-TH</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHT</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
</children>
</folder_node>
<concept_node>
<name>query</name>
<definition_loaded>false</definition_loaded>
Expand Down Expand Up @@ -2447,7 +2505,7 @@
<name>search</name>
<children>
<concept_node>
<name>disable-max-range</name>
<name>attack</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
Expand All @@ -2473,6 +2531,10 @@
<language>ko-KR</language>
<approved>false</approved>
</translation>
<translation>
<language>pl-PL</language>
<approved>false</approved>
</translation>
<translation>
<language>pt-BR</language>
<approved>false</approved>
Expand All @@ -2485,10 +2547,59 @@
<language>th-TH</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHT</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>defense</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>de-DE</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
<translation>
<language>ko-KR</language>
<approved>false</approved>
</translation>
<translation>
<language>pl-PL</language>
<approved>false</approved>
</translation>
<translation>
<language>pt-BR</language>
<approved>false</approved>
</translation>
<translation>
<language>ru-RU</language>
<approved>false</approved>
</translation>
<translation>
<language>th-TH</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
Expand Down Expand Up @@ -7379,6 +7490,59 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>dialog-opacity</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>de-DE</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
<translation>
<language>ko-KR</language>
<approved>false</approved>
</translation>
<translation>
<language>pl-PL</language>
<approved>false</approved>
</translation>
<translation>
<language>pt-BR</language>
<approved>false</approved>
</translation>
<translation>
<language>ru-RU</language>
<approved>false</approved>
</translation>
<translation>
<language>th-TH</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHT</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<folder_node>
<name>dialog-spawn-position</name>
<children>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "poe-overlay",
"version": "0.6.20",
"version": "0.6.21",
"private": true,
"description": "A Overlay for Path of Exile. Built with Electron and Angular.",
"main": "main.js",
Expand Down
10 changes: 8 additions & 2 deletions src/app/core/service/dialog/dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MatDialog } from '@angular/material/dialog';
import { Point } from '@app/type';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import { GameService } from '../game.service';
import { WindowService } from '../window.service';
import { DialogRefService } from './dialog-ref.service';

Expand All @@ -21,7 +22,8 @@ export class DialogService {
constructor(
private readonly dialog: MatDialog,
private readonly dialogRef: DialogRefService,
private readonly window: WindowService) { }
private readonly window: WindowService,
private readonly game: GameService) { }

public open<T, D, R>(
componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,
Expand All @@ -37,7 +39,10 @@ export class DialogService {
const left = Math.max(Math.min(scaled.x - width * 0.5, bounds.width - width), 0);
const top = Math.max(Math.min(scaled.y - height * 0.5, bounds.height - height), 0);

this.window.enableInput();
if (this.dialog.openDialogs.length === 0) {
this.window.enableInput();
}

const dialogRef = this.dialog.open(componentOrTemplateRef, {
position: {
left: `${left}px`,
Expand All @@ -51,6 +56,7 @@ export class DialogService {
return dialogRef.afterClosed().pipe(tap(() => {
if (this.dialog.openDialogs.length === 0) {
this.window.disableInput();
this.game.focus();
}
this.dialogRef.remove(close);
}));
Expand Down
Loading

0 comments on commit f3f50de

Please sign in to comment.