Skip to content

Commit

Permalink
Add user configurable keybind to restart the overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
Gee19 committed Oct 1, 2020
1 parent fd03294 commit 0c305bf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ testem.log
Thumbs.db

# custom
animation.flag
animation.flag

# node version manager
.nvmrc
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ You can change these shortcuts in the user settings menu.
| `F6` | Toggle DND
| `F7` | Opens the user settings menu
| `F8` | Exits overlay
| `F9` | Restarts overlay
| `Alt + Num1` | Open `https://www.poelab.com/`
| `Alt + Num2` | Open `https://wraeclast.com/`
| `Esc` | Close latest dialog
Expand Down
8 changes: 8 additions & 0 deletions src/app/layout/page/overlay/overlay.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ export class OverlayComponent implements OnInit, OnDestroy {
.add(settings.exitAppKeybinding, false, VisibleFlag.Game, VisibleFlag.Overlay)
.subscribe(() => this.app.quit())
}
if (settings.restartAppUserSettingsKeybinding) {
this.shortcut
.add(settings.restartAppUserSettingsKeybinding, false, VisibleFlag.Game, VisibleFlag.Overlay)
.subscribe(() => {
this.app.relaunch()
this.app.quit()
})
}
}

private getContext(settings: UserSettings): Context {
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/service/user-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class UserSettingsService {
let mergedSettings: UserSettings = {
openUserSettingsKeybinding: 'F7',
exitAppKeybinding: 'F8',
restartAppUserSettingsKeybinding: 'F9',
language: Language.English,
uiLanguage: UiLanguage.English,
zoom: 100,
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/type/user-settings.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface UserSettings {
language?: Language
uiLanguage?: UiLanguage
openUserSettingsKeybinding?: string
restartAppUserSettingsKeybinding?: string
exitAppKeybinding?: string
zoom?: number
dialogSpawnPosition?: DialogSpawnPosition
Expand Down

0 comments on commit 0c305bf

Please sign in to comment.