MCPcopy Create free account
hub / github.com/SpringRoll/SpringRoll / onWindowBlur

Method onWindowBlur

src/controller/Controller.js:64–72  ·  view source on GitHub ↗

* Called on window blur, sets button state to up if button was down; * @return {void}@memberof Controller

()

Source from the content-addressed store, hash-verified

62 * @return {void}@memberof Controller
63 */
64 onWindowBlur() {
65 for (const key of Object.keys(this.buttons)) {
66 const button = this.buttons[key];
67
68 if (button._state === 1) {
69 this.buttons[key].updateState(2);
70 }
71 }
72 }
73
74 /**
75 * Sets an object of button functions to the controller to be called.

Callers

nothing calls this directly

Calls 1

updateStateMethod · 0.45

Tested by

no test coverage detected