Skip to content

Commit

Permalink
Merge pull request #470 from Kyusung4698/develop
Browse files Browse the repository at this point in the history
0.6.13 (2020-03-25)
  • Loading branch information
Kyusung4698 authored Mar 25, 2020
2 parents daa2c40 + 3b557e5 commit e88f8b4
Show file tree
Hide file tree
Showing 34 changed files with 1,449 additions and 1,242 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 0.6.13 (2020-03-25)

- add loading animations
- add keyboard support toggle as tray menu entry (#460)
- add `CmdOrCtrl + F` as supported accelerator (#293, #454)
- add display default values while holding right click (#335)
- update disable keyboard support by defaut (#460)
- update data to 3.10.0f
- fix spacebar closes built in browser by disabling keyboard support (#461)
- fix tooltips not visible by disabling keyboard support (#464)

## 0.6.12 (2020-03-24)

- fix not covering the game correctly (#453, #456)
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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.12
# PoE Overlay 0.6.13

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

#### Shortcuts

You can change these shortcuts in the user settings menu.

|Shortcut |Description
|--- |---
| `ctrl+d` | Displays the item in a frame and evaluates the price. You can open the offical trade site on click of the currency value
| `f7` | Opens the user settings menu

Full list below. Click on `Details`.

<details>

|Shortcut |Description
Expand Down
23 changes: 20 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,20 @@ Object.assign(console, log.functions);
log.info('App starting...');

let animationPath = path.join(app.getPath('userData'), 'animation.flag');
let animationExists = fs.existsSync(animationPath);

log.info(`App checking for animation flag: ${animationPath}.`);
log.info(`App checking for animation flag: ${animationExists}.`);

let animationExists = fs.existsSync(animationPath);
if (animationExists) {
app.disableHardwareAcceleration();
log.info('App disabled hardware acceleration');
log.info('App started with disabled hardware acceleration.');
}

let keyboardPath = path.join(app.getPath('userData'), 'keyboard.flag');
let keyboardExists = fs.existsSync(keyboardPath);

log.info(`App checking for keyboard flag: ${keyboardExists}.`);

autoUpdater.logger = log;

const args = process.argv.slice(1);
Expand Down Expand Up @@ -263,6 +268,7 @@ function createWindow(): BrowserWindow {
allowRunningInsecureContent: serve,
webSecurity: false
},
focusable: keyboardExists,
skipTaskbar: true,
show: false
});
Expand Down Expand Up @@ -370,6 +376,17 @@ function createTray(): Tray {
label: 'Relaunch', type: 'normal',
click: () => send('app-relaunch')
},
{
label: 'Keyboard Support (experimental)', type: 'checkbox',
checked: keyboardExists, click: () => {
if (keyboardExists) {
fs.unlinkSync(keyboardPath);
} else {
fs.writeFileSync(keyboardPath, 'true');
}
send('app-relaunch');
}
},
{
label: 'Hardware Acceleration', type: 'checkbox',
checked: !animationExists, click: () => {
Expand Down
2 changes: 1 addition & 1 deletion overlay.babel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<babeledit_project version="1.2" be_version="2.6.1">
<babeledit_project be_version="2.6.1" version="1.2">
<!--

BabelEdit project file
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.12",
"version": "0.6.13",
"private": true,
"description": "A Overlay for Path of Exile. Built with Electron and Angular.",
"main": "main.js",
Expand Down
16 changes: 16 additions & 0 deletions src/app/core/service/input/shortcut.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ export class ShortcutService {
}
}

public disable(accelerator: string): void {
const index = this.shortcuts.findIndex(x => x.accelerator === accelerator);
if (index !== -1) {
const shortcut = this.shortcuts[index];
this.unregisterShortcut(shortcut);
}
}

public enable(accelerator: string): void {
const index = this.shortcuts.findIndex(x => x.accelerator === accelerator);
if (index !== -1) {
const shortcut = this.shortcuts[index];
this.registerShortcut(shortcut);
}
}

public check(flag: VisibleFlag): void {
this.shortcuts.forEach(shortcut => {
this.unregisterShortcut(shortcut);
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/page/overlay/overlay.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
opacity: 0.5;
text-shadow: $black;
font-family: FontinSmallCaps;
user-select: none;
}
4 changes: 2 additions & 2 deletions src/app/layout/page/overlay/overlay.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, HostListener, Inject, OnDestroy, OnInit } from '@angular/core';
import { AppService, AppTranslateService, RendererService, WindowService, GameService } from '@app/service';
import { AppService, AppTranslateService, GameService, RendererService, WindowService } from '@app/service';
import { DialogRefService } from '@app/service/dialog';
import { ShortcutService } from '@app/service/input';
import { FEATURE_MODULES } from '@app/token';
Expand All @@ -8,7 +8,7 @@ import { SnackBarService } from '@shared/module/material/service';
import { ContextService } from '@shared/module/poe/service';
import { Context } from '@shared/module/poe/type';
import { BehaviorSubject, Observable } from 'rxjs';
import { distinctUntilChanged, flatMap, tap, debounceTime } from 'rxjs/operators';
import { distinctUntilChanged, flatMap, tap } from 'rxjs/operators';
import { UserSettingsService } from '../../service/user-settings.service';
import { UserSettings } from '../../type';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</ng-container>
<ng-template #loading>
<div> {{'evaluate.loading' | translate}} </div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</ng-template>
</app-item-frame>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@
</ng-container>
<ng-template #loading>
<div> {{'evaluate.loading' | translate}} </div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<ng-container *ngIf="(staleCounter$ | async) as counter; else search">
<div class="clickable" (click)="onStaleCancelClick()">
{{'evaluate.stale' | translate:{counter: counter / 10 | number:'1.1-1'} }}
{{'evaluate.stale' | translate}}
</div>
<mat-progress-bar mode="determinate" [value]="staleProgress$ | async"></mat-progress-bar>
</ng-container>
<ng-template #search>
<ng-container *ngIf="(error$ | async) === false; else error">
Expand Down Expand Up @@ -50,6 +51,7 @@
</ng-container>
<ng-template #analyzing>
<div>{{ 'evaluate.analyzing' | translate }}</div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</ng-template>
</ng-container>
<ng-template #canceled>
Expand All @@ -63,6 +65,7 @@
{{'evaluate.listings' | translate:{total: search.total | number} }}&nbsp;<span
class="delayed">{{ 'evaluate.cancel' | translate }}</span>
</div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</ng-template>
</ng-container>
<ng-template #empty>
Expand All @@ -73,6 +76,7 @@
</ng-container>
<ng-template #searching>
<div>{{ 'evaluate.searching' | translate }}</div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</ng-template>
</ng-container>
<ng-template #error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class EvaluateSearchComponent implements OnInit {
public result$ = new BehaviorSubject<ItemSearchAnalyzeResult>(null);
public error$ = new BehaviorSubject<boolean>(false);
public staleCounter$ = new BehaviorSubject<number>(0);
public staleProgress$ = new BehaviorSubject<number>(0);

@Input()
public options: EvaluateOptions;
Expand Down Expand Up @@ -105,6 +106,7 @@ export class EvaluateSearchComponent implements OnInit {
).subscribe(item => {
this.clear();
this.staleCounter$.next(this.settings.evaluateQueryDebounceTime);
this.staleProgress$.next(100);
subscription?.unsubscribe();
subscription = timer(0, 100).pipe(
takeUntil(this.queryItemChange),
Expand All @@ -115,6 +117,13 @@ export class EvaluateSearchComponent implements OnInit {
} else {
this.staleCounter$.next(this.staleCounter$.value - 1)
}

const counter = this.staleCounter$.value - 2;
if (counter % 3 === 0) {
const maxCounter = this.settings.evaluateQueryDebounceTime;
const progress = counter / (maxCounter - 2) * 100;
this.staleProgress$.next(progress);
}
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const KEY_CODES = /^(F24|F23|F22|F21|F20|F19|F18|F17|F16|F15|F14|F13|F12|F11|F10
const PRESERVERED_ACCELERATORS = [
'CmdOrCtrl + C',
'CmdOrCtrl + V',
'CmdOrCtrl + F',
'Alt + F4',
];

Expand Down
6 changes: 5 additions & 1 deletion src/app/shared/module/material/material.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ import { MatExpansionModule } from '@angular/material/expansion';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSelectModule } from '@angular/material/select';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatSliderModule } from '@angular/material/slider';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatTabsModule } from '@angular/material/tabs';
import { TranslateModule } from '@ngx-translate/core';
import { AcceleratorComponent } from './component/accelerator/accelerator.component';
import { SelectListComponent } from './component/select-list/select-list.component';
import { TranslateModule } from '@ngx-translate/core';
import { DragDirective } from './directive/drag.directive';


@NgModule({
imports: [
CommonModule,
Expand All @@ -36,6 +38,7 @@ import { DragDirective } from './directive/drag.directive';
MatSliderModule,
MatListModule,
MatExpansionModule,
MatProgressBarModule,

// third party
TranslateModule,
Expand All @@ -56,6 +59,7 @@ import { DragDirective } from './directive/drag.directive';
MatSliderModule,
MatListModule,
MatExpansionModule,
MatProgressBarModule,
// custom
AcceleratorComponent,
SelectListComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<span (wheel)="onWheel($event)" (mouseup)="onMouseUp($event)">
<span (wheel)="onWheel($event)" (mouseup)="onMouseUp($event)" (mousedown)="onMouseDown($event)">
<ng-content></ng-content>
</span>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export class ItemFrameValueGroupComponent implements AfterViewInit {
this.children = this.values.toArray();
}

public onMouseDown(event: MouseEvent): void {
event.stopImmediatePropagation();
}

public onMouseUp(event: MouseEvent): void {
event.stopImmediatePropagation();
/* tslint:disable */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<span [class.value]="!disabled" [class.changed]="default.min !== value.min || default.max !== value.max"
(wheel)="onWheel($event)" (mouseup)="onMouseUp($event)">
<ng-container *ngIf="value.min === undefined && value.max === undefined">
<span>#</span>
</ng-container>
<span [class.hidden]="!(value.min !== undefined || value.max !== undefined)">
<input class="text" #min [class.hidden]="!(default.min !== value.min || default.max !== value.max)"
(blur)="onBlur(min.value, value.max)" (keyup)="onKeyup()" (wheel)="onWheelMin($event)"
(mouseup)="onMouseUpMin($event)">
<span *ngIf="default.min !== value.min || default.max !== value.max">~</span>
<span *ngIf="default.min === value.min && default.max === value.max">{{value.text}}</span>
<input class="text" #max [class.hidden]="!(default.min !== value.min || default.max !== value.max)"
(blur)="onBlur(value.min, max.value)" (keyup)="onKeyup()" (wheel)="onWheelMax($event)"
(mouseup)="onMouseUpMax($event)">
<span [class.hidden]="(text$ | async) === false" [class.value]="!disabled">{{value.text}}</span>
<span [class.hidden]="text$ | async">
<span [class.value]="!disabled" [class.changed]="default.min !== value.min || default.max !== value.max"
(wheel)="onWheel($event)" (mouseup)="onMouseUp($event)" (mousedown)="onMouseDown($event)">
<ng-container *ngIf="value.min === undefined && value.max === undefined">
<span>#</span>
</ng-container>
<span [class.hidden]="!(value.min !== undefined || value.max !== undefined)">
<input class="text" #min [class.hidden]="!(default.min !== value.min || default.max !== value.max)"
(blur)="onBlur(min.value, value.max)" (keyup)="onKeyup()" (wheel)="onWheelMin($event)"
(mouseup)="onMouseUpMin($event)" (mousedown)="onMouseDown($event)">
<span *ngIf="default.min !== value.min || default.max !== value.max">~</span>
<span *ngIf="default.min === value.min && default.max === value.max">{{value.text}}</span>
<input class="text" #max [class.hidden]="!(default.min !== value.min || default.max !== value.max)"
(blur)="onBlur(value.min, max.value)" (keyup)="onKeyup()" (wheel)="onWheelMax($event)"
(mouseup)="onMouseUpMax($event)" (mousedown)="onMouseDown($event)">
</span>
</span>
</span>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DecimalPipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Inject, Input, OnInit, Output, ViewChild } from '@angular/core';
import { Subject } from 'rxjs';
import { ItemValue } from '../../type';
import { ItemFrameComponent } from '../item-frame/item-frame.component';

Expand Down Expand Up @@ -34,10 +35,13 @@ export class ItemFrameValueComponent implements OnInit {
@Output()
public valueChange = new EventEmitter<ItemValue>();

public text$: Subject<boolean>;

constructor(
@Inject(ItemFrameComponent)
private readonly itemFrame: ItemFrameComponent,
private readonly decimal: DecimalPipe) {
this.text$ = this.itemFrame.text$;
}

public ngOnInit(): void {
Expand All @@ -47,6 +51,10 @@ export class ItemFrameValueComponent implements OnInit {
this.init();
}

public onMouseDown(event: MouseEvent): void {
event.stopImmediatePropagation();
}

public onMouseUp(event: MouseEvent): void {
event.stopImmediatePropagation();
/* tslint:disable */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="frame">
<div class="frame" (mousedown)="onMouseDown($event)" (mouseup)="onMouseUp($event)">
<app-item-frame-header [item]="item" [queryItem]="queryItem"
[queryable]="!item.nameId && (item.rarity === 'normal' || item.rarity === 'magic' || item.rarity === 'rare')" [language]="language">
</app-item-frame-header>
Expand Down
Loading

0 comments on commit e88f8b4

Please sign in to comment.