Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
<div id="mods" title="Mods" style="padding:10px;">
<a href="#" id="openModsFolder" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">Open Mods Folder</a>
<a href="#" id="refreshMods" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">Refresh Mods</a>
<a href="#" id="enableAllMods" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">Enable All</a>
<a href="#" id="disableAllMods" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">Disable All</a>
<!-- <a href="#" id="modBrowser" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">Get More Mods</a> -->
<br /><br />
<div id="mods_container" style="width: 550px; height: 180px; overflow-y: scroll;">
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ const createMainWindow = async () => {
nodeIntegration: true,
},
});
if(false){ // change to true if developing
win.webContents.openDevTools({ mode: 'detach'});
}
win.on('ready-to-show', () => {
transitionTimer = setInterval(() => {
if (loadingWindow && updateProcess == null) {
Expand Down
21 changes: 21 additions & 0 deletions src/index_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,27 @@ if (refreshMods !== null) {
});
}

let enableMods = document.getElementById('enableAllMods');
if (enableMods !== null) {
enableMods.addEventListener('click', () => {
let list = $('.tree-checkbox0');
for (let i = 0; i < list.length; i++) {
list[i].click();
}
});
}

let disableMods = document.getElementById('disableAllMods');
if (disableMods !== null) {
disableMods.addEventListener('click', () => {
let list = $('.tree-checkbox1');
for (let i = 0; i < list.length; i++) {
list[i].click();
}
});
}


let refreshRoms = document.getElementById("refreshRoms");
if (refreshRoms !== null) {
refreshRoms.addEventListener('click', () => {
Expand Down