Hello,
Here is what I am trying to achieve:
I have a window open before the user enters a game, when a user loads a game, the window starts listening for the in game events. This works fine.
When the match is ended, I run some functions that all work fine and the events are all triggered as expected, but I want to have a window pop-up over the game when the match has ended.
What currently happens:
When the match ends, the code to restore the window is triggered, but the window does not appear until I click on the window that is already open, I don’t know why this is happening but this is the crux of the issue.
The code I use to launch the pop-up window:
Manifest File:
"result": {
"file": "dist/result/result.html",
"desktop_only": true,
"native_window": true,
"grab_focus_on_desktop": true,
"resizable": true,
"transparent": true,
"override_on_update": true,
"size": {
"width": 500,
"height": 699
},
"min_size": {
"width": 500,
"height": 699
}
}
From inside of my main window file:
overwolf.windows.obtainDeclaredWindow("result", LoggedIn.instance().openResults);
public openResults(){
overwolf.windows.restore("result");
}
And then from inside of the pop-up window named ‘result’ I create a new instance in the singleton pattern, but the window will not appear until I focus back onto the main window and un-focus from the game, how can I solve this issue?