Skip to content

Commit

Permalink
menu rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
fohristiwhirl committed Oct 8, 2018
1 parent c7dea39 commit 87bbf86
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 39 deletions.
14 changes: 0 additions & 14 deletions fluorine_renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@

renderer.set_title();
renderer.send_mining_dropoff_stats();
renderer.send_constants();
renderer.draw();

console.timeEnd("finish_load");
Expand Down Expand Up @@ -1699,19 +1698,6 @@

// --------------------------------------------------------------

renderer.send_constants = () => {

if (!renderer.game) return;

let s = JSON.stringify(renderer.game.GAME_CONSTANTS, null, 2);

ipcRenderer.send("relay", {
receiver: "constants",
channel: "update",
content: "<pre>" + s + "</pre>",
});
};

renderer.send_mining_dropoff_stats = () => {

if (!renderer.game) return;
Expand Down
40 changes: 15 additions & 25 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ electron.app.on("ready", () => {
title: "Mining / Dropoffs", show: false, width: 400, height: 600, resizable: true, page: path.join(__dirname, "fluorine_info.html")
});

windows.new("constants", {
title: "Constants", show: false, width: 400, height: 600, resizable: true, page: path.join(__dirname, "fluorine_info.html")
});

windows.new("selector", {
title: "Select Ship", show: false, width: 320, height: 100, resizable: true, page: path.join(__dirname, "fluorine_select.html")
});
Expand Down Expand Up @@ -89,21 +85,6 @@ function make_main_menu() {
{
label: "File",
submenu: [
{
label: "About...",
click: () => {
alert(about_message);
}
},
{
type: "separator"
},
{
role: "toggledevtools"
},
{
type: "separator"
},
{
label: "Open...",
accelerator: "CommandOrControl+O",
Expand All @@ -118,7 +99,7 @@ function make_main_menu() {
type: "separator"
},
{
label: "Save decompressed JSON...",
label: "Save decompressed JSON",
accelerator: "CommandOrControl+S",
click: () => {
let outfilename = electron.dialog.showSaveDialog();
Expand All @@ -128,7 +109,7 @@ function make_main_menu() {
}
},
{
label: "Save current frame...",
label: "Save current frame",
click: () => {
let outfilename = electron.dialog.showSaveDialog();
if (outfilename) {
Expand All @@ -137,7 +118,7 @@ function make_main_menu() {
}
},
{
label: "Save current entities...",
label: "Save current entities",
click: () => {
let outfilename = electron.dialog.showSaveDialog();
if (outfilename) {
Expand All @@ -146,7 +127,7 @@ function make_main_menu() {
}
},
{
label: "Save current moves...",
label: "Save current moves",
click: () => {
let outfilename = electron.dialog.showSaveDialog();
if (outfilename) {
Expand Down Expand Up @@ -354,6 +335,9 @@ function make_main_menu() {
windows.send("renderer", "set", ["selection", null]);
}
},
{
type: "separator"
},
{
label: "Select ship by ID...",
accelerator: "CommandOrControl+F",
Expand All @@ -374,11 +358,17 @@ function make_main_menu() {
}
},
{
label: "Constants",
type: "separator"
},
{
label: "About Fluorine",
click: () => {
windows.show("constants");
alert(about_message);
}
},
{
role: "toggledevtools"
},
]
},
];
Expand Down

0 comments on commit 87bbf86

Please sign in to comment.