From e3a7f41924b56457d745e1b45b996e867e1194b7 Mon Sep 17 00:00:00 2001 From: Nicklas <38520678+Kyusung4698@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:16:03 +0100 Subject: [PATCH 1/3] - added overwolf.settings.hotkey.update --- overwolf.d.ts | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/overwolf.d.ts b/overwolf.d.ts index 6f7ee74..f724002 100644 --- a/overwolf.d.ts +++ b/overwolf.d.ts @@ -3572,9 +3572,9 @@ declare namespace overwolf.streaming { namespace enums { const enum CaptureErrorCode { Success = 0, - FolderCreation = 1, - RansomwareProtection = 2 , - AlreadyStreaming = 3 , + FolderCreation = 1, + RansomwareProtection = 2, + AlreadyStreaming = 3, MissingSetting = 4, SettingError = 5, InternalOBSError = 6, @@ -4488,7 +4488,7 @@ declare namespace overwolf.os.tray { path: string, callback: CallbackFunction ): void; - + function restoreIcon( callback: CallbackFunction ): void; @@ -6345,23 +6345,40 @@ declare namespace overwolf.settings.hotkeys { shift?: boolean; } - interface UnassignHotkeyObject { + interface HotkeyObject { name: string; gameId?: number; } - interface AssignHotkeyObject extends UnassignHotkeyObject { + interface UpdateHotkeyObject extends HotkeyObject { + customModifierKeyCode?: number; + isPassThrough?: boolean; + } + + type UnassignHotkeyObject = HotkeyObject; + + interface AssignHotkeyObject extends HotkeyObject { modifiers: HotkeyModifiers; virtualKey: number; } + /** + * Update a hotkey for the current extension. + */ + function update( + hotkey: UpdateHotkeyObject, + callback: CallbackFunction + ): void; + /** * Returns the hotkey assigned for the current extension in all the games. */ - function get(callback: CallbackFunction): void; + function get( + callback: CallbackFunction + ): void; /** - * Set hotkey for current extension + * Assign global hotkey for the current extension, OR, if a gameId is specified, assign/unassign a dedicated hotkey. */ function assign( hotkey: AssignHotkeyObject, @@ -6369,7 +6386,7 @@ declare namespace overwolf.settings.hotkeys { ): void; /** - * unassign hotkey for current extension + * Unassign global hotkey for the current extension, OR, if a gameId is specified, assign/unassign a dedicated hotkey. */ function unassign( hotkey: UnassignHotkeyObject, From 788d07831f663b61619ba77c0a243aae31bab61f Mon Sep 17 00:00:00 2001 From: Nicklas <38520678+Kyusung4698@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:23:29 +0100 Subject: [PATCH 2/3] - updated global window to include typeof owad --- owads.d.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/owads.d.ts b/owads.d.ts index 0dbf6e5..d981e96 100644 --- a/owads.d.ts +++ b/owads.d.ts @@ -1,12 +1,12 @@ export declare type EventDispCallback = (data: any) => void; export declare class EventDispatcher { - addEventListener( - eventName: string, - listener: EventDispCallback): boolean; - removeEventListener( - eventName: string, - listener: EventDispCallback): boolean; - fireEvent(eventName: string, eventData: any): null | undefined; + addEventListener( + eventName: string, + listener: EventDispCallback): boolean; + removeEventListener( + eventName: string, + listener: EventDispCallback): boolean; + fireEvent(eventName: string, eventData: any): null | undefined; } export declare type OwAdOptionsSize = { @@ -38,3 +38,10 @@ export declare class OwAd { eventName: string, listener: EventDispCallback): boolean; } + +// extends the global window object with OwAd +declare global { + interface Window { + OwAd?: typeof OwAd; + } +} From cdade6cce98f642bcab4fbd1e5054cbf9bff59e2 Mon Sep 17 00:00:00 2001 From: Nicklas <38520678+Kyusung4698@users.noreply.github.com> Date: Thu, 8 Dec 2022 14:06:21 +0100 Subject: [PATCH 3/3] Revert "- updated global window to include typeof owad" This reverts commit 788d07831f663b61619ba77c0a243aae31bab61f. --- owads.d.ts | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/owads.d.ts b/owads.d.ts index d981e96..0dbf6e5 100644 --- a/owads.d.ts +++ b/owads.d.ts @@ -1,12 +1,12 @@ export declare type EventDispCallback = (data: any) => void; export declare class EventDispatcher { - addEventListener( - eventName: string, - listener: EventDispCallback): boolean; - removeEventListener( - eventName: string, - listener: EventDispCallback): boolean; - fireEvent(eventName: string, eventData: any): null | undefined; + addEventListener( + eventName: string, + listener: EventDispCallback): boolean; + removeEventListener( + eventName: string, + listener: EventDispCallback): boolean; + fireEvent(eventName: string, eventData: any): null | undefined; } export declare type OwAdOptionsSize = { @@ -38,10 +38,3 @@ export declare class OwAd { eventName: string, listener: EventDispCallback): boolean; } - -// extends the global window object with OwAd -declare global { - interface Window { - OwAd?: typeof OwAd; - } -}