Bug fixes

This commit is contained in:
asraelite 2018-03-09 20:07:31 +00:00
parent 17df8c0863
commit 8a0bf0ada9
10 changed files with 187 additions and 30 deletions

View file

@ -17,7 +17,9 @@ export const mapping = {
toggleTrace: 'KeyT',
toggleMarkers: 'KeyR',
toggleMusic: 'KeyM',
togglePause: 'KeyP'
togglePause: 'KeyP',
zoomIn: 'KeyZ',
zoomOut: 'KeyX'
};
let held, pressed;
@ -34,7 +36,17 @@ export function tick() {
if (!state.editing) {
if (input.mouse.scroll !== 0) {
graphics.changeZoom(-input.mouse.scroll);
// Fix for Firefox.
let delta = input.mouse.scroll > 0 ? -50 : 50;
graphics.changeZoom(delta);
}
if (held[mapping.zoomIn]) {
graphics.changeZoom(-10);
}
if (held[mapping.zoomOut]) {
graphics.changeZoom(10);
}
if (pressed[mapping.togglePause] && !state.gameOver) {