diff --git a/CHANGELOG.md b/CHANGELOG.md index 38404bc5..63f05100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index e87b1691..5601134a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![GitHub Release Date](https://img.shields.io/github/release-date/Kyusung4698/PoE-Overlay) Become a Patron -# 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. @@ -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 diff --git a/electron/game.ts b/electron/game.ts index f6c61cd6..cb9dbb64 100644 --- a/electron/game.ts +++ b/electron/game.ts @@ -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); } \ No newline at end of file diff --git a/electron/state.ts b/electron/state.ts index 0c523862..462355aa 100644 --- a/electron/state.ts +++ b/electron/state.ts @@ -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); } @@ -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); diff --git a/main.ts b/main.ts index 9d925848..02fc50aa 100644 --- a/main.ts +++ b/main.ts @@ -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); @@ -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: () => { diff --git a/overlay.babel b/overlay.babel index 08b476b1..4249ffa2 100644 --- a/overlay.babel +++ b/overlay.babel @@ -1,4 +1,4 @@ - + + [properties]="properties" [minRange]="propertyMinRange" [maxRange]="propertyMaxRange"> diff --git a/src/app/shared/module/poe/component/item-frame/item-frame.component.ts b/src/app/shared/module/poe/component/item-frame/item-frame.component.ts index 48c3b8f4..9554ce39 100644 --- a/src/app/shared/module/poe/component/item-frame/item-frame.component.ts +++ b/src/app/shared/module/poe/component/item-frame/item-frame.component.ts @@ -25,11 +25,20 @@ export class ItemFrameComponent implements OnInit { @Input() public separator = false; + @Input() + public propertyMinRange = 0.1; + + @Input() + public propertyMaxRange = 0.5; + @Input() public modifierMinRange = 0.1; @Input() - public modifierMaxRange = 0.1; + public modifierMaxRange = 0.5; + + @Input() + public opacity = 0.8; @Input() public properties: []; diff --git a/src/app/shared/module/poe/factory/context.factory.spec.ts b/src/app/shared/module/poe/factory/context.factory.spec.ts new file mode 100644 index 00000000..ecf774b8 --- /dev/null +++ b/src/app/shared/module/poe/factory/context.factory.spec.ts @@ -0,0 +1,27 @@ +import { TestBed } from '@angular/core/testing'; +import { SharedModule } from '@shared/shared.module'; +import { ContextFactory } from '.'; +import { Language } from '../type'; + +describe('ContextFactory', () => { + let sut: ContextFactory; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + SharedModule + ] + }).compileComponents(); + sut = TestBed.inject(ContextFactory); + }); + + it(`should reset invalid league id`, (done) => { + const invalid = 'invalid'; + sut.create({ + language: Language.English, + leagueId: invalid + }).subscribe(context => { + expect(context.leagueId).not.toEqual(invalid); + done(); + }, () => done()); + }); +}); diff --git a/src/app/shared/module/poe/service/context.service.ts b/src/app/shared/module/poe/service/context.service.ts index 2faf8317..9b60d3b9 100644 --- a/src/app/shared/module/poe/service/context.service.ts +++ b/src/app/shared/module/poe/service/context.service.ts @@ -26,13 +26,4 @@ export class ContextService { public update(context: Context): void { this.contextSubject.next(context); } - - public change(): Observable { - return this.contextSubject.pipe( - map(context => { - // return copy - return { ...context }; - }) - ); - } } diff --git a/src/app/shared/module/poe/service/item/parser/item-post-parser-damage.service.ts b/src/app/shared/module/poe/service/item/parser/item-post-parser-damage.service.ts index df54bd1d..ad416d03 100644 --- a/src/app/shared/module/poe/service/item/parser/item-post-parser-damage.service.ts +++ b/src/app/shared/module/poe/service/item/parser/item-post-parser-damage.service.ts @@ -54,7 +54,7 @@ export class ItemPostParserDamageService implements ItemPostParserService { const dps = this.addAps(weaponAttacksPerSecond, damage); const value: ItemValue = { - text: `${dps}`, + text: `${Math.round(dps * 10) / 10}`, tier: { min: this.addAps(weaponAttacksPerSecond, weaponPhysicalDamage.value.tier.min), max: this.addAps(weaponAttacksPerSecond, weaponPhysicalDamage.value.tier.max), @@ -73,7 +73,7 @@ export class ItemPostParserDamageService implements ItemPostParserService { const dps = this.addAps(weaponAttacksPerSecond, totalDamage); const value: ItemValue = { - text: `${dps}` + text: `${Math.round(dps * 10) / 10}` }; return value; } @@ -88,7 +88,7 @@ export class ItemPostParserDamageService implements ItemPostParserService { const dps = this.addAps(weaponAttacksPerSecond, damage); const value: ItemValue = { - text: `${dps}` + text: `${Math.round(dps * 10) / 10}` }; return value; } diff --git a/src/assets/i18n/english.json b/src/assets/i18n/english.json index 52e32c03..28a15a0b 100644 --- a/src/assets/i18n/english.json +++ b/src/assets/i18n/english.json @@ -54,6 +54,9 @@ "default": "Default" }, "profiles": "Preselected Profiles", + "property": { + "range": "Min-Max Range" + }, "query": "Query", "range": "Range", "result-view": "Result View", @@ -62,7 +65,8 @@ "list": "List" }, "search": { - "disable-max-range": "Disable Max Range", + "attack": "Attack", + "defense": "Defense", "filter": "Filter", "gem": "Gem Level, Map Tier & Quality", "item-default-links": "Item Link", @@ -177,6 +181,7 @@ "auto-launch": "Run on Boot", "cancel": "Cancel", "dialog": "Dialog", + "dialog-opacity": "Dialog Opacity", "dialog-spawn-position": { "center": "Center", "cursor": "Cursor" diff --git a/src/assets/i18n/french.json b/src/assets/i18n/french.json index 26a6e359..b4bf6d76 100644 --- a/src/assets/i18n/french.json +++ b/src/assets/i18n/french.json @@ -54,6 +54,9 @@ "default": "Défaut" }, "profiles": "Profils présélectionnés", + "property": { + "range": "Gamme Min-Max" + }, "query": "Question", "range": "Range", "result-view": "Affichage des résultats", @@ -62,7 +65,8 @@ "list": "liste" }, "search": { - "disable-max-range": "Désactiver la plage maximale", + "attack": "Attaque", + "defense": "La défense", "filter": "Filtre", "gem": "Niveau de gemme, pallier de carte et qualité", "item-default-links": "Lien d'objet", @@ -177,6 +181,7 @@ "auto-launch": "Exécuter au démarrage", "cancel": "Annuler", "dialog": "Dialogue", + "dialog-opacity": "Opacité de la boîte de dialogue", "dialog-spawn-position": { "center": "Centre", "cursor": "Le curseur" diff --git a/src/assets/i18n/german.json b/src/assets/i18n/german.json index 2d0a4266..2c53024a 100644 --- a/src/assets/i18n/german.json +++ b/src/assets/i18n/german.json @@ -54,6 +54,9 @@ "default": "Standard" }, "profiles": "Vorausgewählte Profile", + "property": { + "range": "Min-Max-Bereich" + }, "query": "Abfrage", "range": "Bereich", "result-view": "Ergebnisansicht", @@ -62,7 +65,8 @@ "list": "Liste" }, "search": { - "disable-max-range": "Maximalen Wertebereich deaktivieren", + "attack": "Attacke", + "defense": "Verteidigung", "filter": "Filter", "gem": "Edelsteinstufe, Kartenstufe und -qualität", "item-default-links": "Item Link", @@ -177,6 +181,7 @@ "auto-launch": "Beim Booten ausführen", "cancel": "Abbrechen", "dialog": "Dialog", + "dialog-opacity": "Dialogopazität", "dialog-spawn-position": { "center": "Center", "cursor": "Mauszeiger" diff --git a/src/assets/i18n/korean.json b/src/assets/i18n/korean.json index 5bfd3438..278bb853 100644 --- a/src/assets/i18n/korean.json +++ b/src/assets/i18n/korean.json @@ -54,6 +54,9 @@ "default": "태만" }, "profiles": "미리 선택된 프로파일", + "property": { + "range": "최소 최대 범위" + }, "query": "질문", "range": "Range", "result-view": "결과보기", @@ -62,7 +65,8 @@ "list": "명부" }, "search": { - "disable-max-range": "최대 범위 비활성화", + "attack": "공격", + "defense": "방어", "filter": "필터", "gem": "보석 레벨, 지도 등급 및 품질", "item-default-links": "아이템 링크", @@ -177,6 +181,7 @@ "auto-launch": "부팅시 실행", "cancel": "취소", "dialog": "대화", + "dialog-opacity": "대화 상자 불투명도", "dialog-spawn-position": { "center": "센터", "cursor": "커서" diff --git a/src/assets/i18n/polish.json b/src/assets/i18n/polish.json index 49f7ba9d..c7fc5a48 100644 --- a/src/assets/i18n/polish.json +++ b/src/assets/i18n/polish.json @@ -54,6 +54,9 @@ "default": "domyślna" }, "profiles": "Wstępnie wybrane profile", + "property": { + "range": "Zakres od minimum do maksimum" + }, "query": "pytanie", "range": "Zakres", "result-view": "Okno wyników", @@ -62,7 +65,8 @@ "list": "Lista" }, "search": { - "disable-max-range": "Wyłącz maksymalny zakres", + "attack": "Atak", + "defense": "Obrona", "filter": "filtr", "gem": "Poziom gemów, map oraz jakość", "item-default-links": "Z połączonymi gniazdami ", @@ -177,6 +181,7 @@ "auto-launch": "Uruchom wraz ze startem systemu", "cancel": "Anuluj", "dialog": "Okno dialogowe", + "dialog-opacity": "Okno dialogowe Krycie", "dialog-spawn-position": { "center": "Na środku", "cursor": "Kursor myszy" diff --git a/src/assets/i18n/portuguese.json b/src/assets/i18n/portuguese.json index b6c8014f..b82ac9c0 100644 --- a/src/assets/i18n/portuguese.json +++ b/src/assets/i18n/portuguese.json @@ -54,6 +54,9 @@ "default": "Padrão" }, "profiles": "Perfis pré-selecionados", + "property": { + "range": "Min-Max Range" + }, "query": "Inquerir", "range": "Range", "result-view": "Visualização de resultados", @@ -62,7 +65,8 @@ "list": "Lista" }, "search": { - "disable-max-range": "Desativar intervalo máximo", + "attack": "Ataque", + "defense": "Defesa", "filter": "Filtro", "gem": "Nível da gema, nível do mapa e qualidade", "item-default-links": "Link do item", @@ -177,6 +181,7 @@ "auto-launch": "Executar na inicialização", "cancel": "Cancelar", "dialog": "Diálogo", + "dialog-opacity": "Opacidade da caixa de diálogo", "dialog-spawn-position": { "center": "centro", "cursor": "Cursor" diff --git a/src/assets/i18n/russian.json b/src/assets/i18n/russian.json index 0bc00f88..b66987d3 100644 --- a/src/assets/i18n/russian.json +++ b/src/assets/i18n/russian.json @@ -54,6 +54,9 @@ "default": "По умолчанию" }, "profiles": "Предварительно выбранные профили", + "property": { + "range": "Мин-Макс Диапазон" + }, "query": "запрос", "range": "Разброс", "result-view": "Просмотр результатов", @@ -62,7 +65,8 @@ "list": "Список" }, "search": { - "disable-max-range": "Отключить максимальный диапазон", + "attack": "Атака", + "defense": "Защита", "filter": "Фильтр", "gem": "Уровень камня, уровень карты и качества", "item-default-links": "Связи для камней умений", @@ -177,6 +181,7 @@ "auto-launch": "Запустить на включении", "cancel": "Отменить", "dialog": "Диалог", + "dialog-opacity": "Непрозрачность диалога", "dialog-spawn-position": { "center": "По центру", "cursor": "У курсора" diff --git a/src/assets/i18n/simplified-chinese.json b/src/assets/i18n/simplified-chinese.json index 838a1dba..06a2c0d6 100644 --- a/src/assets/i18n/simplified-chinese.json +++ b/src/assets/i18n/simplified-chinese.json @@ -54,6 +54,9 @@ "default": "默认" }, "profiles": "预选个人资料", + "property": { + "range": "最小最大范围" + }, "query": "询问", "range": "范围", "result-view": "结果视图", @@ -62,7 +65,8 @@ "list": "名单" }, "search": { - "disable-max-range": "禁用最大范围", + "attack": "攻击", + "defense": "防御", "filter": "过滤", "gem": "宝石等级,地图等级和品质", "item-default-links": "物品链接", @@ -177,6 +181,7 @@ "auto-launch": "开机运行", "cancel": "取消", "dialog": "对话", + "dialog-opacity": "对话不透明度", "dialog-spawn-position": { "center": "中央", "cursor": "光标" diff --git a/src/assets/i18n/spanish.json b/src/assets/i18n/spanish.json index 796a63f9..3a85a6af 100644 --- a/src/assets/i18n/spanish.json +++ b/src/assets/i18n/spanish.json @@ -54,6 +54,9 @@ "default": "Defecto" }, "profiles": "Perfiles preseleccionados", + "property": { + "range": "Rango Min-Max" + }, "query": "consulta", "range": "Range", "result-view": "Vista de resultados", @@ -62,7 +65,8 @@ "list": "Lista" }, "search": { - "disable-max-range": "Deshabilitar rango máximo", + "attack": "Ataque", + "defense": "Defensa", "filter": "Filtrar", "gem": "Nivel de gema, nivel de mapa y calidad", "item-default-links": "Enlace de artículo", @@ -177,6 +181,7 @@ "auto-launch": "Ejecutar en arranque", "cancel": "Cancelar", "dialog": "Diálogo", + "dialog-opacity": "Diálogo Opacidad", "dialog-spawn-position": { "center": "Centrar", "cursor": "Cursor" diff --git a/src/assets/i18n/thai.json b/src/assets/i18n/thai.json index d3b8ac21..8bb387e3 100644 --- a/src/assets/i18n/thai.json +++ b/src/assets/i18n/thai.json @@ -54,6 +54,9 @@ "default": "ค่าเริ่มต้น" }, "profiles": "โปรไฟล์ที่เลือกไว้ล่วงหน้า", + "property": { + "range": "ช่วง Min-Max" + }, "query": "สอบถาม", "range": "Range", "result-view": "ดูผลลัพธ์", @@ -62,7 +65,8 @@ "list": "รายการ" }, "search": { - "disable-max-range": "ปิดการใช้งาน Max Range", + "attack": "โจมตี", + "defense": "ป้องกัน", "filter": "กรอง", "gem": "ระดับอัญมณีแผนที่ชั้นและคุณภาพ", "item-default-links": "ลิงค์รายการ", @@ -177,6 +181,7 @@ "auto-launch": "ทำงานบน Boot", "cancel": "ยกเลิก", "dialog": "โต้ตอบ", + "dialog-opacity": "ความทึบของไดอะล็อก", "dialog-spawn-position": { "center": "ศูนย์", "cursor": "เคอร์เซอร์" diff --git a/src/assets/i18n/traditional-chinese.json b/src/assets/i18n/traditional-chinese.json index 7cdc3d9c..0e484912 100644 --- a/src/assets/i18n/traditional-chinese.json +++ b/src/assets/i18n/traditional-chinese.json @@ -54,6 +54,9 @@ "default": "默認" }, "profiles": "預選個人資料", + "property": { + "range": "最小最大範圍" + }, "query": "詢問", "range": "範圍", "result-view": "結果視圖", @@ -62,7 +65,8 @@ "list": "名單" }, "search": { - "disable-max-range": "禁用最大範圍", + "attack": "攻擊", + "defense": "防禦", "filter": "過濾", "gem": "寶石等級,地圖等級和品質", "item-default-links": "物品鏈接", @@ -177,6 +181,7 @@ "auto-launch": "開機運行", "cancel": "取消", "dialog": "對話", + "dialog-opacity": "對話不透明度", "dialog-spawn-position": { "center": "中央", "cursor": "光標"