Browse Source

Minor fix

dev-tmpl
Bryan Miller 6 years ago
parent
commit
4bec407e06
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      app/js/main.js

+ 7
- 0
app/js/main.js View File

console.log(e); console.log(e);
} }


function handle_mouseclickevent(e){
console.log("MOUSE CLICK ON BUTTON: ", e.button);
}

function TitlePainter(pal){ function TitlePainter(pal){
var elist = document.querySelectorAll(".color-NES-random"); var elist = document.querySelectorAll(".color-NES-random");
if (elist){ if (elist){
GlobalEvents.emit("set_app_palette", palette); GlobalEvents.emit("set_app_palette", palette);


var input = new Input(); var input = new Input();
input.preventDefaults = true;
input.mouseTargetElement = document.getElementById("painter");
input.listen("keydown", handle_keyevent); input.listen("keydown", handle_keyevent);
input.listen("keyup", handle_keyevent); input.listen("keyup", handle_keyevent);
input.listen("keypress", handle_keyevent); input.listen("keypress", handle_keyevent);
input.listen("mousemove", handle_mouseevent); input.listen("mousemove", handle_mouseevent);
input.listen("mousedown", handle_mouseevent); input.listen("mousedown", handle_mouseevent);
input.listen("mouseup", handle_mouseevent); input.listen("mouseup", handle_mouseevent);
input.listen("mouseclick", handle_mouseclickevent);
} }





Loading…
Cancel
Save