public override Sleek createUI(Player player) { string text = this.formatReward(player); if (string.IsNullOrEmpty(text)) { return(null); } ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, this.id); if (itemAsset == null) { return(null); } SleekBox sleekBox = new SleekBox(); if (itemAsset.size_y == 1) { sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 50 + 10); } else { sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 25 + 10); } sleekBox.sizeScale_X = 1f; SleekImageTexture sleekImageTexture = new SleekImageTexture(); sleekImageTexture.positionOffset_X = 5; sleekImageTexture.positionOffset_Y = 5; if (itemAsset.size_y == 1) { sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 50); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 50); } else { sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 25); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 25); } sleekBox.add(sleekImageTexture); ItemTool.getIcon(this.id, 100, itemAsset.getState(false), itemAsset, sleekImageTexture.sizeOffset_X, sleekImageTexture.sizeOffset_Y, new ItemIconReady(sleekImageTexture.updateTexture)); sleekBox.add(new SleekLabel { positionOffset_X = 10 + sleekImageTexture.sizeOffset_X, sizeOffset_X = -15 - sleekImageTexture.sizeOffset_X, sizeScale_X = 1f, sizeScale_Y = 1f, fontAlignment = 3, foregroundTint = ESleekTint.NONE, isRich = true, text = text }); return(sleekBox); }
// Token: 0x06001C37 RID: 7223 RVA: 0x000997E8 File Offset: 0x00097BE8 public override Sleek createUI(Player player) { string text = this.formatReward(player); if (string.IsNullOrEmpty(text)) { return(null); } if (!(Assets.find(EAssetType.VEHICLE, this.id) is VehicleAsset)) { return(null); } SleekBox sleekBox = new SleekBox(); sleekBox.sizeOffset_Y = 30; sleekBox.sizeScale_X = 1f; sleekBox.add(new SleekLabel { positionOffset_X = 5, sizeOffset_X = -10, sizeScale_X = 1f, sizeScale_Y = 1f, fontAlignment = TextAnchor.MiddleLeft, foregroundTint = ESleekTint.NONE, isRich = true, text = text }); return(sleekBox); }
public virtual Sleek createUI(Player player) { string value = this.formatReward(player); if (string.IsNullOrEmpty(value)) { return(null); } SleekBox sleekBox = new SleekBox(); sleekBox.sizeOffset_Y = 30; sleekBox.sizeScale_X = 1f; sleekBox.add(new SleekLabel { positionOffset_X = 5, sizeOffset_X = -10, sizeScale_X = 1f, sizeScale_Y = 1f, fontAlignment = 3, foregroundTint = ESleekTint.NONE, isRich = true, text = value }); return(sleekBox); }
public virtual Sleek createUI(Player player, Texture2D icon) { string value = this.formatCondition(player); if (string.IsNullOrEmpty(value)) { return(null); } SleekBox sleekBox = new SleekBox(); sleekBox.sizeOffset_Y = 30; sleekBox.sizeScale_X = 1f; if (icon != null) { sleekBox.add(new SleekImageTexture(icon) { positionOffset_X = 5, positionOffset_Y = 5, sizeOffset_X = 20, sizeOffset_Y = 20 }); } SleekLabel sleekLabel = new SleekLabel(); if (icon != null) { sleekLabel.positionOffset_X = 30; sleekLabel.sizeOffset_X = -35; } else { sleekLabel.positionOffset_X = 5; sleekLabel.sizeOffset_X = -10; } sleekLabel.sizeScale_X = 1f; sleekLabel.sizeScale_Y = 1f; sleekLabel.fontAlignment = 3; sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.isRich = true; sleekLabel.text = value; sleekBox.add(sleekLabel); return(sleekBox); }
public override Sleek createUI(Player player, Texture2D icon) { string text = this.formatCondition(player); if (string.IsNullOrEmpty(text)) { return(null); } ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, this.id); if (itemAsset == null) { return(null); } SleekBox sleekBox = new SleekBox(); if (itemAsset.size_y == 1) { sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 50 + 10); } else { sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 25 + 10); } sleekBox.sizeScale_X = 1f; if (icon != null) { sleekBox.add(new SleekImageTexture(icon) { positionOffset_X = 5, positionOffset_Y = -10, positionScale_Y = 0.5f, sizeOffset_X = 20, sizeOffset_Y = 20 }); } SleekImageTexture sleekImageTexture = new SleekImageTexture(); if (icon != null) { sleekImageTexture.positionOffset_X = 30; } else { sleekImageTexture.positionOffset_X = 5; } sleekImageTexture.positionOffset_Y = 5; if (itemAsset.size_y == 1) { sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 50); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 50); } else { sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 25); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 25); } sleekBox.add(sleekImageTexture); ItemTool.getIcon(this.id, 100, itemAsset.getState(false), itemAsset, sleekImageTexture.sizeOffset_X, sleekImageTexture.sizeOffset_Y, new ItemIconReady(sleekImageTexture.updateTexture)); SleekLabel sleekLabel = new SleekLabel(); if (icon != null) { sleekLabel.positionOffset_X = 35 + sleekImageTexture.sizeOffset_X; sleekLabel.sizeOffset_X = -40 - sleekImageTexture.sizeOffset_X; } else { sleekLabel.positionOffset_X = 10 + sleekImageTexture.sizeOffset_X; sleekLabel.sizeOffset_X = -15 - sleekImageTexture.sizeOffset_X; } sleekLabel.sizeScale_X = 1f; sleekLabel.sizeScale_Y = 1f; sleekLabel.fontAlignment = 3; sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.isRich = true; sleekLabel.text = text; sleekBox.add(sleekLabel); return(sleekBox); }
private static void refreshConfig() { MenuPlayConfigUI.configBox.remove(); MenuPlayConfigUI.configOffset = 0; MenuPlayConfigUI.configGroups.Clear(); Type type = MenuPlayConfigUI.modeConfigData.GetType(); foreach (FieldInfo fieldInfo in type.GetFields()) { SleekBox sleekBox = new SleekBox(); sleekBox.positionOffset_Y = MenuPlayConfigUI.configOffset; sleekBox.sizeOffset_X = -30; sleekBox.sizeOffset_Y = 30; sleekBox.sizeScale_X = 1f; sleekBox.text = MenuPlayConfigUI.localization.format(fieldInfo.Name); MenuPlayConfigUI.configBox.add(sleekBox); int num = 40; MenuPlayConfigUI.configOffset += 40; object value = fieldInfo.GetValue(MenuPlayConfigUI.modeConfigData); Type type2 = value.GetType(); foreach (FieldInfo fieldInfo2 in type2.GetFields()) { object value2 = fieldInfo2.GetValue(value); Type type3 = value2.GetType(); if (type3 == typeof(uint)) { SleekUInt32Field sleekUInt32Field = new SleekUInt32Field(); sleekUInt32Field.positionOffset_Y = num; sleekUInt32Field.sizeOffset_X = 200; sleekUInt32Field.sizeOffset_Y = 30; sleekUInt32Field.state = (uint)value2; sleekUInt32Field.addLabel(MenuPlayConfigUI.localization.format(fieldInfo2.Name), ESleekSide.RIGHT); SleekUInt32Field sleekUInt32Field2 = sleekUInt32Field; Delegate onTypedUInt = sleekUInt32Field2.onTypedUInt32; if (MenuPlayConfigUI.< > f__mg$cache0 == null) { MenuPlayConfigUI.< > f__mg$cache0 = new TypedUInt32(MenuPlayConfigUI.onTypedUInt32); } sleekUInt32Field2.onTypedUInt32 = (TypedUInt32)Delegate.Combine(onTypedUInt, MenuPlayConfigUI.< > f__mg$cache0); sleekBox.add(sleekUInt32Field); num += 40; MenuPlayConfigUI.configOffset += 40; } else if (type3 == typeof(float)) { SleekSingleField sleekSingleField = new SleekSingleField(); sleekSingleField.positionOffset_Y = num; sleekSingleField.sizeOffset_X = 200; sleekSingleField.sizeOffset_Y = 30; sleekSingleField.state = (float)value2; sleekSingleField.addLabel(MenuPlayConfigUI.localization.format(fieldInfo2.Name), ESleekSide.RIGHT); SleekSingleField sleekSingleField2 = sleekSingleField; Delegate onTypedSingle = sleekSingleField2.onTypedSingle; if (MenuPlayConfigUI.< > f__mg$cache1 == null) { MenuPlayConfigUI.< > f__mg$cache1 = new TypedSingle(MenuPlayConfigUI.onTypedSingle); } sleekSingleField2.onTypedSingle = (TypedSingle)Delegate.Combine(onTypedSingle, MenuPlayConfigUI.< > f__mg$cache1); sleekBox.add(sleekSingleField); num += 40; MenuPlayConfigUI.configOffset += 40; } else if (type3 == typeof(bool)) { SleekToggle sleekToggle = new SleekToggle(); sleekToggle.positionOffset_Y = num; sleekToggle.sizeOffset_X = 40; sleekToggle.sizeOffset_Y = 40; sleekToggle.state = (bool)value2; sleekToggle.addLabel(MenuPlayConfigUI.localization.format(fieldInfo2.Name), ESleekSide.RIGHT); SleekToggle sleekToggle2 = sleekToggle; Delegate onToggled = sleekToggle2.onToggled; if (MenuPlayConfigUI.< > f__mg$cache2 == null) { MenuPlayConfigUI.< > f__mg$cache2 = new Toggled(MenuPlayConfigUI.onToggled); } sleekToggle2.onToggled = (Toggled)Delegate.Combine(onToggled, MenuPlayConfigUI.< > f__mg$cache2); sleekBox.add(sleekToggle); num += 50; MenuPlayConfigUI.configOffset += 50; } } MenuPlayConfigUI.configOffset += 40; MenuPlayConfigUI.configGroups.Add(value); } MenuPlayConfigUI.configBox.area = new Rect(0f, 0f, 5f, (float)(MenuPlayConfigUI.configOffset - 50)); }
// Token: 0x06003794 RID: 14228 RVA: 0x001864F4 File Offset: 0x001848F4 public MenuWorkshopModulesUI() { MenuWorkshopModulesUI.localization = Localization.read("/Menu/Workshop/MenuWorkshopModules.dat"); MenuWorkshopModulesUI.container = new Sleek(); MenuWorkshopModulesUI.container.positionOffset_X = 10; MenuWorkshopModulesUI.container.positionOffset_Y = 10; MenuWorkshopModulesUI.container.positionScale_Y = 1f; MenuWorkshopModulesUI.container.sizeOffset_X = -20; MenuWorkshopModulesUI.container.sizeOffset_Y = -20; MenuWorkshopModulesUI.container.sizeScale_X = 1f; MenuWorkshopModulesUI.container.sizeScale_Y = 1f; MenuUI.container.add(MenuWorkshopModulesUI.container); MenuWorkshopModulesUI.active = false; MenuWorkshopModulesUI.headerBox = new SleekBox(); MenuWorkshopModulesUI.headerBox.sizeOffset_Y = 50; MenuWorkshopModulesUI.headerBox.sizeScale_X = 1f; MenuWorkshopModulesUI.headerBox.fontSize = 14; MenuWorkshopModulesUI.headerBox.text = MenuWorkshopModulesUI.localization.format("Header"); MenuWorkshopModulesUI.container.add(MenuWorkshopModulesUI.headerBox); MenuWorkshopModulesUI.moduleBox = new SleekScrollBox(); MenuWorkshopModulesUI.moduleBox.positionOffset_Y = 60; MenuWorkshopModulesUI.moduleBox.sizeOffset_Y = -120; MenuWorkshopModulesUI.moduleBox.sizeScale_X = 1f; MenuWorkshopModulesUI.moduleBox.sizeScale_Y = 1f; MenuWorkshopModulesUI.moduleBox.area = new Rect(0f, 0f, 5f, 0f); MenuWorkshopModulesUI.container.add(MenuWorkshopModulesUI.moduleBox); if (ModuleHook.modules.Count == 0) { SleekBox sleekBox = new SleekBox(); sleekBox.positionOffset_Y = 60; sleekBox.sizeOffset_X = -30; sleekBox.sizeOffset_Y = 50; sleekBox.sizeScale_X = 1f; sleekBox.fontSize = 14; sleekBox.text = MenuWorkshopModulesUI.localization.format("No_Modules"); MenuWorkshopModulesUI.container.add(sleekBox); } else { for (int i = 0; i < ModuleHook.modules.Count; i++) { ModuleConfig config = ModuleHook.modules[i].config; Local local = Localization.tryRead(config.DirectoryPath, false); SleekBox sleekBox2 = new SleekBox(); sleekBox2.positionOffset_Y = i * 130; sleekBox2.sizeOffset_X = -30; sleekBox2.sizeOffset_Y = 120; sleekBox2.sizeScale_X = 1f; SleekToggle sleekToggle = new SleekToggle(); sleekToggle.positionOffset_X = 5; sleekToggle.positionOffset_Y = -20; sleekToggle.positionScale_Y = 0.5f; sleekToggle.sizeOffset_X = 40; sleekToggle.sizeOffset_Y = 40; sleekToggle.state = config.IsEnabled; SleekToggle sleekToggle2 = sleekToggle; if (MenuWorkshopModulesUI.< > f__mg$cache0 == null) { MenuWorkshopModulesUI.< > f__mg$cache0 = new Toggled(MenuWorkshopModulesUI.onToggledModuleToggle); } sleekToggle2.onToggled = MenuWorkshopModulesUI.< > f__mg$cache0; sleekBox2.add(sleekToggle); SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = 50; sleekLabel.positionOffset_Y = 5; sleekLabel.sizeOffset_X = -55; sleekLabel.sizeOffset_Y = 30; sleekLabel.sizeScale_X = 1f; sleekLabel.fontSize = 14; sleekLabel.fontAlignment = TextAnchor.UpperLeft; sleekLabel.text = local.format("Name"); sleekBox2.add(sleekLabel); SleekLabel sleekLabel2 = new SleekLabel(); sleekLabel2.positionOffset_X = 50; sleekLabel2.positionOffset_Y = 30; sleekLabel2.sizeOffset_X = -55; sleekLabel2.sizeOffset_Y = 25; sleekLabel2.sizeScale_X = 1f; sleekLabel2.fontAlignment = TextAnchor.UpperLeft; sleekLabel2.text = MenuWorkshopModulesUI.localization.format("Version", new object[] { config.Version }); sleekBox2.add(sleekLabel2); SleekLabel sleekLabel3 = new SleekLabel(); sleekLabel3.positionOffset_X = 50; sleekLabel3.positionOffset_Y = 50; sleekLabel3.sizeOffset_X = -55; sleekLabel3.sizeOffset_Y = 65; sleekLabel3.sizeScale_X = 1f; sleekLabel3.fontSize = 12; sleekLabel3.fontAlignment = TextAnchor.UpperLeft; sleekLabel3.text = local.format("Description"); sleekBox2.add(sleekLabel3); if (ReadWrite.fileExists(config.DirectoryPath + "/Icon.png", false, false)) { byte[] data = ReadWrite.readBytes(config.DirectoryPath + "/Icon.png", false, false); Texture2D texture2D = new Texture2D(100, 100, TextureFormat.ARGB32, false, true); texture2D.name = "Module_" + config.Name + "_Icon"; texture2D.hideFlags = HideFlags.HideAndDontSave; texture2D.LoadImage(data); sleekBox2.add(new SleekImageTexture { positionOffset_X = 50, positionOffset_Y = 10, sizeOffset_X = 100, sizeOffset_Y = 100, texture = texture2D, shouldDestroyTexture = true }); sleekLabel.positionOffset_X += 105; sleekLabel.sizeOffset_X -= 105; sleekLabel2.positionOffset_X += 105; sleekLabel2.sizeOffset_X -= 105; sleekLabel3.positionOffset_X += 105; sleekLabel3.sizeOffset_X -= 105; } MenuWorkshopModulesUI.moduleBox.add(sleekBox2); } MenuWorkshopModulesUI.moduleBox.area = new Rect(0f, 0f, 5f, (float)(ModuleHook.modules.Count * 130 - 10)); } MenuWorkshopModulesUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit")); MenuWorkshopModulesUI.backButton.positionOffset_Y = -50; MenuWorkshopModulesUI.backButton.positionScale_Y = 1f; MenuWorkshopModulesUI.backButton.sizeOffset_X = 200; MenuWorkshopModulesUI.backButton.sizeOffset_Y = 50; MenuWorkshopModulesUI.backButton.text = MenuDashboardUI.localization.format("BackButtonText"); MenuWorkshopModulesUI.backButton.tooltip = MenuDashboardUI.localization.format("BackButtonTooltip"); SleekButton sleekButton = MenuWorkshopModulesUI.backButton; if (MenuWorkshopModulesUI.< > f__mg$cache1 == null) { MenuWorkshopModulesUI.< > f__mg$cache1 = new ClickedButton(MenuWorkshopModulesUI.onClickedBackButton); } sleekButton.onClickedButton = MenuWorkshopModulesUI.< > f__mg$cache1; MenuWorkshopModulesUI.backButton.fontSize = 14; MenuWorkshopModulesUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; MenuWorkshopModulesUI.container.add(MenuWorkshopModulesUI.backButton); }
// 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(); }