Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
Damillora | 2dba9271a9 | |
Damillora | 73608d17e1 | |
Damillora | 718bae29ab | |
Damillora | ef12775d84 | |
Damillora | 18878a20d6 | |
Damillora | 766edbc6c4 |
2
dock.js
2
dock.js
|
@ -182,5 +182,5 @@ module.exports.navitemplate = function(win){
|
|||
module.exports.setdock = function(win) {
|
||||
const dockMenu = Menu.buildFromTemplate(module.exports.navitemplate(win))
|
||||
|
||||
app.dock.setMenu(dockMenu);
|
||||
if(process.platform == 'darwin' ) app.dock.setMenu(dockMenu);
|
||||
}
|
||||
|
|
6
main.js
6
main.js
|
@ -13,9 +13,11 @@ const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6
|
|||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
win = new BrowserWindow({width: 480, height: 600,icon: path.join(__dirname, 'ic_launcher.png')})
|
||||
win = new BrowserWindow({width: 480, height: 600,icon: path.join(__dirname, 'icon.png')})
|
||||
setdock.setdock(win)
|
||||
Menu.setApplicationMenu(themenu(win));
|
||||
if(process.platform == 'darwin') { Menu.setApplicationMenu(themenu(win)); }
|
||||
else { win.setMenu(themenu(win));
|
||||
}
|
||||
// and load the index.html of the app.
|
||||
win.loadURL('http://pf.gree.net/58737',options);
|
||||
// Open the DevTools.
|
||||
|
|
27
menu.js
27
menu.js
|
@ -7,13 +7,6 @@ const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6
|
|||
|
||||
module.exports = function(win){
|
||||
const template = [
|
||||
{
|
||||
label: "File",
|
||||
submenu: [
|
||||
{label: 'Preferences',click(){prefman.showPreferences()}},
|
||||
],
|
||||
visible: process.platform !== 'darwin'
|
||||
},
|
||||
{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
|
@ -57,12 +50,16 @@ module.exports = function(win){
|
|||
label: 'Help',
|
||||
role: 'help',
|
||||
submenu: [
|
||||
{
|
||||
label: "Million Live! Help",
|
||||
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/help",options)}
|
||||
},
|
||||
{
|
||||
label: "Project Homepage",
|
||||
click(){shell.openExternal("https://github.com/Damillora/MillionHopes")}
|
||||
},
|
||||
{
|
||||
label: 'About SoundCleod',
|
||||
label: 'About Million Hopes',
|
||||
click() {
|
||||
prefman.showAbout();
|
||||
},
|
||||
|
@ -72,7 +69,6 @@ module.exports = function(win){
|
|||
]
|
||||
}
|
||||
]
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
template.unshift({
|
||||
label: app.getName(),
|
||||
|
@ -92,7 +88,7 @@ module.exports = function(win){
|
|||
})
|
||||
|
||||
// Edit menu
|
||||
template[1].submenu.push(
|
||||
template[2].submenu.push(
|
||||
{type: 'separator'},
|
||||
{
|
||||
label: 'Speech',
|
||||
|
@ -111,6 +107,17 @@ module.exports = function(win){
|
|||
{type: 'separator'},
|
||||
{role: 'front'}
|
||||
]
|
||||
} else
|
||||
{
|
||||
template.unshift({
|
||||
label: "File",
|
||||
submenu: [
|
||||
{label: 'Preferences',click(){prefman.showPreferences()}},
|
||||
{type: 'separator'},
|
||||
{label: 'Exit', click(){ app.quit() }},
|
||||
],
|
||||
visible: process.platform !== 'darwin'
|
||||
})
|
||||
}
|
||||
|
||||
const themenu = Menu.buildFromTemplate(template);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "MillionHopes",
|
||||
"productName": "Million Hopes",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "A thin wrapper for the game THE IDOLM@STER: Million Live!, using Electron.",
|
||||
"main": "main.js",
|
||||
"devDependencies": {
|
||||
|
|
|
@ -10,6 +10,7 @@ require('electron-debug')();
|
|||
function showPreferences_int(){
|
||||
if(!preferencesWindow){
|
||||
preferencesWindow = new BrowserWindow({width: 800, height: 600})
|
||||
if (process.platform !== 'darwin') preferencesWindow.setMenu(null);
|
||||
preferencesWindow.loadURL(url.format({
|
||||
pathname: path.join(__dirname, 'preferences.html'),
|
||||
protocol: 'file:',
|
||||
|
|
Reference in New Issue