Ejemplo n.º 1
0
    // Token: 0x06000B56 RID: 2902 RVA: 0x00047F58 File Offset: 0x00046158
    private void DoTitle(Rect rect)
    {
        GUI.BeginGroup(rect, BlueStonez.tab_strip_large);
        int num = UnityGUI.Toolbar(new Rect(1f, 32f, 508f, 40f), this._selectedTab, this._tabContents, this._tabContents.Length, BlueStonez.tab_large);

        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        if (num != this._selectedTab)
        {
            GUIUtility.keyboardControl = 0;
            this._selectedTab          = num;
        }
        if (Singleton <InboxManager> .Instance.UnreadMessageCount > 0)
        {
            GUI.DrawTexture(new Rect(133f, 32f, 20f, 20f), this._newMessage);
        }
        if (Singleton <InboxManager> .Instance.IncomingClanRequests.Value.Count > 0 || Singleton <InboxManager> .Instance.FriendRequests.Value.Count > 0)
        {
            GUI.DrawTexture(new Rect(311f, 32f, 20f, 20f), this._newMessage);
        }
        GUI.EndGroup();
    }
Ejemplo n.º 2
0
        private int DrawEvent(int index)
        {
            var event_ = events.GetArrayElementAtIndex(index);

            UnityGUI.BeginHorizontal();

            var foldout = Foldout(TriggerName, event_, "foldout", FoldoutOptions);

            DrawTriggerSpace(event_);

            var deleteIndex = -1;

            if (UnityGUI.Button("X", RemoveButtonOptions))
            {
                deleteIndex = index;
            }

            UnityGUI.EndHorizontal();

            if (foldout)
            {
                Field(true, event_, "unityEvent");
            }

            return(deleteIndex);
        }
Ejemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            BeginInspectorGUI();

            if (events.arraySize > 0)
            {
                UnityGUI.Label("Events");
            }

            UnityGUI.IndentLevel++;

            for (int i = 0; i < events.arraySize; i++)
            {
                var deleteIndex = DrawEvent(i);
                if (deleteIndex >= 0)
                {
                    events.DeleteArrayElementAtIndex(deleteIndex);
                    i--;
                }
            }

            UnityGUI.IndentLevel--;

            DrawAddEventButton();
            EndInspectorGUI();
        }
Ejemplo n.º 4
0
 private void DrawTriggerSpace(SerializedProperty event_)
 {
     UnityGUI.FlexibleSpace();
     UnityGUI.IndentLevel -= 4;
     Field(false, event_, "trigger");
     UnityGUI.IndentLevel += 4;
 }
Ejemplo n.º 5
0
    // Token: 0x06000916 RID: 2326 RVA: 0x00039DF8 File Offset: 0x00037FF8
    public static int Toolbar(Rect position, int selected, GUIContent[] contents, int xCount, GUIStyle style)
    {
        int       result         = GUI.Toolbar(position, selected, contents, style);
        int       controlID      = GUIUtility.GetControlID(FocusType.Native, position);
        EventType typeForControl = Event.current.GetTypeForControl(controlID);

        if (typeForControl == EventType.Repaint)
        {
            GUIStyle firstStyle = null;
            GUIStyle midStyle   = null;
            GUIStyle lastStyle  = null;
            UnityGUI.FindStyles(ref style, out firstStyle, out midStyle, out lastStyle, "left", "mid", "right");
            int num  = contents.Length;
            int num2 = num / xCount;
            if (num % xCount != 0)
            {
                num2++;
            }
            float  num3        = (float)UnityGUI.CalcTotalHorizSpacing(xCount, style, firstStyle, midStyle, lastStyle);
            float  num4        = (float)(Mathf.Max(style.margin.top, style.margin.bottom) * (num2 - 1));
            float  elemWidth   = (position.width - num3) / (float)xCount;
            float  elemHeight  = (position.height - num4) / (float)num2;
            Rect[] buttonRects = UnityGUI.CalcMouseRects(position, num, xCount, elemWidth, elemHeight, style, firstStyle, midStyle, lastStyle, false);
            int    buttonGridMouseSelection = UnityGUI.GetButtonGridMouseSelection(buttonRects, Event.current.mousePosition, controlID == GUIUtility.hotControl);
            if (buttonGridMouseSelection >= 0)
            {
                GUI.tooltip = contents[buttonGridMouseSelection].tooltip;
            }
        }
        return(result);
    }
Ejemplo n.º 6
0
    // Token: 0x06000CDA RID: 3290 RVA: 0x000581E4 File Offset: 0x000563E4
    private void DrawHelpPanel()
    {
        GUI.depth = 3;
        GUI.Label(new Rect(0f, 0f, this._rect.width, 56f), LocalizedStrings.HelpCaps, BlueStonez.tab_strip);
        this._selectedHelpTab = UnityGUI.Toolbar(new Rect(2f, 31f, 360f, 22f), this._selectedHelpTab, this._helpTabs, this._helpTabs.Length, BlueStonez.tab_medium);
        GUI.BeginGroup(new Rect(16f, 55f, this._rect.width - 32f, this._rect.height - 56f - 44f), string.Empty, BlueStonez.window_standard_grey38);
        switch (this._selectedHelpTab)
        {
        case 0:
            this.DrawGeneralGroup();
            break;

        case 1:
            this.DrawGameplayGroup();
            break;

        case 2:
            this.DrawItemsGroup();
            break;

        case 3:
            this.DrawCreditsGroup();
            break;
        }
        GUI.EndGroup();
        if (GUI.Button(new Rect(this._rect.width - 136f, this._rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.OkCaps), BlueStonez.button))
        {
            PanelManager.Instance.ClosePanel(PanelType.Help);
        }
    }
Ejemplo n.º 7
0
        private void AxesStateLabel(VRButton button)
        {
            var axes = VRInput.GetAxes(button);

            UnityGUI.Label(button.ToString() + " X: " + axes[0].ToString("0.000"));
            UnityGUI.Label(button.ToString() + " Y: " + axes[1].ToString("0.000"));
        }
Ejemplo n.º 8
0
    // Token: 0x06000C2B RID: 3115 RVA: 0x00050F98 File Offset: 0x0004F198
    private void OnGUI()
    {
        GUI.depth      = 11;
        GUI.skin       = BlueStonez.Skin;
        this.statsPage = new Rect((float)Screen.width - this.statsPositionX, (float)GlobalUIRibbon.Instance.Height(), this.statsPositionX, (float)(Screen.height - GlobalUIRibbon.Instance.Height()));
        GUI.BeginGroup(this.statsPage, GUIContent.none, BlueStonez.window_standard_grey38);
        GUI.Label(new Rect(0f, 0f, this.statsPage.width, 56f), LocalizedStrings.YourProfileCaps, BlueStonez.tab_strip);
        GUI.changed            = false;
        this._selectedStatsTab = UnityGUI.Toolbar(new Rect(0f, 34f, 260f, 22f), this._selectedStatsTab, this._statsTabs, 3, BlueStonez.tab_medium);
        if (GUI.changed)
        {
            if (this._selectedStatsTab == 2)
            {
                Singleton <TransactionHistory> .Instance.GetCurrentTransactions();
            }
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        GUI.BeginGroup(new Rect(0f, 55f, this.statsPage.width, this.statsPage.height - 55f), string.Empty, BlueStonez.window_standard_grey38);
        switch (this._selectedStatsTab)
        {
        case 0:
            this.DrawPersonalStatsTab(new Rect(0f, 0f, this.statsPage.width, this.statsPage.height - 56f));
            break;

        case 1:
            this.DrawWeaponsStatsTab(new Rect(0f, 0f, this.statsPage.width, this.statsPage.height - 56f));
            break;

        case 2:
            this.DrawAccountStatsTab(new Rect(0f, 0f, this.statsPage.width, this.statsPage.height - 55f));
            break;
        }
        GUI.EndGroup();
        GUI.EndGroup();
    }
Ejemplo n.º 9
0
        private void DrawVive()
        {
            UnityGUI.Space();
            UnityGUI.Label("Vive_LeftController");
            UnityGUI.IndentLevel++;

            var pos = VRInput.LeftHandPosition;
            var rot = VRInput.LeftHandRotation.eulerAngles;

            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position X: " + pos.x.ToString("0.000"));
            UnityGUI.Label("Rotation X: " + rot.x.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Y: " + pos.y.ToString("0.000"));
            UnityGUI.Label("Rotation Y: " + rot.y.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Z: " + pos.z.ToString("0.000"));
            UnityGUI.Label("Rotation Z: " + rot.z.ToString("0.000"));
            UnityGUI.EndHorizontal();

            ButtonStateLabel(VRButton.Vive_LeftMenu);
            ButtonStateLabel(VRButton.Vive_LeftTrackpad);
            ButtonStateLabel(VRButton.Vive_LeftTrigger);
            AxisStateLabel(VRButton.Vive_LeftTrigger);
            AxisStateLabel(VRButton.Vive_LeftGrip);
            AxesStateLabel(VRButton.Vive_LeftTrackpad);
            UnityGUI.IndentLevel--;

            UnityGUI.Space();
            UnityGUI.Label("Vive_RightController");
            UnityGUI.IndentLevel++;

            pos = VRInput.RightHandPosition;
            rot = VRInput.RightHandRotation.eulerAngles;
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position X: " + pos.x.ToString("0.000"));
            UnityGUI.Label("Rotation X: " + rot.x.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Y: " + pos.y.ToString("0.000"));
            UnityGUI.Label("Rotation Y: " + rot.y.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Z: " + pos.z.ToString("0.000"));
            UnityGUI.Label("Rotation Z: " + rot.z.ToString("0.000"));
            UnityGUI.EndHorizontal();

            ButtonStateLabel(VRButton.Vive_RightMenu);
            ButtonStateLabel(VRButton.Vive_RightTrackpad);
            ButtonStateLabel(VRButton.Vive_RightTrigger);
            AxisStateLabel(VRButton.Vive_RightTrigger);
            AxisStateLabel(VRButton.Vive_RightGrip);
            AxesStateLabel(VRButton.Vive_RightTrackpad);
            UnityGUI.IndentLevel--;
        }
Ejemplo n.º 10
0
    // Token: 0x06000D37 RID: 3383 RVA: 0x0005B508 File Offset: 0x00059708
    public static bool HorizontalGridbar(Rect rect, string title, ref int value, string[] set)
    {
        int num = value;

        GUI.BeginGroup(rect);
        GUI.Label(new Rect(0f, 5f, rect.width, rect.height), title, BlueStonez.label_interparkbold_11pt_left);
        value = UnityGUI.Toolbar(new Rect(150f, 5f, rect.width - 200f, 30f), value, set, set.Length, BlueStonez.tab_medium);
        GUI.EndGroup();
        return(value != num);
    }
    // Token: 0x06000C4A RID: 3146 RVA: 0x000528E0 File Offset: 0x00050AE0
    private void DrawTabs(Rect tabRect)
    {
        int num = UnityGUI.Toolbar(tabRect, this._selectedTab, this._tabs, this._tabs.Length, BlueStonez.tab_medium);

        if (num != this._selectedTab)
        {
            this._selectedTab = num;
            this.GetCurrentTransactions();
        }
    }
Ejemplo n.º 12
0
        private void DrawAddEventButton()
        {
            UnityGUI.BeginHorizontal();
            UnityGUI.FlexibleSpace();
            if (UnityGUI.Button("+", AddButtonOptions))
            {
                events.arraySize++;
            }

            UnityGUI.EndHorizontal();
        }
Ejemplo n.º 13
0
        private void Draw(string label, ref Vector2 value)
        {
            UnityGUI.BeginChangeCheck();
            value = UnityGUI.Vector2(label, value);
            var changed = UnityGUI.EndChangeCheck();

            if (changed)
            {
                UpdateValues(label);
            }
        }
Ejemplo n.º 14
0
    // Token: 0x06000D32 RID: 3378 RVA: 0x0005AE40 File Offset: 0x00059040
    private void DrawOptionsPanel()
    {
        GUI.SetNextControlName("OptionPanelHeading");
        GUI.Label(new Rect(0f, 0f, this._rect.width, 56f), LocalizedStrings.OptionsCaps, BlueStonez.tab_strip);
        if (GUI.GetNameOfFocusedControl() != "OptionPanelHeading")
        {
            GUI.FocusControl("OptionPanelHeading");
        }
        this._selectedOptionsTab = UnityGUI.Toolbar(new Rect(2f, 31f, this._rect.width - 5f, 22f), this._selectedOptionsTab, this._optionsTabs, this._optionsTabs.Length, BlueStonez.tab_medium);
        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        GUI.BeginGroup(new Rect(16f, 55f, this._rect.width - 32f, this._rect.height - 56f - 44f), string.Empty, BlueStonez.window_standard_grey38);
        switch (this._selectedOptionsTab)
        {
        case 0:
            this.DoControlsGroup();
            break;

        case 1:
            this.DoAudioGroup();
            break;

        case 2:
            this.DoVideoGroup();
            break;
        }
        GUI.EndGroup();
        GUI.enabled = !this._showWaterModeMenu;
        if (GUI.Button(new Rect(this._rect.width - 136f, this._rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.OkCaps), BlueStonez.button))
        {
            ApplicationDataManager.ApplicationOptions.SaveApplicationOptions();
            PanelManager.Instance.ClosePanel(PanelType.Options);
        }
        if (AutoMonoBehaviour <InputManager> .Instance.HasUnassignedKeyMappings)
        {
            GUI.contentColor = Color.red;
            GUI.Label(new Rect(166f, this._rect.height - 40f, this._rect.width - 136f - 166f, 32f), LocalizedStrings.UnassignedKeyMappingsWarningMsg, BlueStonez.label_interparkmed_11pt);
            GUI.contentColor = Color.white;
        }
        if (this._selectedOptionsTab == 0 && !ApplicationDataManager.IsMobile && GUITools.Button(new Rect(16f, this._rect.height - 40f, 150f, 32f), new GUIContent(LocalizedStrings.ResetDefaults), BlueStonez.button))
        {
            AutoMonoBehaviour <InputManager> .Instance.Reset();
        }
        else if (this._selectedOptionsTab == 2)
        {
            GUI.Label(new Rect(16f, this._rect.height - 40f, 150f, 32f), "FPS: " + (1f / Time.smoothDeltaTime).ToString("F1"), BlueStonez.label_interparkbold_16pt_left);
        }
        GUI.enabled = true;
    }
Ejemplo n.º 15
0
    // Token: 0x06000C2E RID: 3118 RVA: 0x00051210 File Offset: 0x0004F410
    private void DrawWeaponsStatsTab(Rect rect)
    {
        bool enabled = GUI.enabled;

        GUI.enabled = !this._isFilterDropDownOpen;
        GUI.changed = false;
        int num = UnityGUI.Toolbar(new Rect(2f, 5f, rect.width - 4f, 22f), this._selectedFilterIndex, this._selectionsToShow, 4, BlueStonez.tab_medium);

        if (GUI.changed)
        {
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        if (num != this._selectedFilterIndex)
        {
            this._selectedFilterIndex = num;
            this.UpdateWeaponStatList();
        }
        string title = LocalizedStrings.WeaponPerformaceTotal;

        switch (num)
        {
        case 0:
            title = LocalizedStrings.BestWeaponByDamageDealt;
            break;

        case 1:
            title = LocalizedStrings.BestWeaponByKills;
            break;

        case 2:
            title = LocalizedStrings.BestWeaponByAccuracy;
            break;

        case 3:
            title = LocalizedStrings.BestWeaponByHits;
            break;
        }
        this._scrollGeneral = GUITools.BeginScrollView(new Rect(0f, 26f, rect.width - 2f, rect.height - 26f), this._scrollGeneral, new Rect(0f, 0f, 340f, 680f), false, false, true);
        this.DrawGroupControl(new Rect(14f, 16f, rect.width - 40f, 646f), title, BlueStonez.label_group_interparkbold_18pt);
        int num2 = Mathf.RoundToInt((this.statsPage.width - 80f) * 0.5f);
        int num3 = 0;

        foreach (KeyValuePair <float, string> keyValuePair in this._weaponStatList)
        {
            float barValue = (num != 2) ? ((this._maxWeaponStat <= 0f) ? 0f : (keyValuePair.Key / this._maxWeaponStat)) : (keyValuePair.Key / 100f);
            this.DrawWeaponStat(new Rect(36f, (float)(32 + num3 * 76), (float)num2, 60f), keyValuePair.Value, keyValuePair.Key, barValue, this._weaponIcons[keyValuePair.Value]);
            num3++;
        }
        GUITools.EndScrollView();
        GUI.enabled = enabled;
    }
Ejemplo n.º 16
0
        void OnGUI()
        {
            UnityGUI.Header("Coordinates");
            headset = UnityGUI.Enum("Headset", headset);

            UnityGUI.Space();

            UnityGUI.BeginHorizontal();
            UnityGUI.Label(" ", "X", UnityGUI.BoldLabel);
            UnityGUI.Label("Y", UnityGUI.BoldLabel);
            UnityGUI.EndHorizontal();

            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Resolution", headset.GetWidth().ToString());
            UnityGUI.Label(headset.GetHeight().ToString());
            UnityGUI.EndHorizontal();

            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Field of View", ((int)headset.GetFieldOfView(Axis.Horizontal)).ToString());
            UnityGUI.Label(((int)headset.GetFieldOfView(Axis.Vertical)).ToString());
            UnityGUI.EndHorizontal();

            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Diameter (um)", ((int)headset.GetRetinalDiameter(Axis.Horizontal)).ToString());
            UnityGUI.Label(((int)headset.GetRetinalDiameter(Axis.Vertical)).ToString());
            UnityGUI.EndHorizontal();

            UnityGUI.Space();

            Draw("Pixel", ref pixel);
            Draw("Visual Angle", ref angle);
            Draw("Retina (um)", ref retina);
            Draw("Polar", ref polar);

            UnityGUI.Separator();
            UnityGUI.Header("Electrode Count");

            UnityGUI.BeginChangeCheck();
            pattern     = UnityGUI.Enum("Pattern", pattern);
            layout      = UnityGUI.Enum("Layout", layout);
            fieldOfView = UnityGUI.Float("Field of View", fieldOfView);
            var changed = UnityGUI.EndChangeCheck();

            if (changed)
            {
                numElectrodes = pattern.GetElectrodePositions(layout, fieldOfView).Length;
            }

            UnityGUI.Space();
            UnityGUI.Label("Electode Count", numElectrodes.ToString());
        }
Ejemplo n.º 17
0
        void OnGUI()
        {
            UnityGUI.Space();
            _dataType = UnityGUI.Enum("Data Type", _dataType);

            UnityGUI.Space();
            UnityGUI.Label("Parameters", UnityGUI.BoldLabel);

            _headset = UnityGUI.Enum("Headset Model", _headset);
            if (_dataType == DataType.Phosphene)
            {
                _pattern = UnityGUI.Enum("Electrode Pattern", _pattern);
                _layout  = UnityGUI.Enum("Electrode Layout", _layout);
            }

            UnityGUI.Space();
            _gpuAccel = UnityGUI.ToggleLeft("GPU Accelerated", _gpuAccel);

            if (UnityGUI.Button(!cpuStarted ? "Start" : "Stop", new GUIOptions {
                maxWidth = 50
            }))
            {
                if (!cpuStarted)
                {
                    Start();
                }
                else
                {
                    StopCPU();
                }
            }

            if (threadGroup != null)
            {
                UnityGUI.Enabled = cpuStarted || !_gpuAccel;
                UnityGUI.Space();
                UnityGUI.Label("CPU Threads", UnityGUI.BoldLabel);

                for (int i = 0; i < threadGroup.NumThreads; i++)
                {
                    UnityGUI.Label("Thread " + i.ToString(), (threadGroup.Progress[i] * 100).ToString("N0") + "%");
                }
            }
        }
Ejemplo n.º 18
0
        private void ButtonStateLabel(VRButton button)
        {
            var state = "Up";

            if (VRInput.GetButton(button))
            {
                state = "Down";
            }
            else if (VRInput.GetTouch(button))
            {
                state = "Touching";
            }
            else if (VRInput.GetHovering(button) > Mathf.Epsilon)
            {
                state = "Hovering";
            }

            UnityGUI.Label(button.ToString() + ": " + state);
        }
Ejemplo n.º 19
0
 // Token: 0x06000DEE RID: 3566 RVA: 0x00060030 File Offset: 0x0005E230
 private void OnGUI()
 {
     GUI.depth         = 11;
     this._rect.x      = (float)Screen.width - this._width;
     this._rect.y      = (float)GlobalUIRibbon.Instance.Height();
     this._rect.width  = this._width;
     this._rect.height = (float)Screen.height - this._rect.y;
     GUI.skin          = BlueStonez.Skin;
     GUI.BeginGroup(this._rect, GUIContent.none, BlueStonez.window_standard_grey38);
     GUI.Label(new Rect(0f, 0f, this._rect.width, 56f), this._title, BlueStonez.tab_strip);
     GUI.changed = false;
     this._currentGuiPageIndex = UnityGUI.Toolbar(new Rect(0f, 34f, (float)(140 * this._guiPageTabs.Length), 22f), this._currentGuiPageIndex, this._guiPageTabs, this._guiPageTabs.Length, BlueStonez.tab_medium);
     if (GUI.changed)
     {
         this.SetCurrentPage(this._currentGuiPageIndex);
         return;
     }
     GUI.EndGroup();
     this._guiPages[this._currentGuiPageIndex].DrawGUI(new Rect(this._rect.x, this._rect.y + 57f, this._rect.width, this._rect.height - 56f));
     GuiManager.DrawTooltip();
 }
Ejemplo n.º 20
0
        public override void OnInspectorGUI()
        {
            BeginInspectorGUI();

            Field(true, "leftHand");
            Field(true, "rightHand");

            UnityGUI.Space();
            Field(true, "applyOffset");

            if (target.applyOffset)
            {
                Field(true, "leftPositionOffset");
                Field(true, "leftRotationOffset");
                Field(true, "editLeftOffset");

                UnityGUI.Space();
                Field(true, "rightPositionOffset");
                Field(true, "rightRotationOffset");
                Field(true, "editRightOffset");
            }

            UnityGUI.Space(2);

            if (UnityGUI.Foldout(Application.isPlaying, "Controller State"))
            {
                if (XRDevice.model == "Oculus Rift CV1")
                {
                    DrawOculus();
                }
                else if (XRDevice.model == "Vive MV" || XRDevice.model == "VIVE_Pro MV")
                {
                    DrawVive();
                }

                Repaint();
            }

            EndInspectorGUI();
        }
Ejemplo n.º 21
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();
    }
Ejemplo n.º 22
0
 // Token: 0x06000919 RID: 2329 RVA: 0x00007AD5 File Offset: 0x00005CD5
 public static int Toolbar(Rect position, int selected, GUIContent[] contents, GUIStyle style)
 {
     return(UnityGUI.Toolbar(position, selected, contents, contents.Length, style));
 }
Ejemplo n.º 23
0
 // Token: 0x06000918 RID: 2328 RVA: 0x00007AC3 File Offset: 0x00005CC3
 public static int Toolbar(Rect position, int selected, string[] contents, int length, GUIStyle style)
 {
     return(UnityGUI.Toolbar(position, selected, UnityGUI.Temp(contents), length, style));
 }
Ejemplo n.º 24
0
    // Token: 0x06000D38 RID: 3384 RVA: 0x0005B588 File Offset: 0x00059788
    private void DoVideoGroup()
    {
        GUI.skin = BlueStonez.Skin;
        Rect  position    = new Rect(1f, 1f, this._rect.width - 33f, this._rect.height - 55f - 47f);
        Rect  contentRect = new Rect(0f, 0f, (float)this._desiredWidth, this._rect.height + 200f - 55f - 46f - 20f);
        int   num         = 10;
        int   num2        = 150;
        int   num3        = this._screenResText.Length * 16 + 16;
        float width       = position.width - 8f - 8f - 20f;

        if (!Application.isWebPlayer || this.showResolutions)
        {
            contentRect.height += (float)(this._screenResText.Length * 16);
        }
        this._scrollVideo = GUITools.BeginScrollView(position, this._scrollVideo, contentRect, false, false, true);
        GUI.enabled       = true;
        int num4 = UnityGUI.Toolbar(new Rect(0f, 5f, position.width - 10f, 22f), this._currentQuality, this.qualitySet, this.qualitySet.Length, BlueStonez.tab_medium);

        if (num4 != this._currentQuality)
        {
            this.SetCurrentQuality(num4);
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        if (OptionsPanelGUI.HorizontalScrollbar(new Rect(8f, 30f, width, 30f), LocalizedStrings.TextureQuality, ref this._textureQuality, 0f, 5f))
        {
            this.graphicsChanged = true;
            this.SetCurrentQuality(this.qualitySet.Length - 1);
        }
        if (OptionsPanelGUI.HorizontalGridbar(new Rect(8f, 60f, width, 30f), LocalizedStrings.VSync, ref this._vsync, this.vsyncSet))
        {
            this.graphicsChanged = true;
            this.SetCurrentQuality(this.qualitySet.Length - 1);
        }
        if (OptionsPanelGUI.HorizontalGridbar(new Rect(8f, 90f, width, 30f), LocalizedStrings.AntiAliasing, ref this._antiAliasing, this.antiAliasingSet))
        {
            this.graphicsChanged = true;
            this.SetCurrentQuality(this.qualitySet.Length - 1);
        }
        int num5 = 130;

        if (!ApplicationDataManager.IsMobile)
        {
            this._postProcessing = GUI.Toggle(new Rect(8f, (float)num5, width, 30f), ApplicationDataManager.ApplicationOptions.VideoPostProcessing, LocalizedStrings.ShowPostProcessingEffects, BlueStonez.toggle);
            if (this._postProcessing != ApplicationDataManager.ApplicationOptions.VideoPostProcessing)
            {
                this.graphicsChanged = true;
                this.SetCurrentQuality(this.qualitySet.Length - 1);
            }
            num5 += 30;
        }
        bool flag = GUI.Toggle(new Rect(8f, (float)num5, width, 30f), ApplicationDataManager.ApplicationOptions.VideoShowFps, LocalizedStrings.ShowFPS, BlueStonez.toggle);

        if (flag != ApplicationDataManager.ApplicationOptions.VideoShowFps)
        {
            ApplicationDataManager.ApplicationOptions.VideoShowFps = flag;
            GameData.Instance.VideoShowFps.Fire();
        }
        num5 += 30;
        if (!Application.isWebPlayer || this.showResolutions)
        {
            this.DrawGroupControl(new Rect(8f, (float)num5, width, (float)num3), LocalizedStrings.ScreenResolution, BlueStonez.label_group_interparkbold_18pt);
            GUI.BeginGroup(new Rect(8f, (float)num5, width, (float)num3));
            GUI.changed = false;
            Rect position2 = new Rect(10f, 10f, (float)(num + num2 * 2), (float)num3);
            int  num6      = GUI.SelectionGrid(position2, ScreenResolutionManager.CurrentResolutionIndex, this._screenResText, 1, BlueStonez.radiobutton);
            if (num6 != ScreenResolutionManager.CurrentResolutionIndex)
            {
                if (this.INSTANT_SCREEN_RES_CHANGE)
                {
                    ScreenResolutionManager.SetResolution(num6, Screen.fullScreen);
                }
                else
                {
                    this.ShowScreenResChangeConfirmation(ScreenResolutionManager.CurrentResolutionIndex, num6);
                }
            }
            GUI.EndGroup();
        }
        GUITools.EndScrollView();
    }
Ejemplo n.º 25
0
 private void AxisStateLabel(VRButton button)
 {
     UnityGUI.Label(button.ToString() + ": " + VRInput.GetAxis(button).ToString("0.000"));
 }
Ejemplo n.º 26
0
        private void DrawOculus()
        {
            UnityGUI.Space();
            UnityGUI.Label("Rift_LeftController");
            UnityGUI.IndentLevel++;

            var pos = VRInput.LeftHandPosition;
            var rot = VRInput.LeftHandRotation.eulerAngles;

            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position X: " + pos.x.ToString("0.000"));
            UnityGUI.Label("Rotation X: " + rot.x.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Y: " + pos.y.ToString("0.000"));
            UnityGUI.Label("Rotation Y: " + rot.y.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Z: " + pos.z.ToString("0.000"));
            UnityGUI.Label("Rotation Z: " + rot.z.ToString("0.000"));
            UnityGUI.EndHorizontal();

            ButtonStateLabel(VRButton.Rift_X);
            ButtonStateLabel(VRButton.Rift_Y);
            ButtonStateLabel(VRButton.Rift_Start);
            ButtonStateLabel(VRButton.Rift_LeftThumbstick);
            ButtonStateLabel(VRButton.Rift_LeftThumbRest);
            ButtonStateLabel(VRButton.Rift_LeftIndexTrigger);
            AxisStateLabel(VRButton.Rift_LeftIndexTrigger);
            AxisStateLabel(VRButton.Rift_LeftMiddleTrigger);
            AxesStateLabel(VRButton.Rift_LeftThumbstick);
            UnityGUI.IndentLevel--;

            UnityGUI.Space();
            UnityGUI.Label("Rift_RightController");
            UnityGUI.IndentLevel++;

            pos = VRInput.RightHandPosition;
            rot = VRInput.RightHandRotation.eulerAngles;
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position X: " + pos.x.ToString("0.000"));
            UnityGUI.Label("Rotation X: " + rot.x.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Y: " + pos.y.ToString("0.000"));
            UnityGUI.Label("Rotation Y: " + rot.y.ToString("0.000"));
            UnityGUI.EndHorizontal();
            UnityGUI.BeginHorizontal();
            UnityGUI.Label("Position Z: " + pos.z.ToString("0.000"));
            UnityGUI.Label("Rotation Z: " + rot.z.ToString("0.000"));
            UnityGUI.EndHorizontal();

            ButtonStateLabel(VRButton.Rift_A);
            ButtonStateLabel(VRButton.Rift_B);
            ButtonStateLabel(VRButton.Rift_RightThumbstick);
            ButtonStateLabel(VRButton.Rift_RightThumbRest);
            ButtonStateLabel(VRButton.Rift_RightIndexTrigger);
            AxisStateLabel(VRButton.Rift_RightIndexTrigger);
            AxisStateLabel(VRButton.Rift_RightMiddleTrigger);
            AxesStateLabel(VRButton.Rift_RightThumbstick);
            UnityGUI.IndentLevel--;
        }