From 0a5e832dfddcc6184410e8836cc8dea030457486 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 7 Sep 2020 20:12:43 -0400 Subject: Mouse inputs (#783) * Add mouse icon * Add _updateModifiers * Add support for mouse button modifiers * Improve names of mouse inputs * Improve mouse input sorting * Rename getModifierKeyStrings to getModifierInputStrings * Refactor keyboard/mouse inputs into KeyboardMouseInputField --- ext/mixed/js/core.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js index c5c6fef2..8b044a67 100644 --- a/ext/mixed/js/core.js +++ b/ext/mixed/js/core.js @@ -341,6 +341,14 @@ class EventListenerCollection { return this._eventListeners.length; } + addGeneric(type, object, ...args) { + switch (type) { + case 'addEventListener': return this.addEventListener(object, ...args); + case 'addListener': return this.addListener(object, ...args); + case 'on': return this.on(object, ...args); + } + } + addEventListener(object, ...args) { object.addEventListener(...args); this._eventListeners.push(['removeEventListener', object, ...args]); -- cgit v1.2.3