コード例 #1
0
 public void ActionMapcopyBind(coActionMap thisobj, coActionMap otherMap, string command)
     {
     if (otherMap.isObject())
         {
         Util._error("ActionMap::copyBind - \"" + otherMap + "\" is not an object!");
         return;
         }
     string bind = otherMap.getBinding(command);
     if (bind == "")
         return;
     string device = Util.getField(bind, 0);
     string action = Util.getField(bind, 1);
     string flags = otherMap.isInverted(device, action) ? "SDI" : "SD";
     string deadzone = otherMap.getDeadZone(device, action);
     float scale = otherMap.getScale(device, action);
     thisobj.bind(device, action, flags, deadzone, scale.AsString(), command);
     }
コード例 #2
0
        public void ActionMapblockBind(coActionMap thisobj, coActionMap othermap, string command)
            {
            if (othermap.isObject())
                {
                Util._error("ActionMap::blockBind - \"" + othermap + "\" is not an object!");
                return;
                }
            string bind = othermap.getBinding(command);

            if (bind != "")
                thisobj.bind(Util.getField(bind, 0), Util.getField(bind, 1), "");
            }