diff --git a/App/config.json b/App/config.json index e28308e..1ec4239 100644 --- a/App/config.json +++ b/App/config.json @@ -1 +1 @@ -{"rightClick":88,"leftClick":90} \ No newline at end of file +{"rightClick":88,"leftClick":90,"mouse":false} \ No newline at end of file diff --git a/App/images/cat_m7.png b/App/images/cat_m7.png new file mode 100644 index 0000000..d3b729d Binary files /dev/null and b/App/images/cat_m7.png differ diff --git a/App/images/cat_m8.png b/App/images/cat_m8.png new file mode 100644 index 0000000..b67fd32 Binary files /dev/null and b/App/images/cat_m8.png differ diff --git a/App/images/cat_m9.png b/App/images/cat_m9.png new file mode 100644 index 0000000..0ce259e Binary files /dev/null and b/App/images/cat_m9.png differ diff --git a/App/images/cat_ma.png b/App/images/cat_ma.png new file mode 100644 index 0000000..c912429 Binary files /dev/null and b/App/images/cat_ma.png differ diff --git a/App/images/cat_mb.png b/App/images/cat_mb.png new file mode 100644 index 0000000..e5a9bb7 Binary files /dev/null and b/App/images/cat_mb.png differ diff --git a/App/images/cat_mc.png b/App/images/cat_mc.png new file mode 100644 index 0000000..6988fc8 Binary files /dev/null and b/App/images/cat_mc.png differ diff --git a/App/js/core.js b/App/js/core.js index e902fb7..6a0f0f1 100644 --- a/App/js/core.js +++ b/App/js/core.js @@ -65,4 +65,9 @@ iohook.start(); rightCode = e.keyCode; document.getElementById('right-inp').value = String.fromCharCode(e.keyCode); }; -} \ No newline at end of file +} + +ipcRenderer.on('mtoggle', ()=>{ + config.mouse = !config.mouse; + fs.writeFileSync(__dirname + '/config.json', JSON.stringify(config), 'utf8'); +}); \ No newline at end of file diff --git a/App/js/draw.js b/App/js/draw.js index 006430a..57db110 100644 --- a/App/js/draw.js +++ b/App/js/draw.js @@ -9,11 +9,11 @@ module.exports = ()=>{ } ctx.drawImage(images[mouseArea], 0, 0, 1280, 720, 0, 0, canv.width, canv.height); if (keyMap[config.leftClick]) { - ctx.drawImage(images[6], 0, 0, 1280, 720, 0, 0, canv.width, canv.height); + ctx.drawImage(images[12], 0, 0, 1280, 720, 0, 0, canv.width, canv.height); } else if (keyMap[config.rightClick]) { - ctx.drawImage(images[6], 0, 0, 1280, 720, unit(20), unit(10), canv.width, canv.height); + ctx.drawImage(images[12], 0, 0, 1280, 720, unit(20), unit(10), canv.width, canv.height); } else { - ctx.drawImage(images[7], 0, 0, 1280, 720, unit(10), 0, canv.width, canv.height); + ctx.drawImage(images[13], 0, 0, 1280, 720, unit(10), 0, canv.width, canv.height); } }; diff --git a/App/js/update.js b/App/js/update.js index caab2b0..47750ff 100644 --- a/App/js/update.js +++ b/App/js/update.js @@ -15,5 +15,8 @@ module.exports = ()=>{ } else { mouseArea = downArea; } + if (config.mouse) { + mouseArea += 6; + } } }; \ No newline at end of file diff --git a/main.js b/main.js index 9702dff..5a89cf0 100644 --- a/main.js +++ b/main.js @@ -14,6 +14,12 @@ function createWindow(){ win.webContents.send('keybind'); } }, + { + label: 'Toggle Mouse/Tablet', + click: ()=>{ + win.webContents.send('mtoggle'); + } + }, { label: 'Exit', click: ()=>{