sam.price Posted April 11, 2016 Share Posted April 11, 2016 I am trying to disable the quick save(F5), quick load(F6), and screen grab(F12) keys. I track down where they were being set to these lines in system.h in core.ung: if(get_key_state(CONTROLS_STATE_SAVE)) engine.console.run("state_save"); if(get_key_state(CONTROLS_STATE_RESTORE)) engine.console.run("state_restore"); if(get_key_state(CONTROLS_STATE_SCREENSHOT)) engine.console.run("video_grab"); Is there any other method of removing those commands without modifying the core.ung file? I don't want to have to modify those lines with every engine upgrade, also I don't want to remove the command from the console. I just want to remove the calling of it with the function keys. Thanks, Sam Link to comment
silent Posted April 11, 2016 Share Posted April 11, 2016 Hi Sam, I think you can use something like that in your project: engine.controls.setStateKey(CONTROLS_STATE_SAVE,0); engine.controls.setStateKey(CONTROLS_STATE_RESTORE,0); engine.controls.setStateKey(CONTROLS_STATE_SCREENSHOT,0); without modifying core/scripts/system/system.h.You can also check the disable_system_script_bindings function inside data/editor/editor_hotkeys.h. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
sam.price Posted April 13, 2016 Author Share Posted April 13, 2016 Worked like a charm. Thank you. Link to comment
Recommended Posts