Skip to content
Open
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
24 changes: 21 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,18 @@ const context = [
{ type: 'separator' },
{ role: 'resetzoom' },
{ type: 'separator' },
{ role: 'togglefullscreen' }
{ role: 'togglefullscreen' },
{
label: 'Toggle Auto-Hiding the Menubar',
accelerator: 'Ctrl+Shift+H',
click (item, focusedWindow) {
if (focusedWindow) {
focusedWindow.setAutoHideMenuBar(!focusedWindow.isMenuBarAutoHide());
settings_storage.set('menubar_autohide', focusedWindow.isMenuBarAutoHide()).write();
focusedWindow.setMenuBarVisibility(!focusedWindow.isMenuBarVisible());
}
}
}
]
},
{
Expand Down Expand Up @@ -327,15 +338,19 @@ function createWindow(file) {
ApplicationWindow = new BrowserWindow({
icon: './ico.png',
minHeight: 561,
minWidth: 837,
minWidth: 837,
webPreferences: {
experimentalFeatures: true //for backdrop-filter css. if causes issues we will find an alternative.
}
});

ApplicationWindow.setMenu(null);
ApplicationWindow.maximize();


if(process.argv.indexOf("--fullscreen") > -1){
ApplicationWindow.setFullScreen(true);
}

ApplicationWindow.webContents.on('did-finish-load', () => {
ApplicationWindow.show();
ApplicationWindow.focus();
Expand Down Expand Up @@ -2092,6 +2107,7 @@ function setupDefaults() {
ticket_cache_vendor: 'http://cemui.com/api/v2/ticketcache',
ticket_vendor: 'http://wiiu.titlekeys.gq/',
cdecrypt_location: '',
menubar_autohide: false,
},
games_defaults = {
games: []
Expand All @@ -2105,6 +2121,8 @@ function setupDefaults() {
game_storage.defaults(games_defaults).write();
settings_storage = low(new FileSync(DATA_ROOT + 'cache/json/settings.json'));
settings_storage.defaults(settings_defaults).write();

ApplicationWindow.setAutoHideMenuBar(settings_storage.get('menubar_autohide').value());
}

function setupDefaultFiles() {
Expand Down