Settings/controls: Fix adding new command block

This commit is contained in:
Tamius Han 2019-04-11 23:52:29 +02:00
parent 7837cf2e22
commit 80b7654db5
2 changed files with 7 additions and 4 deletions
src/options/controls-settings

View File

@ -22,7 +22,7 @@
> >
</CommandAddEdit> </CommandAddEdit>
<pre> <pre style="height: 500px; overflow-y: scroll; overflow-x: hidden">
----- [ raw action data ] ----- ----- [ raw action data ] -----
Action: Action:
{{action}} {{action}}
@ -199,10 +199,13 @@ export default {
}, },
updateCommand(action, arg, customArg) { updateCommand(action, arg, customArg) {
this.addEditCommand = false; this.addEditCommand = false;
console.log("update command received. args:", {action, arg, customArg})
if (this.currentCmdIndex < 0) { if (this.currentCmdIndex < 0) {
this.action.cmd.push({ this.action.cmd.push({
cmd: action, action: action,
arg: arg, arg: arg.arg,
customArg: customArg, customArg: customArg,
}); });
} else { } else {

View File

@ -140,7 +140,7 @@ export default {
}, },
setArgument(arg) { setArgument(arg) {
console.log("SETTING ARG:", arg) console.log("SETTING ARG:", arg)
this.selectedArgument = ActionList[this.selectedAction].args.find(x => x.arg === arg); this.selectedArgument = ActionList[this.selectedAction].args.find(x => x.arg == arg);
this.customArgumentValue = undefined; this.customArgumentValue = undefined;
}, },
emitCommand() { emitCommand() {