예제 #1
0
 // Token: 0x06000D0F RID: 3343 RVA: 0x00059C14 File Offset: 0x00057E14
 private void InitModerations(MemberAccessLevel level)
 {
     if (level >= MemberAccessLevel.Moderator)
     {
         ModerationPanelGUI.Moderation item = new ModerationPanelGUI.Moderation(MemberAccessLevel.Moderator, ModerationPanelGUI.Actions.UNMUTE_PLAYER, "Unmute Player", "Player is un-muted and un-ghosted immediately", "Unmute player", new Action <ModerationPanelGUI.Moderation, Rect>(this.DrawModeration));
         this._moderations.Add(item);
         ModerationPanelGUI.Moderation item2 = new ModerationPanelGUI.Moderation(MemberAccessLevel.Moderator, ModerationPanelGUI.Actions.GHOST_PLAYER, "Ghost Player", "Chat messages from player only appear in their own chat window, but not the windows of other players.", "Ghost player", new Action <ModerationPanelGUI.Moderation, Rect>(this.DrawModeration), new GUIContent[]
         {
             new GUIContent("1 min"),
             new GUIContent("5 min"),
             new GUIContent("30 min"),
             new GUIContent("6 hrs")
         });
         this._moderations.Add(item2);
         ModerationPanelGUI.Moderation item3 = new ModerationPanelGUI.Moderation(MemberAccessLevel.Moderator, ModerationPanelGUI.Actions.MUTE_PLAYER, "Mute Player", "Chat messages from player do not appear in anyones chat window.", "Mute player", new Action <ModerationPanelGUI.Moderation, Rect>(this.DrawModeration), new GUIContent[]
         {
             new GUIContent("1 min"),
             new GUIContent("5 min"),
             new GUIContent("30 min"),
             new GUIContent("6 hrs")
         });
         this._moderations.Add(item3);
         ModerationPanelGUI.Moderation item4 = new ModerationPanelGUI.Moderation(MemberAccessLevel.Moderator, ModerationPanelGUI.Actions.KICK_FROM_GAME, "Kick from Game", "Player is removed from the game he is currently in and dumped on the home screen.", "Kick player from game", new Action <ModerationPanelGUI.Moderation, Rect>(this.DrawModeration));
         this._moderations.Add(item4);
         ModerationPanelGUI.Moderation item5 = new ModerationPanelGUI.Moderation(MemberAccessLevel.SeniorQA, ModerationPanelGUI.Actions.KICK_FROM_APP, "Kick from Application", "Player is disconnected from all realtime connections for the current session.", "Kick player from application", new Action <ModerationPanelGUI.Moderation, Rect>(this.DrawModeration));
         this._moderations.Add(item5);
     }
 }
예제 #2
0
    // Token: 0x06000D14 RID: 3348 RVA: 0x0005A5C8 File Offset: 0x000587C8
    private void DrawModeration(ModerationPanelGUI.Moderation moderation, Rect position)
    {
        GUI.BeginGroup(position);
        GUI.Label(new Rect(21f, 0f, position.width, 30f), moderation.Title, BlueStonez.label_interparkbold_13pt);
        GUI.Label(new Rect(0f, 30f, 356f, 40f), moderation.Content, BlueStonez.label_itemdescription);
        GUI.Label(new Rect(0f, 0f, position.width, 1f), GUIContent.none, BlueStonez.horizontal_line_grey95);
        bool flag = GUI.Toggle(new Rect(0f, 7f, position.width, 16f), moderation.Selected, GUIContent.none, BlueStonez.radiobutton);

        if (flag && !moderation.Selected)
        {
            moderation.Selected = true;
            this.SelectModeration(moderation.ID);
            switch (moderation.SubSelectionIndex)
            {
            case 0:
                this._banDurationIndex = 1;
                break;

            case 1:
                this._banDurationIndex = 5;
                break;

            case 2:
                this._banDurationIndex = 30;
                break;

            case 3:
                this._banDurationIndex = 360;
                break;

            default:
                this._banDurationIndex = 1;
                break;
            }
            GUIUtility.keyboardControl = 0;
        }
        if (moderation.SubSelection != null)
        {
            GUI.enabled = moderation.Selected;
            GUI.changed = false;
            if (moderation.Selected)
            {
                moderation.SubSelectionIndex = UnityGUI.Toolbar(new Rect(0f, position.height - 25f, position.width, 20f), moderation.SubSelectionIndex, moderation.SubSelection, moderation.SubSelection.Length, BlueStonez.panelquad_toggle);
            }
            else
            {
                UnityGUI.Toolbar(new Rect(0f, position.height - 25f, position.width, 20f), -1, moderation.SubSelection, moderation.SubSelection.Length, BlueStonez.panelquad_toggle);
            }
            if (GUI.changed)
            {
                switch (moderation.SubSelectionIndex)
                {
                case 0:
                    this._banDurationIndex = 1;
                    break;

                case 1:
                    this._banDurationIndex = 5;
                    break;

                case 2:
                    this._banDurationIndex = 30;
                    break;

                case 3:
                    this._banDurationIndex = 360;
                    break;

                default:
                    this._banDurationIndex = 1;
                    break;
                }
            }
            GUI.enabled = true;
        }
        GUI.EndGroup();
    }