Beispiel #1
0
        private void Initialize(string name, DebugUISystem.MenuType menuType, Action action = null, MenuItem parent = null)
        {
            this.name     = name;
            this.index    = count;
            this.menuType = menuType;
            this.parent   = parent;
            this.action   = action;

            path  = parent == null ? name : $"{parent.path}/{name}";
            depth = parent == null ? 0 : parent.depth + 1;

            count++;
        }
Beispiel #2
0
 public MenuItem(string name, DebugUISystem.MenuType menuType, Action action   = null, MenuItem parent = null) => Initialize(name, menuType, action, parent);
Beispiel #3
0
 public MenuItem(string name, DebugUISystem.MenuType menuType) => Initialize(name, menuType, null, null);