Pārlūkot izejas kodu

Added some mouse button code/name mapping in Input.

dev-tmpl
Bryan Miller pirms 6 gadiem
vecāks
revīzija
615d171c65
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. +13
    -0
      app/js/ui/Input.js

+ 13
- 0
app/js/ui/Input.js Parādīt failu

@@ -133,6 +133,19 @@ var KEYMAP = {
"currentcodes":[]
};


var MOUSEBYCODE = {
0: "mbl", // (M)ouse (B)utton (L)eft
1: "mbm", // (M)ouse (B)utton (M)iddle
2: "mbr" // (M)ouse (B)utton (R)ight
};

var MOUSEBYNAME = {
"mbl": 0,
"mbm": 1,
"mbr": 2
};

// TODO: Reeval this idea.
const KEYPRESS_DELAY = 350; // Time in milliseconds. NOTE: May make this a variable in future.
const MOUSECLICK_DELAY = 350; // Time in milliseconds.

Notiek ielāde…
Atcelt
Saglabāt