예제 #1
0
        public static GuiNode TryParse(ConfigNode node)
        {
            if (node != null)
            {
                var appLauncher = AppLauncherNode.TryParse(node.GetNode("APPLAUNCHER"))
                                  ?? AppLauncherNode.GetDefault();
                var toolbar = ToolbarNode.TryParse(node.GetNode("TOOLBAR"))
                              ?? ToolbarNode.GetDefault();
                var contextMenu = Gui.ContextMenuNode.TryParse(node.GetNode("CONTEXT_MENU"))
                                  ?? Gui.ContextMenuNode.GetDefault();

                return(new GuiNode(appLauncher, toolbar, contextMenu));
            }

            return(null);
        }
예제 #2
0
 public static GuiNode GetDefault()
 => new GuiNode(AppLauncherNode.GetDefault(), ToolbarNode.GetDefault(), Gui.ContextMenuNode.GetDefault());