Skip to content

Commit

Permalink
Merge pull request #29 from HyperPlay-Gaming/update_overlay_toggle
Browse files Browse the repository at this point in the history
[Tech] update toggle overlay
  • Loading branch information
BrettCleary authored Nov 4, 2024
2 parents e370747 + 7b71baa commit b8d03d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperplay/utils",
"version": "0.3.1",
"version": "0.3.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ export interface HyperPlayAPI {
*/
export async function toggleOverlay({
action = 'TOGGLE',
actionCause = 'AUTOMATED',
api
}: {
action?: OverlayAction
actionCause?: OverlayActionCause
api: HyperPlayAPI
}) {
try {
api.backendEvents.emit('overlayToggled', action)
api.backendEvents.emit('overlayToggled', action, actionCause)
} catch (err) {
console.log(`Error in hp overlay toggle ${err}`)
}
Expand Down Expand Up @@ -126,3 +128,5 @@ export type MetaMaskImportOptions = Partial<
export type GamePageActions = 'install' | 'launch'

export type ClientUpdateStatuses = 'idle' | 'updating' | 'updated'

export type OverlayActionCause = 'AUTOMATED' | 'HOTKEY'

0 comments on commit b8d03d9

Please sign in to comment.