mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Update utility.tscript
moved addKeyRemap() back to this file so defaultkeybinds can find it in time
This commit is contained in:
parent
2e2b33fcea
commit
0853de7c51
1 changed files with 23 additions and 0 deletions
|
|
@ -195,3 +195,26 @@ function switchLanguage(%language) //use here the #n as it's the order of inclus
|
||||||
getCoreLangTable().setCurrentLanguage(%language);
|
getCoreLangTable().setCurrentLanguage(%language);
|
||||||
Canvas.setContent(Canvas.getContent());
|
Canvas.setContent(Canvas.getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addKeyRemap(%name, %actionMap, %device, %command, %description)
|
||||||
|
{
|
||||||
|
if(%name $= "" ||
|
||||||
|
%actionMap $= "" ||
|
||||||
|
%device $= "" ||
|
||||||
|
%command $= "")
|
||||||
|
{
|
||||||
|
error("addKeybindRemap() - tried to add a remap entry, but didn't have all the keeded info!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// "mouse" is accepted as a convenience, but the remappable actions related functions treat it same as "keyboard".
|
||||||
|
if(%device $= "mouse")
|
||||||
|
%device = "keyboard";
|
||||||
|
|
||||||
|
$RemapName[$RemapCount] = %name;
|
||||||
|
$RemapCmd[$RemapCount] = %command;
|
||||||
|
$RemapActionMap[$RemapCount] = %actionMap;
|
||||||
|
$RemapDevice[$RemapCount] = %device;
|
||||||
|
$RemapDescription[$RemapCount] = %description;
|
||||||
|
$RemapCount++;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue