Feature Request: Pause on unfocus apart from preview.

Discussion and feedback on Construct 2

Post » Wed Mar 09, 2016 1:10 pm

Quicksand wrote:I tried that but it doesn't seem to work when NW.JS is used as the browser. Unless I just had it set up wrong.

If that is indeed the case you should file a bug report with the all the requirements right now! (capx + how to reproduce)

Quicksand wrote:Anyway modifying the runtime code myself worked, its just not the most convenient way of going about this.

I like to hear that, I modified a fair amount of C2 files too already. :roll:
What exactly did you change to get it back working like was used to before?
Last edited by TheRealDannyyy on Wed Mar 09, 2016 10:34 pm, edited 1 time in total.
ImageImageImageImage
B
56
S
21
G
77
Posts: 636
Reputation: 43,961

Post » Wed Mar 09, 2016 3:17 pm

TheRealDannyyy wrote:
Quicksand wrote:What exactly did you change to get it back working like was used to before?


This is the code that was already in preview.js:

// Pause on blur (unfocus)
if (this.pauseOnBlur && !this.isMobile)
{
jQuery(window).focus(function ()
{
self["setSuspended"](false);
});

jQuery(window).blur(function ()
{
self["setSuspended"](true);
});
}

I simply moved it outside of the part that made it only activate when in preview mode.

But yeah, I'll try to get it working again with the browser plugin instead.
FREEDOM: Diegesis - Out Now for Windows! http://freedom.quicksandgames.com
B
21
S
5
G
1
Posts: 83
Reputation: 1,793

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: megatronx and 5 guests