Skip to content

Commit

Permalink
feat add window resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Wurielle committed Nov 3, 2024
1 parent 17fe9b8 commit a08dd9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/app/src/electron/game-overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ class GameOverlay {
])

this.Overlay!.setEventCallback((event: string, payload: any) => {
if (event === 'graphics.window.event.resize') {
const focusWin = this.windows.get('messenger-game-overlay')
if (focusWin) {
const { width, height } = payload
focusWin.setSize(width, height)
}

}
if (event === 'game.input') {
const window = BrowserWindow.fromId(payload.windowId)
if (window) {
Expand Down

0 comments on commit a08dd9d

Please sign in to comment.