Jump to content

[SOLVED] Disabling quick save, quick load, and screen grab function keys


photo

Recommended Posts

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

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:

Link to comment
×
×
  • Create New...