Jelajahi Sumber

allow extra custom menu (close #67)

Nicolas Cannasse 5 tahun lalu
induk
melakukan
8278f9d81b
2 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 3 0
      bin/defaultProps.json
  2. 2 1
      hide/Ide.hx

+ 3 - 0
bin/defaultProps.json

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

+ 2 - 1
hide/Ide.hx

@@ -838,7 +838,8 @@ class Ide {
 
 
 		if( subView != null ) return;
 		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
 		// project
 		if( ideConfig.recentProjects.length > 0 )
 		if( ideConfig.recentProjects.length > 0 )