Ejemplo n.º 1
0
    public void RegisterCommand(ICheatCommand InCommand)
    {
        DebugHelper.Assert((InCommand != null) && !this.HasCommand(InCommand.command.baseName));
        this.GeneralRepositories.Commands[InCommand.command.baseName.ToLower()] = InCommand;
        string[] groupHierarchies = InCommand.command.groupHierarchies;
        DebugHelper.Assert(groupHierarchies != null);
        string            key   = groupHierarchies[0];
        CheatCommandGroup group = null;

        if (!this.Repositories.TryGetValue(key, out group))
        {
            group = new CheatCommandGroup();
            this.Repositories[key] = group;
        }
        group.AddCommand(InCommand, 1);
    }
Ejemplo n.º 2
0
 public void AddCommand(ICheatCommand InCommand, int HierarchiesIndex)
 {
     DebugHelper.Assert(InCommand != null);
     string[] groupHierarchies = InCommand.command.groupHierarchies;
     DebugHelper.Assert(groupHierarchies != null);
     if (HierarchiesIndex < groupHierarchies.Length)
     {
         CheatCommandGroup cheatCommandGroup = null;
         if (!this.ChildrenGroups.TryGetValue(groupHierarchies[HierarchiesIndex], out cheatCommandGroup))
         {
             cheatCommandGroup = new CheatCommandGroup();
             this.ChildrenGroups.Add(groupHierarchies[HierarchiesIndex], cheatCommandGroup);
         }
         DebugHelper.Assert(cheatCommandGroup != null);
         cheatCommandGroup.AddCommand(InCommand, HierarchiesIndex + 1);
     }
     else
     {
         this.Commands.Add(InCommand.command.baseName, InCommand);
     }
 }
Ejemplo n.º 3
0
 public void SetGroup(CheatCommandGroup InGroup)
 {
     this.currentGroup = InGroup;
     this.OnResetSkipCount();
 }
Ejemplo n.º 4
0
 public void SelectGroup(CheatCommandGroup InGroup)
 {
     DebugHelper.Assert(InGroup != null);
     this.States.Push(new CommandInGroupDisplayState(this.ParentWindow, this));
     (this.States.TopState() as CommandInGroupDisplayState).SetGroup(InGroup);
 }
Ejemplo n.º 5
0
        public void SelectGroup(CheatCommandGroup InGroup)
        {
            DebugHelper.Assert(InGroup != null);

            States.Push(new CommandInGroupDisplayState(ParentWindow, this));

            (States.TopState() as CommandInGroupDisplayState).SetGroup(InGroup);
        }
Ejemplo n.º 6
0
        public void SetGroup(CheatCommandGroup InGroup)
        {
            currentGroup = InGroup;

            OnResetSkipCount();
        }
Ejemplo n.º 7
0
 public void SetGroup(CheatCommandGroup InGroup)
 {
     currentGroup = InGroup;
 }
Ejemplo n.º 8
0
        private void DrawCommandsGroup(string InGroupName, CheatCommandGroup InGroups)
        {
            {
                var iter = InGroups.Commands.GetEnumerator();

                while (iter.MoveNext())
                {
                    if (iter.Current.Value.isSupportInEditor)
                    {
                        DrawCommand(InGroupName, iter.Current.Key, iter.Current.Value);
                    }
                }
            }

            {
                if (InGroups.ChildrenGroups.Count > 0)
                {
                    string[] LocalToolbarTitles = new string[InGroups.ChildrenGroups.Count];

                    {
                        var Iter = InGroups.ChildrenGroups.GetEnumerator();

                        int Index = 0;
                        while (Iter.MoveNext())
                        {
                            LocalToolbarTitles[Index] = Iter.Current.Key;

                            ++Index;
                        }

                        InGroups.Selection = GUILayout.Toolbar(InGroups.Selection, LocalToolbarTitles);
                    }

                    if (InGroups.Selection >= 0 && LocalToolbarTitles != null && InGroups.Selection < LocalToolbarTitles.Length)
                    {
                        var Iter = InGroups.ChildrenGroups.GetEnumerator();

                        while (Iter.MoveNext())
                        {
                            string GroupName = Iter.Current.Key;
                            //  var Commands = Iter.Current.Value.Commands;

                            if (LocalToolbarTitles[InGroups.Selection] == GroupName)
                            {
                                GUILayout.BeginVertical();

                                DrawCommandsGroup(GroupName, Iter.Current.Value);

                                GUILayout.EndVertical();

                                DrawSplitter();

                                break;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
 public void SetGroup(CheatCommandGroup InGroup)
 {
     this.currentGroup = InGroup;
 }