mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Ongoing wipwork of the BaseUI update. Some bugfixes pending
This commit is contained in:
parent
616d974212
commit
ce4c8dabc9
53 changed files with 2033 additions and 3892 deletions
|
|
@ -1,3 +1,25 @@
|
|||
function ActionMap::getCommandButtonBitmap(%this, %device, %command)
|
||||
{
|
||||
%binding = %this.getBinding(%command);
|
||||
|
||||
if(%device $= "mouse" || %device $= "")
|
||||
%device = "keyboard";
|
||||
|
||||
%bindingCount = getFieldCount(%binding);
|
||||
for(%i=0; %i < %bindingCount; %i+=2)
|
||||
{
|
||||
%mapDevice = stripTrailingNumber(getField(%binding, %i));
|
||||
if(%mapDevice $= %device)
|
||||
{
|
||||
%button = getField(%binding, %i+1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
%assetId = getButtonBitmap(%device, %button);
|
||||
return %assetId;
|
||||
}
|
||||
|
||||
function getButtonBitmap(%device, %button)
|
||||
{
|
||||
if(%device $= "gamepad")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue