Skip to content

Commit

Permalink
Version number and updated command palette descriptions, main menu bu…
Browse files Browse the repository at this point in the history
…ttons are now disabled when project is closed
  • Loading branch information
nommiin committed Mar 26, 2019
1 parent cb91936 commit e12366c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,29 @@ if (Builder.Platform.includes("Darwin") == true) {
preferences.setMenu(preferences.menuMain);
Builder.Save();
});
preferences.addText(Builder.Settings, "builder v0.6 (" + Builder.Platform + ") - nommiin");
preferences.addText(Builder.Settings, "builder v0.7 (" + Builder.Platform + ") - nommiin");

// Add ace commands
$gmedit["ace.AceCommands"].add({ name : "run", bindKey : { win : "F5", mac : "F5"}, exec : () => {
if ( $gmedit["ui.MainMenu"].menu.items[Builder.Index].enabled == true) {
Builder.Run();
}
}}, "Run");
$gmedit["ace.AceCommands"].addToPalette({name: "builder: Compile and launch your project", exec: "run", title: "Run"});
$gmedit["ace.AceCommands"].addToPalette({name: "builder: Compile and run your project", exec: "run", title: "Run"});

$gmedit["ace.AceCommands"].add({ name : "stop", bindKey : { win : "F6", mac : "F6"}, exec : () => {
if ( $gmedit["ui.MainMenu"].menu.items[Builder.Index + 1].enabled == true) {
Builder.Stop();
}
}}, "Stop");
$gmedit["ace.AceCommands"].addToPalette({name: "builder: Stop the currently running compiler or runner", exec: "stop", title: "Stop"});
$gmedit["ace.AceCommands"].addToPalette({name: "builder: Stop compiler or runner process", exec: "stop", title: "Stop"});

$gmedit["ace.AceCommands"].add({ name : "fork", bindKey : { win : "F7", mac : "F7"}, exec : () => {
if ( $gmedit["ui.MainMenu"].menu.items[Builder.Index + 2].enabled == true) {
Builder.Fork();
}
}}, "Fork");
$gmedit["ace.AceCommands"].addToPalette({name: "builder: Create a new instance of the currently active runner", exec: "fork", title: "Fork"});
$gmedit["ace.AceCommands"].addToPalette({name: "builder: Fork instance of runner", exec: "fork", title: "Fork"});

// Hook into preferences menu
let buildMain = preferences.buildMain;
Expand Down Expand Up @@ -176,7 +176,7 @@ if (Builder.Platform.includes("Darwin") == true) {
});

GMEdit.on("projectClose", function() {
for(var i = 0; i < 1/*2*/; i++) {
for(var i = 0; i < 3; i++) {
$gmedit["ui.MainMenu"].menu.items[Builder.Index + i].enabled = false;
}
});
Expand Down

0 comments on commit e12366c

Please sign in to comment.