Skip to content

Commit

Permalink
Merge pull request #3 from YuriXbr/BETA-1.2.0
Browse files Browse the repository at this point in the history
commit
  • Loading branch information
YuriXbr authored Apr 30, 2024
2 parents 56e3ac6 + 50d3a66 commit b30baaf
Show file tree
Hide file tree
Showing 20 changed files with 620 additions and 482 deletions.
4 changes: 2 additions & 2 deletions configExample.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"__DevComments": {
"textENUS": "Use this file to change the AutoClicker configurations, tutorial: https://github.com/YuriXbr/LeagueClicker/blob/BETA-1.0.0/README.md",
"textPTBR": "Utilize esse arquivo para configurar o autoclicker, tutorial: https://github.com/YuriXbr/LeagueClicker/blob/BETA-1.0.0/README.md"
"textENUS": "Use this file to change the AutoClicker configurations, tutorial: https://github.com/YuriXbr/LeagueClicker/",
"textPTBR": "Utilize esse arquivo para configurar o autoclicker, tutorial: https://github.com/YuriXbr/LeagueClicker/"
},
"keybinds": {
"recordMousePosition": "CommandOrControl+R",
Expand Down
35 changes: 29 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, Menu, Tray, globalShortcut, dialog } = require('electron');
const { ipcMain, ipcRenderer } = require('electron');
if (require('electron-squirrel-startup')) app.quit();

const { mouse } = require("@nut-tree/nut-js");
Expand All @@ -9,8 +10,20 @@ const localeManager = require('./src/utils/localeManager.js');
const configManager = require('./src/utils/configManager.js');
const keyManager = require('./src/utils/keyManager.js');
const mouseManager = require('./src/utils/mouseManager.js');
const windowManager = require('./src/utils/windowManager.js');
const cache = require('./src/configs/cache.js')

app.on('ready', () => {
setup();
loop();
});

async function setup() {
await configManager.setupConfig();
localeManager.setupLocales();
await keyManager.setupKeybinds();
}



function setup() {
Expand Down Expand Up @@ -54,21 +67,31 @@ async function quit() {
app.quit();
}

app.on('ready', () => {
setup();
loop();
});

app.on('before-quit', (event) => {
require('./src/utils/trayManager.js').closeTray();
console.log("\n\n\nRecorded Positions:\n");
cache._recordedPositions.forEach((pos, index) => {
if(pos[0] != undefined) console.log(`index: ${index} ; X: ${pos[0]} Y: ${pos[1]}`);
});
windowManager.closeAllWindows();

});

ipcMain.on('request-config', (event) => {
const keybinds = configManager.getConfig().keybinds;
console.log("enviando", {keybinds})
event.reply('config-response', {keybinds});
});

ipcMain.on('update-keybinds', (event, newKeybinds) => {
console.log({newKeybinds});
configManager.updateToFile('keybinds', newKeybinds);
setup();

})

module.exports = {
setup,
loop,
quit,
}
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LeagueClicker",
"version": "1.1.0",
"version": "1.2.0",
"description": "League Auto Clicker",
"main": "index.js",
"scripts": {
Expand Down
64 changes: 32 additions & 32 deletions src/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"code": "en-US",
"tray": {
"header": "KEYBINDS:",
"recordMousePosition": "Record Mouse Position:",
"showPositions": "Show Positions",
"pauseResumeMacro": "Pause/Resume Macro:",
"pauseResumeMouseReading": "Pause/Resume Mouse Reading:",
"exit": "Exit:",

"previewClicks": "Preview Clicks",
"startQueue": "Start Queue:",
"acceptMatch": "Accept Match:",
"closeError1": "Close Error (1):",
"closeError2": "Close Error (2):",
"buyChampion1": "Buy Champion (1):",
"buyChampion2": "Buy Champion (2):",
"buyChampion3": "Buy Champion (3):",
"buyChampion4": "Buy Champion (4):",
"buyChampion5": "Buy Champion (5):",
"walkToCenter": "Walk to Center:",
"selectCard": "Select Card:",
"quitMatch": "Quit Match:",
"playAgain": "Play Again:",
"extra1": "Extra Position (1):",
"extra2": "Extra Position (2):",
"extra3": "Extra Position (3):",

"updateKeybinds": "Update Keybinds",
"quit": "Quit"
}
}
{
"code": "en-US",
"tray": {
"header": "KEYBINDS:",
"recordMousePosition": "Record Mouse Position:",
"showPositions": "Show Positions",
"pauseResumeMacro": "Pause/Resume Macro:",
"pauseResumeMouseReading": "Pause/Resume Mouse Reading:",
"exit": "Exit:",

"previewClicks": "Preview Clicks",
"startQueue": "Start Queue:",
"acceptMatch": "Accept Match:",
"closeError1": "Close Error (1):",
"closeError2": "Close Error (2):",
"buyChampion1": "Buy Champion (1):",
"buyChampion2": "Buy Champion (2):",
"buyChampion3": "Buy Champion (3):",
"buyChampion4": "Buy Champion (4):",
"buyChampion5": "Buy Champion (5):",
"walkToCenter": "Walk to Center:",
"selectCard": "Select Card:",
"quitMatch": "Quit Match:",
"playAgain": "Play Again:",
"extra1": "Extra Position (1):",
"extra2": "Extra Position (2):",
"extra3": "Extra Position (3):",

"updateKeybinds": "Update Keybinds",
"quit": "Quit"
}
}
64 changes: 32 additions & 32 deletions src/locales/es-ES.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"code": "es-ES",
"tray": {
"header": "ATAJOS DE TECLADO:",
"recordMousePosition": "Grabar posición del ratón:",
"showPositions": "Mostrar posiciones",
"pauseResumeMacro": "Pausar/Reanudar Macro:",
"pauseResumeMouseReading": "Pausar/Reanudar Lectura del Ratón:",
"exit": "Salir:",

"previewClicks": "Previsualizar Clicks",
"startQueue": "Iniciar Cola:",
"acceptMatch": "Aceptar Partida:",
"closeError1": "Cerrar Error (1):",
"closeError2": "Cerrar Error (2):",
"buyChampion1": "Comprar Campeón (1):",
"buyChampion2": "Comprar Campeón (2):",
"buyChampion3": "Comprar Campeón (3):",
"buyChampion4": "Comprar Campeón (4):",
"buyChampion5": "Comprar Campeón (5):",
"walkToCenter": "Caminar al Centro:",
"selectCard": "Seleccionar Carta:",
"quitMatch": "Salir de la Partida:",
"playAgain": "Jugar de Nuevo:",
"extra1": "Posición Extra (1):",
"extra2": "Posición Extra (2):",
"extra3": "Posición Extra (3):",

"updateKeybinds": "Actualizar Atajos",
"quit": "Salir"
}
}
{
"code": "es-ES",
"tray": {
"header": "ATAJOS DE TECLADO:",
"recordMousePosition": "Grabar posición del ratón:",
"showPositions": "Mostrar posiciones",
"pauseResumeMacro": "Pausar/Reanudar Macro:",
"pauseResumeMouseReading": "Pausar/Reanudar Lectura del Ratón:",
"exit": "Salir:",

"previewClicks": "Previsualizar Clicks",
"startQueue": "Iniciar Cola:",
"acceptMatch": "Aceptar Partida:",
"closeError1": "Cerrar Error (1):",
"closeError2": "Cerrar Error (2):",
"buyChampion1": "Comprar Campeón (1):",
"buyChampion2": "Comprar Campeón (2):",
"buyChampion3": "Comprar Campeón (3):",
"buyChampion4": "Comprar Campeón (4):",
"buyChampion5": "Comprar Campeón (5):",
"walkToCenter": "Caminar al Centro:",
"selectCard": "Seleccionar Carta:",
"quitMatch": "Salir de la Partida:",
"playAgain": "Jugar de Nuevo:",
"extra1": "Posición Extra (1):",
"extra2": "Posición Extra (2):",
"extra3": "Posición Extra (3):",

"updateKeybinds": "Actualizar Atajos",
"quit": "Salir"
}
}
63 changes: 31 additions & 32 deletions src/locales/pt-BR.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
{
"code": "pt-BR" ,
"tray": {
"header": "TECLAS DE ATALHO:",
"recordMousePosition": "Gravar posição do mouse",
"showPositions": "Mostrar posições",
"pauseResumeMacro": "Pausar/Resumir Macro",
"pauseResumeMouseReading": "Pausar/Resumir Leitura do mouse",
"exit": "Sair",

"previewClicks": "Testar Cliques",
"startQueue": "Iniciar Fila:",
"acceptMatch": "Aceitar Partida:",
"closeError1": "Fechar Erro (1):",
"closeError2": "Fechar Erro (2):",
"buyChampion1": "Comprar Campeão (1):",
"buyChampion2": "Comprar Campeão (2):",
"buyChampion3": "Comprar Campeão (3):",
"buyChampion4": "Comprar Campeão (4):",
"buyChampion5": "Comprar Campeão (5):",
"walkToCenter": "Andar Para o Centro:",
"selectCard": "Selecionar Carta:",
"quitMatch": "sair da Partida:",
"playAgain": "Jogar Novamente:",
"extra1": "Posição Extra (1):",
"extra2": "Posição Extra (2):",
"extra3": "Posição Extra (3):",

"updateKeybinds": "Atualizar atalhos",
"quit": "Sair"
}

{
"code": "pt-BR" ,
"tray": {
"header": "TECLAS DE ATALHO:",
"recordMousePosition": "Gravar posição do mouse",
"showPositions": "Mostrar posições",
"pauseResumeMacro": "Pausar/Resumir Macro",
"pauseResumeMouseReading": "Pausar/Resumir Leitura do mouse",
"exit": "Sair",

"previewClicks": "Testar Cliques",
"startQueue": "Iniciar Fila:",
"acceptMatch": "Aceitar Partida:",
"closeError1": "Fechar Erro (1):",
"closeError2": "Fechar Erro (2):",
"buyChampion1": "Comprar Campeão (1):",
"buyChampion2": "Comprar Campeão (2):",
"buyChampion3": "Comprar Campeão (3):",
"buyChampion4": "Comprar Campeão (4):",
"buyChampion5": "Comprar Campeão (5):",
"walkToCenter": "Andar Para o Centro:",
"selectCard": "Selecionar Carta:",
"quitMatch": "sair da Partida:",
"playAgain": "Jogar Novamente:",
"extra1": "Posição Extra (1):",
"extra2": "Posição Extra (2):",
"extra3": "Posição Extra (3):",

"updateKeybinds": "Atualizar atalhos",
"quit": "Sair"
}
}
64 changes: 32 additions & 32 deletions src/locales/ru-RU.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"code": "ru-RU",
"tray": {
"header": "ГОРЯЧИЕ КЛАВИШИ:",
"recordMousePosition": "Записать положение мыши:",
"showPositions": "Показать позиции",
"pauseResumeMacro": "Приостановить/Возобновить макрос:",
"pauseResumeMouseReading": "Приостановить/Возобновить чтение мыши:",
"exit": "Выйти:",

"previewClicks": "Предварительный просмотр кликов",
"startQueue": "Начать очередь:",
"acceptMatch": "Принять матч:",
"closeError1": "Закрыть ошибку (1):",
"closeError2": "Закрыть ошибку (2):",
"buyChampion1": "Купить чемпиона (1):",
"buyChampion2": "Купить чемпиона (2):",
"buyChampion3": "Купить чемпиона (3):",
"buyChampion4": "Купить чемпиона (4):",
"buyChampion5": "Купить чемпиона (5):",
"walkToCenter": "Идти в центр:",
"selectCard": "Выбрать карту:",
"quitMatch": "Выйти из матча:",
"playAgain": "Играть снова:",
"extra1": "Дополнительное положение (1):",
"extra2": "Дополнительное положение (2):",
"extra3": "Дополнительное положение (3):",

"updateKeybinds": "Обновить горячие клавиши",
"quit": "Выйти"
}
}
{
"code": "ru-RU",
"tray": {
"header": "ГОРЯЧИЕ КЛАВИШИ:",
"recordMousePosition": "Записать положение мыши:",
"showPositions": "Показать позиции",
"pauseResumeMacro": "Приостановить/Возобновить макрос:",
"pauseResumeMouseReading": "Приостановить/Возобновить чтение мыши:",
"exit": "Выйти:",

"previewClicks": "Предварительный просмотр кликов",
"startQueue": "Начать очередь:",
"acceptMatch": "Принять матч:",
"closeError1": "Закрыть ошибку (1):",
"closeError2": "Закрыть ошибку (2):",
"buyChampion1": "Купить чемпиона (1):",
"buyChampion2": "Купить чемпиона (2):",
"buyChampion3": "Купить чемпиона (3):",
"buyChampion4": "Купить чемпиона (4):",
"buyChampion5": "Купить чемпиона (5):",
"walkToCenter": "Идти в центр:",
"selectCard": "Выбрать карту:",
"quitMatch": "Выйти из матча:",
"playAgain": "Играть снова:",
"extra1": "Дополнительное положение (1):",
"extra2": "Дополнительное положение (2):",
"extra3": "Дополнительное положение (3):",

"updateKeybinds": "Обновить горячие клавиши",
"quit": "Выйти"
}
}
4 changes: 2 additions & 2 deletions src/modals/defaultConfig.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defaultconfig = {
__DevComments: {
textENUS: "Use this file to change the AutoClicker configurations, tutorial: https://github.com/YuriXbr/LeagueClicker/blob/BETA-1.0.0/README.md",
textPTBR: "Utilize esse arquivo para configurar o autoclicker, tutorial: https://github.com/YuriXbr/LeagueClicker/blob/BETA-1.0.0/README.md"
textENUS: "Use this file to change the AutoClicker configurations, tutorial: https://github.com/YuriXbr/LeagueClicker/",
textPTBR: "Utilize esse arquivo para configurar o autoclicker, tutorial: https://github.com/YuriXbr/LeagueClicker/"
},
keybinds: {
recordMousePosition: 'CommandOrControl+R',
Expand Down
Loading

0 comments on commit b30baaf

Please sign in to comment.