Selaa lähdekoodia

allow extra custom menu (close #67)

Nicolas Cannasse 5 vuotta sitten
vanhempi
commit
8278f9d81b
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 3 0
      bin/defaultProps.json
  2. 2 1
      hide/Ide.hx

+ 3 - 0
bin/defaultProps.json

@@ -3,6 +3,9 @@
 	"hmd.animPaths" : [],
 	"hmd.savePropsByAnimation" : false,
 
+	// extra main menu content
+	"menu.extra" : "",
+
 	// path to js scripts containing hide plugins
 	"plugins" : [],
 

+ 2 - 1
hide/Ide.hx

@@ -838,7 +838,8 @@ class Ide {
 
 		if( subView != null ) return;
 
-		var menu = new Element(new Element("#mainmenu").get(0).outerHTML);
+		var menuHTML = "<content>"+new Element("#mainmenu").html() + config.project.get("menu.extra")+"</content>";
+		var menu = new Element(menuHTML);
 
 		// project
 		if( ideConfig.recentProjects.length > 0 )