Skip to content

Commit

Permalink
Release v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Fry98 committed Sep 18, 2018
2 parents 9448639 + 47765f9 commit 7f79a29
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion App/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"rightClick":88,"leftClick":90}
{"rightClick":88,"leftClick":90,"mouse":false}
Binary file added App/images/cat_m7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added App/images/cat_m8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added App/images/cat_m9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added App/images/cat_ma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added App/images/cat_mb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added App/images/cat_mc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion App/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,9 @@ iohook.start();
rightCode = e.keyCode;
document.getElementById('right-inp').value = String.fromCharCode(e.keyCode);
};
}
}

ipcRenderer.on('mtoggle', ()=>{
config.mouse = !config.mouse;
fs.writeFileSync(__dirname + '/config.json', JSON.stringify(config), 'utf8');
});
6 changes: 3 additions & 3 deletions App/js/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down
3 changes: 3 additions & 0 deletions App/js/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ module.exports = ()=>{
} else {
mouseArea = downArea;
}
if (config.mouse) {
mouseArea += 6;
}
}
};
6 changes: 6 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ function createWindow(){
win.webContents.send('keybind');
}
},
{
label: 'Toggle Mouse/Tablet',
click: ()=>{
win.webContents.send('mtoggle');
}
},
{
label: 'Exit',
click: ()=>{
Expand Down

0 comments on commit 7f79a29

Please sign in to comment.