melonJS
    Preparing search index...

    Function setAutoFocus

    • Update the autoFocus flag. Mirrors the enableSwipe / similar function-setter shape used elsewhere in this module — the engine's "bring the window to the front on visibility restore" behaviour can be toggled via me.device.setAutoFocus(false).

      Parameters

      • enable: boolean

        true to keep the default focus-on-restore behaviour, false to opt out

      Returns void

      // disable the auto-focus-on-restore behaviour
      me.device.setAutoFocus(false);