浏览代码

allow extra custom menu (close #67)

Nicolas Cannasse 5 年之前
父节点
当前提交
8278f9d81b
共有 2 个文件被更改,包括 5 次插入1 次删除
  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 )