-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: janusweb action: commit revision: path_from: revision_from: 3fe7297bb7da5b34324a94cd816f61cab7178c5f: path_to: revision_to:
commit 3fe7297bb7da5b34324a94cd816f61cab7178c5f Author: James Baicoianu <james_github@baicoianu.com> Date: Sat Oct 21 03:04:35 2017 -0700 Save and restore controller configs on load diff --git a/scripts/janusplayer.js b/scripts/janusplayer.js
--- a/scripts/janusplayer.js +++ b/scripts/janusplayer.js @@ -15,6 +15,15 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt cursor_visible: {type: 'boolean', default: true, set: this.toggleCursorVisibility}, usevoip: {type: 'boolean', default: false } }); + + var controllerconfig = this.getSetting('controls.settings'); + if (controllerconfig) { + elation.utils.merge(controllerconfig, this.engine.systems.controls.settings); + } + elation.events.add(this.engine.systems.controls, 'settings_change', elation.bind(this, function() { + this.setSetting('controls.settings', this.engine.systems.controls.settings); + })); + this.controlstate2 = this.engine.systems.controls.addContext('janusplayer', { 'voip_active': ['keyboard_v,keyboard_shift_v', elation.bind(this, this.activateVOIP)], 'browse_back': ['gamepad_any_button_4', elation.bind(this, this.browseBack)],
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 14:19:52 2024