Ejemplo n.º 1
0
 // Token: 0x060038CE RID: 14542 RVA: 0x0019F8B0 File Offset: 0x0019DCB0
 private static void finishPage()
 {
     PlayerNPCDialogueUI.dialogueAnimating = false;
     if (PlayerNPCDialogueUI.message != null && PlayerNPCDialogueUI.message.pages != null)
     {
         if ((int)PlayerNPCDialogueUI.dialoguePage < PlayerNPCDialogueUI.message.pages.Length - 1)
         {
             PlayerNPCDialogueUI.dialogueHasNextPage = true;
             PlayerNPCDialogueUI.pageLabel.text      = PlayerNPCDialogueUI.localization.format("Page", new object[]
             {
                 MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.interact)
             });
             PlayerNPCDialogueUI.pageLabel.isVisible = true;
         }
         else if ((int)PlayerNPCDialogueUI.dialoguePage == PlayerNPCDialogueUI.message.pages.Length - 1 && PlayerNPCDialogueUI.prevDialogue != null)
         {
             PlayerNPCDialogueUI.dialogueHasNextPage = true;
             PlayerNPCDialogueUI.pageLabel.text      = PlayerNPCDialogueUI.localization.format("Page", new object[]
             {
                 MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.interact)
             });
             PlayerNPCDialogueUI.pageLabel.isVisible   = true;
             PlayerNPCDialogueUI.responseBox.isVisible = true;
         }
         else
         {
             PlayerNPCDialogueUI.responseBox.isVisible = true;
         }
     }
     else
     {
         PlayerNPCDialogueUI.responseBox.isVisible = true;
     }
 }
Ejemplo n.º 2
0
 public static void closeAll()
 {
     MenuPauseUI.close();
     MenuCreditsUI.close();
     MenuTitleUI.close();
     MenuDashboardUI.close();
     MenuPlayUI.close();
     MenuPlaySingleplayerUI.close();
     MenuPlayMatchmakingUI.close();
     MenuPlayLobbiesUI.close();
     MenuPlayConnectUI.close();
     MenuPlayServersUI.close();
     MenuPlayServerInfoUI.close();
     MenuPlayConfigUI.close();
     MenuSurvivorsUI.close();
     MenuSurvivorsCharacterUI.close();
     MenuSurvivorsAppearanceUI.close();
     MenuSurvivorsClothingUI.close();
     MenuSurvivorsGroupUI.close();
     MenuSurvivorsClothingBoxUI.close();
     MenuSurvivorsClothingDeleteUI.close();
     MenuSurvivorsClothingInspectUI.close();
     MenuSurvivorsClothingItemUI.close();
     MenuConfigurationUI.close();
     MenuConfigurationOptionsUI.close();
     MenuConfigurationDisplayUI.close();
     MenuConfigurationGraphicsUI.close();
     MenuConfigurationControlsUI.close();
     MenuWorkshopUI.close();
     MenuWorkshopEditorUI.close();
     MenuWorkshopSubmitUI.close();
 }
Ejemplo n.º 3
0
 private void OnGUI()
 {
     if (MenuUI.window == null)
     {
         return;
     }
     MenuUI.window.draw(false);
     MenuSurvivorsClothingBoxUI.update();
     MenuConfigurationControlsUI.bindOnGUI();
 }
Ejemplo n.º 4
0
        // Token: 0x060035E6 RID: 13798 RVA: 0x0016BAFC File Offset: 0x00169EFC
        public static void updateButton(byte index)
        {
            KeyCode key         = ControlsSettings.bindings[(int)index].key;
            string  keyCodeText = MenuConfigurationControlsUI.getKeyCodeText(key);

            MenuConfigurationControlsUI.buttons[(int)index].text = MenuConfigurationControlsUI.localization.format("Key_" + index + "_Button", new object[]
            {
                keyCodeText
            });
        }
Ejemplo n.º 5
0
 // Token: 0x060035F0 RID: 13808 RVA: 0x0016BC20 File Offset: 0x0016A020
 public static void bindOnGUI()
 {
     if (MenuConfigurationControlsUI.binding != 255)
     {
         if (Event.current.type == EventType.KeyDown)
         {
             if (Event.current.keyCode == KeyCode.Backspace)
             {
                 MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.binding);
                 MenuConfigurationControlsUI.cancel();
             }
             else if (Event.current.keyCode != KeyCode.Escape && Event.current.keyCode != KeyCode.Insert)
             {
                 MenuConfigurationControlsUI.bind(Event.current.keyCode);
             }
         }
         else if (Event.current.type == EventType.MouseDown)
         {
             if (Event.current.button == 0)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse0);
             }
             else if (Event.current.button == 1)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse1);
             }
             else if (Event.current.button == 2)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse2);
             }
             else if (Event.current.button == 3)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse3);
             }
             else if (Event.current.button == 4)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse4);
             }
             else if (Event.current.button == 5)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse5);
             }
             else if (Event.current.button == 6)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse6);
             }
         }
         else if (Event.current.shift)
         {
             MenuConfigurationControlsUI.bind(KeyCode.LeftShift);
         }
     }
 }
Ejemplo n.º 6
0
 // Token: 0x060035F2 RID: 13810 RVA: 0x0016BE3B File Offset: 0x0016A23B
 private static void onClickedBackButton(SleekButton button)
 {
     if (Player.player != null)
     {
         PlayerPauseUI.open();
     }
     else
     {
         MenuConfigurationUI.open();
     }
     MenuConfigurationControlsUI.close();
 }
 public static void bindOnGUI()
 {
     if (MenuConfigurationControlsUI.binding != 255)
     {
         if (Event.current.type == 4)
         {
             if (Event.current.keyCode == 8)
             {
                 MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.binding);
                 MenuConfigurationControlsUI.cancel();
             }
             else if (Event.current.keyCode != 27 && Event.current.keyCode != 277)
             {
                 MenuConfigurationControlsUI.bind(Event.current.keyCode);
             }
         }
         else if (Event.current.type == null)
         {
             if (Event.current.button == 0)
             {
                 MenuConfigurationControlsUI.bind(323);
             }
             else if (Event.current.button == 1)
             {
                 MenuConfigurationControlsUI.bind(324);
             }
             else if (Event.current.button == 2)
             {
                 MenuConfigurationControlsUI.bind(325);
             }
             else if (Event.current.button == 3)
             {
                 MenuConfigurationControlsUI.bind(326);
             }
             else if (Event.current.button == 4)
             {
                 MenuConfigurationControlsUI.bind(327);
             }
             else if (Event.current.button == 5)
             {
                 MenuConfigurationControlsUI.bind(328);
             }
             else if (Event.current.button == 6)
             {
                 MenuConfigurationControlsUI.bind(329);
             }
         }
         else if (Event.current.shift)
         {
             MenuConfigurationControlsUI.bind(304);
         }
     }
 }
Ejemplo n.º 8
0
 // Token: 0x060035F1 RID: 13809 RVA: 0x0016BDAC File Offset: 0x0016A1AC
 public static void bindUpdate()
 {
     if (MenuConfigurationControlsUI.binding != 255)
     {
         if (Input.GetKeyDown(KeyCode.Mouse3))
         {
             MenuConfigurationControlsUI.bind(KeyCode.Mouse3);
         }
         else if (Input.GetKeyDown(KeyCode.Mouse4))
         {
             MenuConfigurationControlsUI.bind(KeyCode.Mouse4);
         }
         else if (Input.GetKeyDown(KeyCode.Mouse5))
         {
             MenuConfigurationControlsUI.bind(KeyCode.Mouse5);
         }
         else if (Input.GetKeyDown(KeyCode.Mouse6))
         {
             MenuConfigurationControlsUI.bind(KeyCode.Mouse6);
         }
     }
 }
 // Token: 0x060037D1 RID: 14289 RVA: 0x0018BB08 File Offset: 0x00189F08
 public static void open(InteractableMannequin newMannequin)
 {
     if (PlayerBarricadeMannequinUI.active)
     {
         return;
     }
     PlayerBarricadeMannequinUI.active         = true;
     PlayerBarricadeMannequinUI.mannequin      = newMannequin;
     PlayerBarricadeMannequinUI.addButton.text = PlayerBarricadeMannequinUI.localization.format("Add_Button", new object[]
     {
         MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
     });
     PlayerBarricadeMannequinUI.removeButton.text = PlayerBarricadeMannequinUI.localization.format("Remove_Button", new object[]
     {
         MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
     });
     if (PlayerBarricadeMannequinUI.mannequin != null)
     {
         PlayerBarricadeMannequinUI.poseButton.state = (int)PlayerBarricadeMannequinUI.mannequin.pose;
     }
     PlayerBarricadeMannequinUI.container.lerpPositionScale(0f, 0f, ESleekLerp.EXPONENTIAL, 20f);
 }
 public static void bindUpdate()
 {
     if (MenuConfigurationControlsUI.binding != 255)
     {
         if (Input.GetKeyDown(326))
         {
             MenuConfigurationControlsUI.bind(326);
         }
         else if (Input.GetKeyDown(327))
         {
             MenuConfigurationControlsUI.bind(327);
         }
         else if (Input.GetKeyDown(328))
         {
             MenuConfigurationControlsUI.bind(328);
         }
         else if (Input.GetKeyDown(329))
         {
             MenuConfigurationControlsUI.bind(329);
         }
     }
 }
Ejemplo n.º 11
0
        // Token: 0x060035F4 RID: 13812 RVA: 0x0016BE70 File Offset: 0x0016A270
        private static void updateAll()
        {
            byte b = 0;

            while ((int)b < MenuConfigurationControlsUI.layouts.Length)
            {
                byte b2 = 0;
                while ((int)b2 < MenuConfigurationControlsUI.layouts[(int)b].Length)
                {
                    MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.layouts[(int)b][(int)b2]);
                    b2 += 1;
                }
                b += 1;
            }
            MenuConfigurationControlsUI.leaningButton.state      = (int)ControlsSettings.leaning;
            MenuConfigurationControlsUI.sprintingButton.state    = (int)ControlsSettings.sprinting;
            MenuConfigurationControlsUI.proningButton.state      = (int)ControlsSettings.proning;
            MenuConfigurationControlsUI.crouchingButton.state    = (int)ControlsSettings.crouching;
            MenuConfigurationControlsUI.aimingButton.state       = (int)ControlsSettings.aiming;
            MenuConfigurationControlsUI.sensitivityField.state   = ControlsSettings.sensitivity;
            MenuConfigurationControlsUI.invertToggle.state       = ControlsSettings.invert;
            MenuConfigurationControlsUI.invertFlightToggle.state = ControlsSettings.invert;
        }
Ejemplo n.º 12
0
 private static void onClickedControlsButton(SleekButton button)
 {
     MenuConfigurationControlsUI.open();
     MenuConfigurationUI.close();
 }
Ejemplo n.º 13
0
 private static void cancel()
 {
     MenuConfigurationControlsUI.cancel();
     MenuConfigurationControls.binding = byte.MaxValue;
 }
Ejemplo n.º 14
0
 private void Update()
 {
     if (MenuUI.window == null)
     {
         return;
     }
     MenuConfigurationControlsUI.bindUpdate();
     if (MenuConfigurationControlsUI.binding == 255)
     {
         if (Input.GetKeyDown(27))
         {
             if (Provider.provider.matchmakingService.isAttemptingServerQuery)
             {
                 Provider.provider.matchmakingService.cancel();
             }
             else if (MenuUI.isAlerting)
             {
                 MenuUI.closeAlert();
                 MenuUI.isAlerting = false;
             }
             else if (MenuPauseUI.active)
             {
                 MenuPauseUI.close();
                 MenuDashboardUI.open();
                 MenuTitleUI.open();
             }
             else if (MenuCreditsUI.active)
             {
                 MenuCreditsUI.close();
                 MenuPauseUI.open();
             }
             else if (MenuTitleUI.active)
             {
                 MenuPauseUI.open();
                 MenuDashboardUI.close();
                 MenuTitleUI.close();
             }
             else if (MenuPlayConfigUI.active)
             {
                 MenuPlayConfigUI.close();
                 MenuPlaySingleplayerUI.open();
             }
             else if (MenuPlayServerInfoUI.active)
             {
                 MenuPlayServerInfoUI.close();
                 MenuPlayServerInfoUI.EServerInfoOpenContext openContext = MenuPlayServerInfoUI.openContext;
                 if (openContext != MenuPlayServerInfoUI.EServerInfoOpenContext.CONNECT)
                 {
                     if (openContext != MenuPlayServerInfoUI.EServerInfoOpenContext.SERVERS)
                     {
                         if (openContext == MenuPlayServerInfoUI.EServerInfoOpenContext.MATCHMAKING)
                         {
                             MenuPlayMatchmakingUI.open();
                         }
                     }
                     else
                     {
                         MenuPlayServersUI.open();
                     }
                 }
                 else
                 {
                     MenuPlayConnectUI.open();
                 }
             }
             else if (MenuPlayConnectUI.active || MenuPlayServersUI.active || MenuPlaySingleplayerUI.active || MenuPlayMatchmakingUI.active || MenuPlayLobbiesUI.active)
             {
                 MenuPlayConnectUI.close();
                 MenuPlayServersUI.close();
                 MenuPlaySingleplayerUI.close();
                 MenuPlayMatchmakingUI.close();
                 MenuPlayLobbiesUI.close();
                 MenuPlayUI.open();
             }
             else if (MenuSurvivorsClothingItemUI.active)
             {
                 MenuSurvivorsClothingItemUI.close();
                 MenuSurvivorsClothingUI.open();
             }
             else if (MenuSurvivorsClothingBoxUI.active)
             {
                 if (!MenuSurvivorsClothingBoxUI.isUnboxing)
                 {
                     MenuSurvivorsClothingBoxUI.close();
                     MenuSurvivorsClothingItemUI.open();
                 }
             }
             else if (MenuSurvivorsClothingInspectUI.active || MenuSurvivorsClothingDeleteUI.active)
             {
                 MenuSurvivorsClothingInspectUI.close();
                 MenuSurvivorsClothingDeleteUI.close();
                 MenuSurvivorsClothingItemUI.open();
             }
             else if (MenuSurvivorsCharacterUI.active || MenuSurvivorsAppearanceUI.active || MenuSurvivorsGroupUI.active || MenuSurvivorsClothingUI.active)
             {
                 MenuSurvivorsCharacterUI.close();
                 MenuSurvivorsAppearanceUI.close();
                 MenuSurvivorsGroupUI.close();
                 MenuSurvivorsClothingUI.close();
                 MenuSurvivorsUI.open();
             }
             else if (MenuConfigurationOptionsUI.active || MenuConfigurationControlsUI.active || MenuConfigurationGraphicsUI.active || MenuConfigurationDisplayUI.active)
             {
                 MenuConfigurationOptionsUI.close();
                 MenuConfigurationControlsUI.close();
                 MenuConfigurationGraphicsUI.close();
                 MenuConfigurationDisplayUI.close();
                 MenuConfigurationUI.open();
             }
             else if (MenuWorkshopSubmitUI.active || MenuWorkshopEditorUI.active || MenuWorkshopErrorUI.active || MenuWorkshopLocalizationUI.active || MenuWorkshopSpawnsUI.active || MenuWorkshopModulesUI.active)
             {
                 MenuWorkshopSubmitUI.close();
                 MenuWorkshopEditorUI.close();
                 MenuWorkshopErrorUI.close();
                 MenuWorkshopLocalizationUI.close();
                 MenuWorkshopSpawnsUI.close();
                 MenuWorkshopModulesUI.close();
                 MenuWorkshopUI.open();
             }
             else
             {
                 MenuPlayUI.close();
                 MenuSurvivorsUI.close();
                 MenuConfigurationUI.close();
                 MenuWorkshopUI.close();
                 MenuDashboardUI.open();
                 MenuTitleUI.open();
             }
         }
         if (MenuUI.window != null)
         {
             if (Input.GetKeyDown(ControlsSettings.screenshot))
             {
                 Provider.takeScreenshot();
             }
             if (Input.GetKeyDown(ControlsSettings.hud))
             {
                 DevkitWindowManager.isActive          = false;
                 MenuUI.window.isEnabled               = !MenuUI.window.isEnabled;
                 MenuUI.window.drawCursorWhileDisabled = false;
             }
             if (Input.GetKeyDown(ControlsSettings.terminal))
             {
                 DevkitWindowManager.isActive          = !DevkitWindowManager.isActive;
                 MenuUI.window.isEnabled               = !DevkitWindowManager.isActive;
                 MenuUI.window.drawCursorWhileDisabled = DevkitWindowManager.isActive;
             }
         }
     }
     if (Input.GetKeyDown(ControlsSettings.refreshAssets))
     {
         Assets.refresh();
     }
     if (Input.GetKeyDown(ControlsSettings.clipboardDebug) && MenuSurvivorsAppearanceUI.active)
     {
         string text = string.Empty;
         text = text + "Face " + Characters.active.face;
         text = text + "\nHair " + Characters.active.hair;
         text = text + "\nBeard " + Characters.active.beard;
         text = text + "\nColor_Skin " + Palette.hex(Characters.active.skin);
         text = text + "\nColor_Hair " + Palette.hex(Characters.active.color);
         if (Characters.active.hand)
         {
             text += "\nBackward";
         }
         GUIUtility.systemCopyBuffer = text;
     }
     if (MenuUI.isAlerting && Time.realtimeSinceStartup - MenuUI.lastAlert > MenuUI.alertTime)
     {
         MenuUI.closeAlert();
         MenuUI.isAlerting = false;
     }
     MenuUI.window.showCursor = true;
     MenuUI.window.updateDebug();
     if (MenuPlayUI.active || MenuPlayConnectUI.active || MenuPlayServersUI.active || MenuPlayServerInfoUI.active || MenuPlaySingleplayerUI.active || MenuPlayMatchmakingUI.active || MenuPlayLobbiesUI.active || MenuPlayConfigUI.active)
     {
         this.target = this.play;
     }
     else if (MenuSurvivorsUI.active || MenuSurvivorsCharacterUI.active || MenuSurvivorsAppearanceUI.active || MenuSurvivorsGroupUI.active || MenuSurvivorsClothingUI.active || MenuSurvivorsClothingItemUI.active || MenuSurvivorsClothingInspectUI.active || MenuSurvivorsClothingDeleteUI.active || MenuSurvivorsClothingBoxUI.active)
     {
         this.target = this.survivors;
     }
     else if (MenuConfigurationUI.active || MenuConfigurationOptionsUI.active || MenuConfigurationControlsUI.active || MenuConfigurationGraphicsUI.active || MenuConfigurationDisplayUI.active)
     {
         this.target = this.configuration;
     }
     else if (MenuWorkshopUI.active || MenuWorkshopSubmitUI.active || MenuWorkshopEditorUI.active || MenuWorkshopErrorUI.active || MenuWorkshopLocalizationUI.active || MenuWorkshopSpawnsUI.active || MenuWorkshopModulesUI.active)
     {
         this.target = this.workshop;
     }
     else
     {
         this.target = this.title;
     }
     if (this.target == this.title)
     {
         if (MenuUI.hasTitled)
         {
             base.transform.position = Vector3.Lerp(base.transform.position, this.target.position, Time.deltaTime * 4f);
             base.transform.rotation = Quaternion.Lerp(base.transform.rotation, this.target.rotation, Time.deltaTime * 4f);
         }
         else
         {
             base.transform.position = Vector3.Lerp(base.transform.position, this.target.position, Time.deltaTime);
             base.transform.rotation = Quaternion.Lerp(base.transform.rotation, this.target.rotation, Time.deltaTime);
         }
     }
     else
     {
         MenuUI.hasTitled        = true;
         base.transform.position = Vector3.Lerp(base.transform.position, this.target.position, Time.deltaTime * 4f);
         base.transform.rotation = Quaternion.Lerp(base.transform.rotation, this.target.rotation, Time.deltaTime * 4f);
     }
 }
Ejemplo n.º 15
0
 private static void bind(KeyCode key)
 {
     MenuConfigurationControlsUI.bind(key);
     MenuConfigurationControls.binding = byte.MaxValue;
 }
Ejemplo n.º 16
0
        public static void updateScene()
        {
            if (!Dedicator.isDedicated)
            {
                if (LoadingUI.backgroundImage == null)
                {
                    return;
                }
                if (LoadingUI.loadingImage == null)
                {
                    return;
                }
                LoadingUI.updateProgress(0f);
                Local local = Localization.read("/Menu/MenuTips.dat");
                byte  b;
                do
                {
                    b = (byte)Random.Range(1, (int)(LoadingUI.TIP_COUNT + 1));
                }while (b == (byte)LoadingUI.tip);
                LoadingUI.tip = (ELoadingTip)b;
                string text;
                if (OptionsSettings.streamer && Provider.streamerNames != null && Provider.streamerNames.Count > 0 && Provider.streamerNames[0] == "Nelson AI")
                {
                    text = local.format("Streamer");
                }
                else
                {
                    switch (LoadingUI.tip)
                    {
                    case ELoadingTip.HOTKEY:
                        text = local.format("Hotkey");
                        break;

                    case ELoadingTip.EQUIP:
                        text = local.format("Equip", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.DROP:
                        text = local.format("Drop", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.SIRENS:
                        text = local.format("Sirens", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.TRANSFORM:
                        text = local.format("Transform");
                        break;

                    case ELoadingTip.QUALITY:
                        text = local.format("Quality");
                        break;

                    case ELoadingTip.UMBRELLA:
                        text = local.format("Umbrella");
                        break;

                    case ELoadingTip.HEAL:
                        text = local.format("Heal");
                        break;

                    case ELoadingTip.ROTATE:
                        text = local.format("Rotate");
                        break;

                    case ELoadingTip.BASE:
                        text = local.format("Base");
                        break;

                    case ELoadingTip.DEQUIP:
                        text = local.format("Dequip", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.dequip)
                        });
                        break;

                    case ELoadingTip.NIGHTVISION:
                        text = local.format("Nightvision", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.vision)
                        });
                        break;

                    case ELoadingTip.TRANSFER:
                        text = local.format("Transfer", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.SURFACE:
                        text = local.format("Surface", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.jump)
                        });
                        break;

                    case ELoadingTip.ARREST:
                        text = local.format("Arrest", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.leanLeft),
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.leanRight)
                        });
                        break;

                    case ELoadingTip.SAFEZONE:
                        text = local.format("Safezone");
                        break;

                    case ELoadingTip.CLAIM:
                        text = local.format("Claim");
                        break;

                    case ELoadingTip.GROUP:
                        text = local.format("Group");
                        break;

                    case ELoadingTip.MAP:
                        text = local.format("Map", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.map)
                        });
                        break;

                    case ELoadingTip.BEACON:
                        text = local.format("Beacon");
                        break;

                    case ELoadingTip.HORN:
                        text = local.format("Horn", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.primary)
                        });
                        break;

                    case ELoadingTip.LIGHTS:
                        text = local.format("Lights", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.secondary)
                        });
                        break;

                    case ELoadingTip.SNAP:
                        text = local.format("Snap", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.snap)
                        });
                        break;

                    case ELoadingTip.UPGRADE:
                        text = local.format("Upgrade", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.GRAB:
                        text = local.format("Grab", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.SKYCRANE:
                        text = local.format("Skycrane", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.other)
                        });
                        break;

                    case ELoadingTip.SEAT:
                        text = local.format("Seat");
                        break;

                    case ELoadingTip.RARITY:
                        text = local.format("Rarity");
                        break;

                    case ELoadingTip.ORIENTATION:
                        text = local.format("Orientation", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.rotate)
                        });
                        break;

                    case ELoadingTip.RED:
                        text = local.format("Red");
                        break;

                    case ELoadingTip.STEADY:
                        text = local.format("Steady", new object[]
                        {
                            MenuConfigurationControlsUI.getKeyCodeText(ControlsSettings.sprint)
                        });
                        break;

                    default:
                        text = "#" + LoadingUI.tip.ToString();
                        break;
                    }
                }
                LoadingUI.tipBox.text = ItemTool.filterRarityRichText(local.format("Tip", new object[]
                {
                    text
                }));
                if (Level.info != null)
                {
                    if (!LoadingUI.pickBackgroundImage(Level.info.path + "/Screenshots") && !LoadingUI.loadBackgroundImage(Level.info.path + "/Level.png"))
                    {
                        LoadingUI.pickBackgroundImage(ReadWrite.PATH + "/Screenshots");
                    }
                    Local local2 = Localization.tryRead(Level.info.path, false);
                    if (local2 != null)
                    {
                        if (Provider.isConnected)
                        {
                            string text2;
                            if (Provider.isServer)
                            {
                                text2 = LoadingUI.localization.format("Offline");
                            }
                            else
                            {
                                if (Provider.currentServerInfo.IsVACSecure)
                                {
                                    text2 = LoadingUI.localization.format("VAC_Secure");
                                }
                                else
                                {
                                    text2 = LoadingUI.localization.format("VAC_Insecure");
                                }
                                if (Provider.currentServerInfo.IsBattlEyeSecure)
                                {
                                    text2 = text2 + " + " + LoadingUI.localization.format("BattlEye_Secure");
                                }
                                else
                                {
                                    text2 = text2 + " + " + LoadingUI.localization.format("BattlEye_Insecure");
                                }
                            }
                            LoadingUI.loadingLabel.text = local2.format("Loading_Server", new object[]
                            {
                                (!OptionsSettings.streamer) ? Provider.currentServerInfo.name : LoadingUI.localization.format("Streamer"),
                                text2
                            });
                            if (Provider.mode == EGameMode.EASY)
                            {
                                LoadingUI.loadingImage.backgroundColor = Palette.COLOR_G;
                                LoadingUI.loadingImage.foregroundColor = Palette.COLOR_G;
                            }
                            else if (Provider.mode == EGameMode.HARD)
                            {
                                LoadingUI.loadingImage.backgroundColor = Palette.COLOR_R;
                                LoadingUI.loadingImage.foregroundColor = Palette.COLOR_R;
                            }
                            else
                            {
                                LoadingUI.loadingImage.backgroundColor = Color.white;
                                LoadingUI.loadingImage.foregroundColor = Color.white;
                            }
                        }
                        else
                        {
                            LoadingUI.loadingLabel.text            = local2.format("Loading_Editor");
                            LoadingUI.loadingImage.backgroundColor = Color.white;
                            LoadingUI.loadingImage.foregroundColor = Color.white;
                        }
                    }
                    else
                    {
                        LoadingUI.loadingLabel.text            = string.Empty;
                        LoadingUI.loadingImage.backgroundColor = Color.white;
                        LoadingUI.loadingImage.foregroundColor = Color.white;
                    }
                    if (Level.info.configData.Creators.Length > 0 || Level.info.configData.Collaborators.Length > 0 || Level.info.configData.Thanks.Length > 0)
                    {
                        int    num   = 0;
                        string text3 = string.Empty;
                        if (Level.info.configData.Creators.Length > 0)
                        {
                            text3 += LoadingUI.localization.format("Creators");
                            num   += 15;
                            for (int i = 0; i < Level.info.configData.Creators.Length; i++)
                            {
                                text3 = text3 + "\n" + Level.info.configData.Creators[i];
                                num  += 15;
                            }
                        }
                        if (Level.info.configData.Collaborators.Length > 0)
                        {
                            if (text3.Length > 0)
                            {
                                text3 += "\n\n";
                                num   += 30;
                            }
                            text3 += LoadingUI.localization.format("Collaborators");
                            num   += 15;
                            for (int j = 0; j < Level.info.configData.Collaborators.Length; j++)
                            {
                                text3 = text3 + "\n" + Level.info.configData.Collaborators[j];
                                num  += 15;
                            }
                        }
                        if (Level.info.configData.Thanks.Length > 0)
                        {
                            if (text3.Length > 0)
                            {
                                text3 += "\n\n";
                                num   += 30;
                            }
                            text3 += LoadingUI.localization.format("Thanks");
                            num   += 15;
                            for (int k = 0; k < Level.info.configData.Thanks.Length; k++)
                            {
                                text3 = text3 + "\n" + Level.info.configData.Thanks[k];
                                num  += 15;
                            }
                        }
                        LoadingUI.creditsBox.positionOffset_Y = -num / 2;
                        LoadingUI.creditsBox.sizeOffset_Y     = num;
                        LoadingUI.creditsBox.text             = text3;
                        LoadingUI.creditsBox.isVisible        = true;
                    }
                    else
                    {
                        LoadingUI.creditsBox.isVisible = false;
                    }
                }
                else
                {
                    LoadingUI.pickBackgroundImage(ReadWrite.PATH + "/Screenshots");
                    LoadingUI.loadingLabel.text            = LoadingUI.localization.format("Loading");
                    LoadingUI.loadingImage.backgroundColor = Color.white;
                    LoadingUI.loadingImage.foregroundColor = Color.white;
                    LoadingUI.creditsBox.isVisible         = false;
                }
                LoadingUI.loadingBox.sizeOffset_X = -20;
                LoadingUI.cancelButton.isVisible  = false;
            }
        }
Ejemplo n.º 17
0
 // Token: 0x060035F3 RID: 13811 RVA: 0x0016BE61 File Offset: 0x0016A261
 private static void onClickedDefaultButton(SleekButton button)
 {
     ControlsSettings.restoreDefaults();
     MenuConfigurationControlsUI.updateAll();
 }
Ejemplo n.º 18
0
        // Token: 0x060035E0 RID: 13792 RVA: 0x0016B0D8 File Offset: 0x001694D8
        public MenuConfigurationControlsUI()
        {
            MenuConfigurationControlsUI.localization = Localization.read("/Menu/Configuration/MenuConfigurationControls.dat");
            MenuConfigurationControlsUI.container    = new Sleek();
            MenuConfigurationControlsUI.container.positionOffset_X = 10;
            MenuConfigurationControlsUI.container.positionOffset_Y = 10;
            MenuConfigurationControlsUI.container.positionScale_Y  = 1f;
            MenuConfigurationControlsUI.container.sizeOffset_X     = -20;
            MenuConfigurationControlsUI.container.sizeOffset_Y     = -20;
            MenuConfigurationControlsUI.container.sizeScale_X      = 1f;
            MenuConfigurationControlsUI.container.sizeScale_Y      = 1f;
            if (Provider.isConnected)
            {
                PlayerUI.container.add(MenuConfigurationControlsUI.container);
            }
            else
            {
                MenuUI.container.add(MenuConfigurationControlsUI.container);
            }
            MenuConfigurationControlsUI.active      = false;
            MenuConfigurationControlsUI.binding     = byte.MaxValue;
            MenuConfigurationControlsUI.controlsBox = new SleekScrollBox();
            MenuConfigurationControlsUI.controlsBox.positionOffset_X = -200;
            MenuConfigurationControlsUI.controlsBox.positionOffset_Y = 100;
            MenuConfigurationControlsUI.controlsBox.positionScale_X  = 0.5f;
            MenuConfigurationControlsUI.controlsBox.sizeOffset_X     = 430;
            MenuConfigurationControlsUI.controlsBox.sizeOffset_Y     = -200;
            MenuConfigurationControlsUI.controlsBox.sizeScale_Y      = 1f;
            MenuConfigurationControlsUI.controlsBox.area             = new Rect(0f, 0f, 5f, (float)(380 + (ControlsSettings.bindings.Length + (MenuConfigurationControlsUI.layouts.Length - 1) * 2) * 40 - 10));
            MenuConfigurationControlsUI.container.add(MenuConfigurationControlsUI.controlsBox);
            MenuConfigurationControlsUI.sensitivityField = new SleekSingleField();
            MenuConfigurationControlsUI.sensitivityField.positionOffset_Y = 100;
            MenuConfigurationControlsUI.sensitivityField.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.sensitivityField.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.sensitivityField.addLabel(MenuConfigurationControlsUI.localization.format("Sensitivity_Field_Label"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField = MenuConfigurationControlsUI.sensitivityField;

            if (MenuConfigurationControlsUI.< > f__mg$cache0 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache0 = new TypedSingle(MenuConfigurationControlsUI.onTypedSensitivityField);
            }
            sleekSingleField.onTypedSingle = MenuConfigurationControlsUI.< > f__mg$cache0;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.sensitivityField);
            MenuConfigurationControlsUI.invertToggle = new SleekToggle();
            MenuConfigurationControlsUI.invertToggle.sizeOffset_X = 40;
            MenuConfigurationControlsUI.invertToggle.sizeOffset_Y = 40;
            MenuConfigurationControlsUI.invertToggle.addLabel(MenuConfigurationControlsUI.localization.format("Invert_Toggle_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = MenuConfigurationControlsUI.invertToggle;

            if (MenuConfigurationControlsUI.< > f__mg$cache1 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache1 = new Toggled(MenuConfigurationControlsUI.onToggledInvertToggle);
            }
            sleekToggle.onToggled = MenuConfigurationControlsUI.< > f__mg$cache1;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.invertToggle);
            MenuConfigurationControlsUI.invertFlightToggle = new SleekToggle();
            MenuConfigurationControlsUI.invertFlightToggle.positionOffset_Y = 50;
            MenuConfigurationControlsUI.invertFlightToggle.sizeOffset_X     = 40;
            MenuConfigurationControlsUI.invertFlightToggle.sizeOffset_Y     = 40;
            MenuConfigurationControlsUI.invertFlightToggle.addLabel(MenuConfigurationControlsUI.localization.format("Invert_Flight_Toggle_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = MenuConfigurationControlsUI.invertFlightToggle;

            if (MenuConfigurationControlsUI.< > f__mg$cache2 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache2 = new Toggled(MenuConfigurationControlsUI.onToggledInvertFlightToggle);
            }
            sleekToggle2.onToggled = MenuConfigurationControlsUI.< > f__mg$cache2;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.invertFlightToggle);
            MenuConfigurationControlsUI.aimingButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.aimingButton.positionOffset_Y = 140;
            MenuConfigurationControlsUI.aimingButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.aimingButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.aimingButton.addLabel(MenuConfigurationControlsUI.localization.format("Aiming_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState = MenuConfigurationControlsUI.aimingButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache3 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache3 = new SwappedState(MenuConfigurationControlsUI.onSwappedAimingState);
            }
            sleekButtonState.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache3;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.aimingButton);
            MenuConfigurationControlsUI.crouchingButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.crouchingButton.positionOffset_Y = 180;
            MenuConfigurationControlsUI.crouchingButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.crouchingButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.crouchingButton.addLabel(MenuConfigurationControlsUI.localization.format("Crouching_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState2 = MenuConfigurationControlsUI.crouchingButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache4 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache4 = new SwappedState(MenuConfigurationControlsUI.onSwappedCrouchingState);
            }
            sleekButtonState2.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache4;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.crouchingButton);
            MenuConfigurationControlsUI.proningButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.proningButton.positionOffset_Y = 220;
            MenuConfigurationControlsUI.proningButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.proningButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.proningButton.addLabel(MenuConfigurationControlsUI.localization.format("Proning_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState3 = MenuConfigurationControlsUI.proningButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache5 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache5 = new SwappedState(MenuConfigurationControlsUI.onSwappedProningState);
            }
            sleekButtonState3.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache5;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.proningButton);
            MenuConfigurationControlsUI.sprintingButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.sprintingButton.positionOffset_Y = 260;
            MenuConfigurationControlsUI.sprintingButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.sprintingButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.sprintingButton.addLabel(MenuConfigurationControlsUI.localization.format("Sprinting_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState4 = MenuConfigurationControlsUI.sprintingButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache6 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache6 = new SwappedState(MenuConfigurationControlsUI.onSwappedSprintingState);
            }
            sleekButtonState4.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache6;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.sprintingButton);
            MenuConfigurationControlsUI.leaningButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.leaningButton.positionOffset_Y = 300;
            MenuConfigurationControlsUI.leaningButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.leaningButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.leaningButton.addLabel(MenuConfigurationControlsUI.localization.format("Leaning_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState5 = MenuConfigurationControlsUI.leaningButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache7 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache7 = new SwappedState(MenuConfigurationControlsUI.onSwappedLeaningState);
            }
            sleekButtonState5.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache7;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.leaningButton);
            MenuConfigurationControlsUI.buttons = new SleekButton[ControlsSettings.bindings.Length];
            byte b  = 0;
            byte b2 = 0;

            while ((int)b2 < MenuConfigurationControlsUI.layouts.Length)
            {
                SleekBox sleekBox = new SleekBox();
                sleekBox.positionOffset_Y = 340 + (int)((b + b2 * 2) * 40);
                sleekBox.sizeOffset_X     = -30;
                sleekBox.sizeOffset_Y     = 30;
                sleekBox.sizeScale_X      = 1f;
                sleekBox.text             = MenuConfigurationControlsUI.localization.format("Layout_" + b2);
                MenuConfigurationControlsUI.controlsBox.add(sleekBox);
                byte b3 = 0;
                while ((int)b3 < MenuConfigurationControlsUI.layouts[(int)b2].Length)
                {
                    SleekButton sleekButton = new SleekButton();
                    sleekButton.positionOffset_Y = (int)((b3 + 1) * 40);
                    sleekButton.sizeOffset_Y     = 30;
                    sleekButton.sizeScale_X      = 1f;
                    SleekButton sleekButton2 = sleekButton;
                    if (MenuConfigurationControlsUI.< > f__mg$cache8 == null)
                    {
                        MenuConfigurationControlsUI.< > f__mg$cache8 = new ClickedButton(MenuConfigurationControlsUI.onClickedKeyButton);
                    }
                    sleekButton2.onClickedButton = MenuConfigurationControlsUI.< > f__mg$cache8;
                    sleekBox.add(sleekButton);
                    MenuConfigurationControlsUI.buttons[(int)MenuConfigurationControlsUI.layouts[(int)b2][(int)b3]] = sleekButton;
                    b  += 1;
                    b3 += 1;
                }
                b2 += 1;
            }
            MenuConfigurationControlsUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuConfigurationControlsUI.backButton.positionOffset_Y = -50;
            MenuConfigurationControlsUI.backButton.positionScale_Y  = 1f;
            MenuConfigurationControlsUI.backButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.backButton.sizeOffset_Y     = 50;
            MenuConfigurationControlsUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuConfigurationControlsUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton3 = MenuConfigurationControlsUI.backButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache9 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache9 = new ClickedButton(MenuConfigurationControlsUI.onClickedBackButton);
            }
            sleekButton3.onClickedButton = MenuConfigurationControlsUI.< > f__mg$cache9;
            MenuConfigurationControlsUI.backButton.fontSize = 14;
            MenuConfigurationControlsUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationControlsUI.container.add(MenuConfigurationControlsUI.backButton);
            MenuConfigurationControlsUI.defaultButton = new SleekButton();
            MenuConfigurationControlsUI.defaultButton.positionOffset_X = -200;
            MenuConfigurationControlsUI.defaultButton.positionOffset_Y = -50;
            MenuConfigurationControlsUI.defaultButton.positionScale_X  = 1f;
            MenuConfigurationControlsUI.defaultButton.positionScale_Y  = 1f;
            MenuConfigurationControlsUI.defaultButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.defaultButton.sizeOffset_Y     = 50;
            MenuConfigurationControlsUI.defaultButton.text             = MenuPlayConfigUI.localization.format("Default");
            MenuConfigurationControlsUI.defaultButton.tooltip          = MenuPlayConfigUI.localization.format("Default_Tooltip");
            SleekButton sleekButton4 = MenuConfigurationControlsUI.defaultButton;

            if (MenuConfigurationControlsUI.< > f__mg$cacheA == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cacheA = new ClickedButton(MenuConfigurationControlsUI.onClickedDefaultButton);
            }
            sleekButton4.onClickedButton = MenuConfigurationControlsUI.< > f__mg$cacheA;
            MenuConfigurationControlsUI.defaultButton.fontSize = 14;
            MenuConfigurationControlsUI.container.add(MenuConfigurationControlsUI.defaultButton);
            MenuConfigurationControlsUI.updateAll();
        }
Ejemplo n.º 19
0
 // Token: 0x060035E4 RID: 13796 RVA: 0x0016BA8C File Offset: 0x00169E8C
 public static void bind(KeyCode key)
 {
     ControlsSettings.bind(MenuConfigurationControlsUI.binding, key);
     MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.binding);
     MenuConfigurationControlsUI.cancel();
 }