Use KeyActionId values wherever possible. Add some further value checks. Assign this.mouseAction properly.

This commit is contained in:
László Monda
2016-03-30 12:31:53 +02:00
parent 17e56fdf7c
commit 5bd6c0a8a0
6 changed files with 26 additions and 21 deletions

View File

@@ -1,7 +1,6 @@
class SwitchKeymapAction extends KeyAction implements Serializable<SwitchKeymapAction> {
static keyActionTypeString = 'switchKeymap';
static keyActionId = 246;
private _keymapId: number;
@@ -34,7 +33,7 @@ class SwitchKeymapAction extends KeyAction implements Serializable<SwitchKeymapA
}
toBinary(buffer: UhkBuffer) {
buffer.writeUInt8(SwitchKeymapAction.keyActionId);
buffer.writeUInt8(KeyActionId.SwitchKeymapAction);
buffer.writeUInt8(this.keymapId);
}
}