|
@@ -504,10 +504,6 @@ const GodotInput = {
|
|
const func = GodotRuntime.get_func(callback);
|
|
const func = GodotRuntime.get_func(callback);
|
|
const canvas = GodotConfig.canvas;
|
|
const canvas = GodotConfig.canvas;
|
|
function move_cb(evt) {
|
|
function move_cb(evt) {
|
|
- if (evt.pointerType == 'touch') {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const rect = canvas.getBoundingClientRect();
|
|
const rect = canvas.getBoundingClientRect();
|
|
const pos = GodotInput.computePosition(evt, rect);
|
|
const pos = GodotInput.computePosition(evt, rect);
|
|
// Scale movement
|
|
// Scale movement
|
|
@@ -539,10 +535,6 @@ const GodotInput = {
|
|
const func = GodotRuntime.get_func(callback);
|
|
const func = GodotRuntime.get_func(callback);
|
|
const canvas = GodotConfig.canvas;
|
|
const canvas = GodotConfig.canvas;
|
|
function button_cb(p_pressed, evt) {
|
|
function button_cb(p_pressed, evt) {
|
|
- if (evt.pointerType == 'touch') {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const rect = canvas.getBoundingClientRect();
|
|
const rect = canvas.getBoundingClientRect();
|
|
const pos = GodotInput.computePosition(evt, rect);
|
|
const pos = GodotInput.computePosition(evt, rect);
|
|
const modifiers = GodotInput.getModifiers(evt);
|
|
const modifiers = GodotInput.getModifiers(evt);
|
|
@@ -555,8 +547,8 @@ const GodotInput = {
|
|
evt.preventDefault();
|
|
evt.preventDefault();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- GodotEventListeners.add(canvas, 'pointerdown', button_cb.bind(null, 1), false);
|
|
|
|
- GodotEventListeners.add(window, 'pointerup', button_cb.bind(null, 0), false);
|
|
|
|
|
|
+ GodotEventListeners.add(canvas, 'mousedown', button_cb.bind(null, 1), false);
|
|
|
|
+ GodotEventListeners.add(window, 'mouseup', button_cb.bind(null, 0), false);
|
|
},
|
|
},
|
|
|
|
|
|
/*
|
|
/*
|