本文整理汇总了TypeScript中@csegames/camelot-unchained.client.CancelRecordingKeybind方法的典型用法代码示例。如果您正苦于以下问题:TypeScript client.CancelRecordingKeybind方法的具体用法?TypeScript client.CancelRecordingKeybind怎么用?TypeScript client.CancelRecordingKeybind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@csegames/camelot-unchained.client
的用法示例。
在下文中一共展示了client.CancelRecordingKeybind方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: cancel
export function cancel(config: ConfigIndex) {
if (client.debug) console.log('cancel loading config type ' + config);
// clear the callback for the current task if its for this config
if (currentTask && currentTask.type === config) {
currentTask.onconfig = null;
}
// clear callbacks for any matching queued requests
for (let i = 0; i < configQueue.length; i++) {
if (configQueue[i].type === config) {
configQueue[i].onconfig = null;
}
}
if (currentTask && currentTask.type === ConfigIndex.KEYBIND_CHANGED) {
// For KEYBIND_CHANGED requests, we cancel the request,
// and remove the job from the queue.
client.CancelRecordingKeybind();
processQueue();
}
}
示例2: stopRecordingKeybind
export function stopRecordingKeybind() {
client.CancelRecordingKeybind();
if (client.debug) console.log('did stop recording keybind (not listening now)');
cancel(ConfigIndex.KEYBIND_CHANGED);
}