// Token: 0x06003517 RID: 13591 RVA: 0x0015FC74 File Offset: 0x0015E074 public static void update() { for (int i = 0; i < (int)EditorLevelVisibilityUI.DEBUG_SIZE; i++) { for (int j = 0; j < (int)EditorLevelVisibilityUI.DEBUG_SIZE; j++) { int num = i * (int)EditorLevelVisibilityUI.DEBUG_SIZE + j; int x = (int)(Editor.editor.area.region_x - EditorLevelVisibilityUI.DEBUG_SIZE / 2) + i; int y = (int)(Editor.editor.area.region_y - EditorLevelVisibilityUI.DEBUG_SIZE / 2) + j; SleekLabel sleekLabel = EditorLevelVisibilityUI.regionLabels[num]; Vector3 a; if (Regions.tryGetPoint(x, y, out a)) { a = MainCamera.instance.WorldToScreenPoint(a + new Vector3((float)(Regions.REGION_SIZE / 2), 0f, (float)(Regions.REGION_SIZE / 2))); if (a.z > 0f) { sleekLabel.positionOffset_X = (int)(a.x - 100f); sleekLabel.positionOffset_Y = (int)((float)Screen.height - a.y - 25f); sleekLabel.isVisible = true; } else { sleekLabel.isVisible = false; } } else { sleekLabel.isVisible = false; } } } }
// Token: 0x0600350B RID: 13579 RVA: 0x0015F7E8 File Offset: 0x0015DBE8 public static void close() { if (!EditorLevelVisibilityUI.active) { return; } EditorLevelVisibilityUI.active = false; for (int i = 0; i < EditorLevelVisibilityUI.regionLabels.Length; i++) { SleekLabel sleekLabel = EditorLevelVisibilityUI.regionLabels[i]; sleekLabel.isVisible = false; } EditorLevelVisibilityUI.container.lerpPositionScale(1f, 0f, ESleekLerp.EXPONENTIAL, 20f); }
private static void addGroup(SteamPlayer player) { SleekLabel sleekLabel = new SleekLabel(); sleekLabel.sizeOffset_X = 200; sleekLabel.sizeOffset_Y = 30; if (string.IsNullOrEmpty(player.playerID.nickName)) { sleekLabel.text = player.playerID.characterName; } else { sleekLabel.text = player.playerID.nickName; } PlayerGroupUI.container.add(sleekLabel); sleekLabel.isVisible = false; PlayerGroupUI.groups.Add(sleekLabel); }
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 SleekVendor(VendorElement newElement) { this.element = newElement; base.init(); this.fontStyle = 1; this.fontAlignment = 4; this.fontSize = SleekRender.FONT_SIZE; this.calculateContent(); ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, this.element.id); if (itemAsset == null) { return; } SleekImageTexture sleekImageTexture = new SleekImageTexture(); sleekImageTexture.positionOffset_X = 5; sleekImageTexture.positionOffset_Y = 5; if (itemAsset.size_y == 1) { sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 100); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 100); } else { sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 50); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 50); } base.add(sleekImageTexture); ItemTool.getIcon(this.element.id, 100, itemAsset.getState(false), itemAsset, sleekImageTexture.sizeOffset_X, sleekImageTexture.sizeOffset_Y, new ItemIconReady(sleekImageTexture.updateTexture)); base.sizeOffset_Y = sleekImageTexture.sizeOffset_Y + 10; base.add(new SleekLabel { positionOffset_X = sleekImageTexture.sizeOffset_X + 10, positionOffset_Y = 5, sizeOffset_X = -sleekImageTexture.sizeOffset_X - 15, sizeOffset_Y = 30, sizeScale_X = 1f, text = itemAsset.itemName, fontSize = 14, fontAlignment = 0, foregroundTint = ESleekTint.NONE, foregroundColor = ItemTool.getRarityColorUI(itemAsset.rarity) }); base.add(new SleekLabel { positionOffset_X = sleekImageTexture.sizeOffset_X + 10, positionOffset_Y = 25, sizeOffset_X = -sleekImageTexture.sizeOffset_X - 15, sizeOffset_Y = -30, sizeScale_X = 1f, sizeScale_Y = 1f, fontAlignment = 0, foregroundTint = ESleekTint.NONE, isRich = true, text = itemAsset.itemDescription }); SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = sleekImageTexture.sizeOffset_X + 10; sleekLabel.positionOffset_Y = -35; sleekLabel.positionScale_Y = 1f; sleekLabel.sizeOffset_X = -sleekImageTexture.sizeOffset_X - 15; sleekLabel.sizeOffset_Y = 30; sleekLabel.sizeScale_X = 1f; sleekLabel.fontAlignment = 8; sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.foregroundColor = Palette.COLOR_Y; base.add(sleekLabel); if (this.element is VendorBuying) { sleekLabel.text = PlayerNPCVendorUI.localization.format("Price", new object[] { this.element.cost }); } else { sleekLabel.text = PlayerNPCVendorUI.localization.format("Cost", new object[] { this.element.cost }); } this.amountLabel = new SleekLabel(); this.amountLabel.positionOffset_X = sleekImageTexture.sizeOffset_X + 10; this.amountLabel.positionOffset_Y = -35; this.amountLabel.positionScale_Y = 1f; this.amountLabel.sizeOffset_X = -sleekImageTexture.sizeOffset_X - 15; this.amountLabel.sizeOffset_Y = 30; this.amountLabel.sizeScale_X = 1f; this.amountLabel.fontAlignment = 6; this.amountLabel.foregroundTint = ESleekTint.NONE; base.add(this.amountLabel); this.updateAmount(); }
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); }
public void updateInventory(ulong instance, int item, ushort quantity, bool isClickable, bool isLarge) { this.button.isClickable = isClickable; if (isLarge) { this.icon.sizeOffset_Y = -70; this.nameLabel.fontSize = 18; this.nameLabel.positionOffset_Y = -70; this.nameLabel.sizeOffset_Y = 70; this.equippedIcon.sizeOffset_X = 20; this.equippedIcon.sizeOffset_Y = 20; } else { this.icon.sizeOffset_Y = -50; this.nameLabel.fontSize = 12; this.nameLabel.positionOffset_Y = -50; this.nameLabel.sizeOffset_Y = 50; this.equippedIcon.sizeOffset_X = 10; this.equippedIcon.sizeOffset_Y = 10; } if (item != 0) { if (item < 0) { this._itemAsset = null; this.icon.texture = (Texture2D)Resources.Load("Economy/Mystery" + ((!isLarge) ? "/Icon_Small" : "/Icon_Large")); this.icon.isVisible = true; this.nameLabel.text = MenuSurvivorsClothingUI.localization.format("Mystery_" + item + "_Text"); this.button.tooltip = MenuSurvivorsClothingUI.localization.format("Mystery_Tooltip"); this.button.backgroundColor = Palette.MYTHICAL; this.equippedIcon.isVisible = false; } else { ushort inventoryItemID = Provider.provider.economyService.getInventoryItemID(item); if (inventoryItemID != 0) { this._itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, inventoryItemID); if (this.itemAsset != null) { if (this.itemAsset.proPath == null || this.itemAsset.proPath.Length == 0) { ushort inventorySkinID = Provider.provider.economyService.getInventorySkinID(item); SkinAsset skinAsset = (SkinAsset)Assets.find(EAssetType.SKIN, inventorySkinID); if (skinAsset != null) { this.icon.texture = (Texture2D)Resources.Load(string.Concat(new string[] { "Economy/Skins/", this.itemAsset.name, "/", skinAsset.name, (!isLarge) ? "/Icon_Small" : "/Icon_Large" })); this.icon.isVisible = true; } else { this.icon.isVisible = false; } } else { this.icon.texture = (Texture2D)Resources.Load("Economy" + this.itemAsset.proPath + ((!isLarge) ? "/Icon_Small" : "/Icon_Large")); this.icon.isVisible = true; } } else { this.icon.texture = null; this.icon.isVisible = true; } this.nameLabel.text = Provider.provider.economyService.getInventoryName(item); if (quantity > 1) { SleekLabel sleekLabel = this.nameLabel; sleekLabel.text = sleekLabel.text + " x" + quantity; } this.button.tooltip = Provider.provider.economyService.getInventoryType(item); this.button.backgroundColor = Provider.provider.economyService.getInventoryColor(item); bool flag; if (this.itemAsset.proPath == null || this.itemAsset.proPath.Length == 0) { flag = Characters.isSkinEquipped(instance); } else { flag = Characters.isCosmeticEquipped(instance); } this.equippedIcon.isVisible = flag; if (flag && this.equippedIcon.texture == null) { this.equippedIcon.texture = (Texture2D)MenuSurvivorsClothingUI.icons.load("Equip"); } } else { this._itemAsset = null; this.icon.texture = null; this.icon.isVisible = true; this.nameLabel.text = "itemdefid: " + item; this.button.tooltip = "itemdefid: " + item; this.button.backgroundColor = Color.white; this.equippedIcon.isVisible = false; } } this.nameLabel.isVisible = true; } else { this._itemAsset = null; this.button.tooltip = string.Empty; this.button.backgroundColor = Color.white; this.icon.isVisible = false; this.nameLabel.isVisible = false; this.equippedIcon.isVisible = false; } this.button.foregroundColor = this.button.backgroundColor; this.nameLabel.foregroundColor = this.button.backgroundColor; this.nameLabel.backgroundColor = this.button.backgroundColor; }
public SleekBlueprint(Blueprint newBlueprint) { this._blueprint = newBlueprint; base.init(); this.fontStyle = 1; this.fontAlignment = 4; this.fontSize = SleekRender.FONT_SIZE; this.calculateContent(); SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = 5; sleekLabel.positionOffset_Y = 5; sleekLabel.sizeOffset_X = -10; sleekLabel.sizeOffset_Y = 30; sleekLabel.sizeScale_X = 1f; sleekLabel.foregroundColor = ((!this.blueprint.hasSupplies || !this.blueprint.hasTool || !this.blueprint.hasItem || !this.blueprint.hasSkills) ? Palette.COLOR_R : Palette.COLOR_G); sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.fontSize = 14; base.add(sleekLabel); if (this.blueprint.skill != EBlueprintSkill.NONE) { base.add(new SleekLabel { positionOffset_X = 5, positionOffset_Y = -35, positionScale_Y = 1f, sizeOffset_X = -10, sizeOffset_Y = 30, sizeScale_X = 1f, text = PlayerDashboardCraftingUI.localization.format("Skill_" + (int)this.blueprint.skill, new object[] { PlayerDashboardSkillsUI.localization.format("Level_" + this.blueprint.level) }), foregroundColor = ((!this.blueprint.hasSkills) ? Palette.COLOR_R : Palette.COLOR_G), foregroundTint = ESleekTint.NONE, fontSize = 14 }); } Sleek sleek = new Sleek(); sleek.positionOffset_Y = 40; sleek.positionScale_X = 0.5f; sleek.sizeOffset_Y = -45; sleek.sizeScale_Y = 1f; base.add(sleek); int num = 0; for (int i = 0; i < this.blueprint.supplies.Length; i++) { BlueprintSupply blueprintSupply = this.blueprint.supplies[i]; ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, blueprintSupply.id); if (itemAsset != null) { SleekLabel sleekLabel2 = sleekLabel; sleekLabel2.text += itemAsset.itemName; SleekImageTexture sleekImageTexture = new SleekImageTexture(); sleekImageTexture.positionOffset_X = num; sleekImageTexture.positionOffset_Y = (int)(-itemAsset.size_y * 25); sleekImageTexture.positionScale_Y = 0.5f; sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 50); sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 50); sleek.add(sleekImageTexture); ItemTool.getIcon(blueprintSupply.id, 100, itemAsset.getState(false), itemAsset, new ItemIconReady(sleekImageTexture.updateTexture)); SleekLabel sleekLabel3 = new SleekLabel(); sleekLabel3.positionOffset_X = -100; sleekLabel3.positionOffset_Y = -30; sleekLabel3.positionScale_Y = 1f; sleekLabel3.sizeOffset_X = 100; sleekLabel3.sizeOffset_Y = 30; sleekLabel3.sizeScale_X = 1f; sleekLabel3.foregroundTint = ESleekTint.NONE; sleekLabel3.fontAlignment = 5; sleekLabel3.text = blueprintSupply.hasAmount + "/" + blueprintSupply.amount; sleekImageTexture.add(sleekLabel3); SleekLabel sleekLabel4 = sleekLabel; string text = sleekLabel4.text; sleekLabel4.text = string.Concat(new object[] { text, " ", blueprintSupply.hasAmount, "/", blueprintSupply.amount }); if (this.blueprint.type == EBlueprintType.AMMO) { if (blueprintSupply.hasAmount == 0 || blueprintSupply.amount == 0) { sleekLabel3.backgroundColor = Palette.COLOR_R; sleekLabel3.foregroundColor = Palette.COLOR_R; } } else if (blueprintSupply.hasAmount < blueprintSupply.amount) { sleekLabel3.backgroundColor = Palette.COLOR_R; sleekLabel3.foregroundColor = Palette.COLOR_R; } num += (int)(itemAsset.size_x * 50 + 25); if (i < this.blueprint.supplies.Length - 1 || this.blueprint.tool != 0 || this.blueprint.type == EBlueprintType.REPAIR || this.blueprint.type == EBlueprintType.AMMO) { SleekLabel sleekLabel5 = sleekLabel; sleekLabel5.text += " + "; sleek.add(new SleekImageTexture((Texture2D)PlayerDashboardCraftingUI.icons.load("Plus")) { positionOffset_X = num, positionOffset_Y = -20, positionScale_Y = 0.5f, sizeOffset_X = 40, sizeOffset_Y = 40, backgroundTint = ESleekTint.FOREGROUND }); num += 65; } } } if (this.blueprint.tool != 0) { ItemAsset itemAsset2 = (ItemAsset)Assets.find(EAssetType.ITEM, this.blueprint.tool); if (itemAsset2 != null) { SleekLabel sleekLabel6 = sleekLabel; sleekLabel6.text += itemAsset2.itemName; SleekImageTexture sleekImageTexture2 = new SleekImageTexture(); sleekImageTexture2.positionOffset_X = num; sleekImageTexture2.positionOffset_Y = (int)(-itemAsset2.size_y * 25); sleekImageTexture2.positionScale_Y = 0.5f; sleekImageTexture2.sizeOffset_X = (int)(itemAsset2.size_x * 50); sleekImageTexture2.sizeOffset_Y = (int)(itemAsset2.size_y * 50); sleek.add(sleekImageTexture2); ItemTool.getIcon(this.blueprint.tool, 100, itemAsset2.getState(), itemAsset2, new ItemIconReady(sleekImageTexture2.updateTexture)); SleekLabel sleekLabel7 = new SleekLabel(); sleekLabel7.positionOffset_X = -100; sleekLabel7.positionOffset_Y = -30; sleekLabel7.positionScale_Y = 1f; sleekLabel7.sizeOffset_X = 100; sleekLabel7.sizeOffset_Y = 30; sleekLabel7.sizeScale_X = 1f; sleekLabel7.foregroundTint = ESleekTint.NONE; sleekLabel7.fontAlignment = 5; sleekLabel7.text = this.blueprint.tools + "/1"; sleekImageTexture2.add(sleekLabel7); SleekLabel sleekLabel8 = sleekLabel; string text = sleekLabel8.text; sleekLabel8.text = string.Concat(new object[] { text, " ", this.blueprint.tools, "/1" }); if (!this.blueprint.hasTool) { sleekLabel7.backgroundColor = Palette.COLOR_R; sleekLabel7.foregroundColor = Palette.COLOR_R; } num += (int)(itemAsset2.size_x * 50 + 25); if (this.blueprint.type == EBlueprintType.REPAIR || this.blueprint.type == EBlueprintType.AMMO) { SleekLabel sleekLabel9 = sleekLabel; sleekLabel9.text += " + "; sleek.add(new SleekImageTexture((Texture2D)PlayerDashboardCraftingUI.icons.load("Plus")) { positionOffset_X = num, positionOffset_Y = -20, positionScale_Y = 0.5f, sizeOffset_X = 40, sizeOffset_Y = 40, backgroundTint = ESleekTint.FOREGROUND }); num += 65; } } } if (this.blueprint.type == EBlueprintType.REPAIR || this.blueprint.type == EBlueprintType.AMMO) { ItemAsset itemAsset3 = (ItemAsset)Assets.find(EAssetType.ITEM, this.blueprint.outputs[0].id); if (itemAsset3 != null) { SleekLabel sleekLabel10 = sleekLabel; sleekLabel10.text += itemAsset3.itemName; SleekImageTexture sleekImageTexture3 = new SleekImageTexture(); sleekImageTexture3.positionOffset_X = num; sleekImageTexture3.positionOffset_Y = (int)(-itemAsset3.size_y * 25); sleekImageTexture3.positionScale_Y = 0.5f; sleekImageTexture3.sizeOffset_X = (int)(itemAsset3.size_x * 50); sleekImageTexture3.sizeOffset_Y = (int)(itemAsset3.size_y * 50); sleek.add(sleekImageTexture3); ItemTool.getIcon(this.blueprint.outputs[0].id, 100, itemAsset3.getState(), itemAsset3, new ItemIconReady(sleekImageTexture3.updateTexture)); SleekLabel sleekLabel11 = new SleekLabel(); sleekLabel11.positionOffset_X = -100; sleekLabel11.positionOffset_Y = -30; sleekLabel11.positionScale_Y = 1f; sleekLabel11.sizeOffset_X = 100; sleekLabel11.sizeOffset_Y = 30; sleekLabel11.sizeScale_X = 1f; sleekLabel11.foregroundTint = ESleekTint.NONE; sleekLabel11.fontAlignment = 5; if (this.blueprint.type == EBlueprintType.REPAIR) { SleekLabel sleekLabel12 = sleekLabel; string text = sleekLabel12.text; sleekLabel12.text = string.Concat(new object[] { text, " ", this.blueprint.items, "%" }); sleekLabel11.text = this.blueprint.items + "%"; sleekLabel11.backgroundColor = ItemTool.getQualityColor((float)this.blueprint.items / 100f); sleekLabel11.foregroundColor = sleekLabel11.backgroundColor; } else if (this.blueprint.type == EBlueprintType.AMMO) { SleekLabel sleekLabel13 = sleekLabel; string text = sleekLabel13.text; sleekLabel13.text = string.Concat(new object[] { text, " ", this.blueprint.items, "/", this.blueprint.products }); sleekLabel11.text = this.blueprint.items + "/" + itemAsset3.amount; } if (!this.blueprint.hasItem) { sleekLabel11.backgroundColor = Palette.COLOR_R; sleekLabel11.foregroundColor = Palette.COLOR_R; } sleekImageTexture3.add(sleekLabel11); num += (int)(itemAsset3.size_x * 50 + 25); } } SleekLabel sleekLabel14 = sleekLabel; sleekLabel14.text += " = "; sleek.add(new SleekImageTexture((Texture2D)PlayerDashboardCraftingUI.icons.load("Equals")) { positionOffset_X = num, positionOffset_Y = -20, positionScale_Y = 0.5f, sizeOffset_X = 40, sizeOffset_Y = 40, backgroundTint = ESleekTint.FOREGROUND }); num += 65; for (int j = 0; j < this.blueprint.outputs.Length; j++) { BlueprintOutput blueprintOutput = this.blueprint.outputs[j]; ItemAsset itemAsset4 = (ItemAsset)Assets.find(EAssetType.ITEM, blueprintOutput.id); if (itemAsset4 != null) { SleekLabel sleekLabel15 = sleekLabel; sleekLabel15.text += itemAsset4.itemName; SleekImageTexture sleekImageTexture4 = new SleekImageTexture(); sleekImageTexture4.positionOffset_X = num; sleekImageTexture4.positionOffset_Y = (int)(-itemAsset4.size_y * 25); sleekImageTexture4.positionScale_Y = 0.5f; sleekImageTexture4.sizeOffset_X = (int)(itemAsset4.size_x * 50); sleekImageTexture4.sizeOffset_Y = (int)(itemAsset4.size_y * 50); sleek.add(sleekImageTexture4); ItemTool.getIcon(blueprintOutput.id, 100, itemAsset4.getState(), itemAsset4, new ItemIconReady(sleekImageTexture4.updateTexture)); SleekLabel sleekLabel16 = new SleekLabel(); sleekLabel16.positionOffset_X = -100; sleekLabel16.positionOffset_Y = -30; sleekLabel16.positionScale_Y = 1f; sleekLabel16.sizeOffset_X = 100; sleekLabel16.sizeOffset_Y = 30; sleekLabel16.sizeScale_X = 1f; sleekLabel16.foregroundTint = ESleekTint.NONE; sleekLabel16.fontAlignment = 5; if (this.blueprint.type == EBlueprintType.REPAIR) { SleekLabel sleekLabel17 = sleekLabel; sleekLabel17.text += " 100%"; sleekLabel16.text = "100%"; sleekLabel16.backgroundColor = Palette.COLOR_G; sleekLabel16.foregroundColor = Palette.COLOR_G; } else if (this.blueprint.type == EBlueprintType.AMMO) { ItemAsset itemAsset5 = (ItemAsset)Assets.find(EAssetType.ITEM, blueprintOutput.id); if (itemAsset5 != null) { SleekLabel sleekLabel18 = sleekLabel; string text = sleekLabel18.text; sleekLabel18.text = string.Concat(new object[] { text, " ", this.blueprint.products, "/", itemAsset5.amount }); sleekLabel16.text = this.blueprint.products + "/" + itemAsset5.amount; } } else { SleekLabel sleekLabel19 = sleekLabel; sleekLabel19.text = sleekLabel19.text + " x" + blueprintOutput.amount; sleekLabel16.text = "x" + blueprintOutput.amount.ToString(); } sleekImageTexture4.add(sleekLabel16); num += (int)(itemAsset4.size_x * 50); if (j < this.blueprint.outputs.Length - 1) { num += 25; SleekLabel sleekLabel20 = sleekLabel; sleekLabel20.text += " + "; sleek.add(new SleekImageTexture((Texture2D)PlayerDashboardCraftingUI.icons.load("Plus")) { positionOffset_X = num, positionOffset_Y = -20, positionScale_Y = 0.5f, sizeOffset_X = 40, sizeOffset_Y = 40, backgroundTint = ESleekTint.FOREGROUND }); num += 65; } } } sleek.positionOffset_X = -num / 2; sleek.sizeOffset_X = num; base.tooltip = sleekLabel.text; this.foregroundTint = ESleekTint.NONE; base.foregroundColor = sleekLabel.foregroundColor; }
// Token: 0x06003654 RID: 13908 RVA: 0x00170F24 File Offset: 0x0016F324 public MenuCreditsUI() { MenuCreditsUI.container = new Sleek(); MenuCreditsUI.container.positionOffset_X = 10; MenuCreditsUI.container.positionOffset_Y = 10; MenuCreditsUI.container.positionScale_Y = -1f; MenuCreditsUI.container.sizeOffset_X = -20; MenuCreditsUI.container.sizeOffset_Y = -20; MenuCreditsUI.container.sizeScale_X = 1f; MenuCreditsUI.container.sizeScale_Y = 1f; MenuUI.container.add(MenuCreditsUI.container); MenuCreditsUI.active = false; MenuCreditsUI.returnButton = new SleekButtonIcon((Texture2D)MenuPauseUI.icons.load("Exit")); MenuCreditsUI.returnButton.positionOffset_X = -250; MenuCreditsUI.returnButton.positionOffset_Y = 100; MenuCreditsUI.returnButton.positionScale_X = 0.5f; MenuCreditsUI.returnButton.sizeOffset_X = 500; MenuCreditsUI.returnButton.sizeOffset_Y = 50; MenuCreditsUI.returnButton.text = MenuPauseUI.localization.format("Return_Button"); MenuCreditsUI.returnButton.tooltip = MenuPauseUI.localization.format("Return_Button_Tooltip"); SleekButton sleekButton = MenuCreditsUI.returnButton; if (MenuCreditsUI.< > f__mg$cache0 == null) { MenuCreditsUI.< > f__mg$cache0 = new ClickedButton(MenuCreditsUI.onClickedReturnButton); } sleekButton.onClickedButton = MenuCreditsUI.< > f__mg$cache0; MenuCreditsUI.returnButton.fontSize = 14; MenuCreditsUI.returnButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; MenuCreditsUI.container.add(MenuCreditsUI.returnButton); MenuCreditsUI.creditsBox = new SleekBox(); MenuCreditsUI.creditsBox.positionOffset_X = -250; MenuCreditsUI.creditsBox.positionOffset_Y = 160; MenuCreditsUI.creditsBox.positionScale_X = 0.5f; MenuCreditsUI.creditsBox.sizeOffset_X = 500; MenuCreditsUI.creditsBox.sizeOffset_Y = -260; MenuCreditsUI.creditsBox.sizeScale_Y = 1f; MenuCreditsUI.creditsBox.fontSize = 14; MenuCreditsUI.container.add(MenuCreditsUI.creditsBox); MenuCreditsUI.scrollBox = new SleekScrollBox(); MenuCreditsUI.scrollBox.positionOffset_X = 5; MenuCreditsUI.scrollBox.positionOffset_Y = 5; MenuCreditsUI.scrollBox.sizeOffset_X = 25; MenuCreditsUI.scrollBox.sizeOffset_Y = -5; MenuCreditsUI.scrollBox.sizeScale_X = 1f; MenuCreditsUI.scrollBox.sizeScale_Y = 1f; MenuCreditsUI.scrollBox.area = new Rect(0f, 0f, 5f, (float)(MenuCreditsUI.credits.Length * 30)); MenuCreditsUI.creditsBox.add(MenuCreditsUI.scrollBox); for (int i = 0; i < MenuCreditsUI.credits.Length; i++) { CreditsContributorContributionPair creditsContributorContributionPair = MenuCreditsUI.credits[i]; SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = 0; sleekLabel.positionOffset_Y = i * 30; sleekLabel.sizeOffset_X = -35; sleekLabel.sizeOffset_Y = 30; sleekLabel.sizeScale_X = 1f; sleekLabel.fontAlignment = TextAnchor.MiddleLeft; sleekLabel.fontSize = 14; sleekLabel.text = creditsContributorContributionPair.contributor; MenuCreditsUI.scrollBox.add(sleekLabel); SleekLabel sleekLabel2 = new SleekLabel(); sleekLabel2.positionOffset_X = 0; sleekLabel2.positionOffset_Y = i * 30; sleekLabel2.sizeOffset_X = -35; sleekLabel2.sizeOffset_Y = 30; sleekLabel2.sizeScale_X = 1f; sleekLabel2.fontAlignment = TextAnchor.MiddleRight; sleekLabel2.fontSize = 14; sleekLabel2.text = creditsContributorContributionPair.contribution; MenuCreditsUI.scrollBox.add(sleekLabel2); } }
// Token: 0x06003516 RID: 13590 RVA: 0x0015F8A4 File Offset: 0x0015DCA4 private static void update(int x, int y) { for (int i = 0; i < (int)EditorLevelVisibilityUI.DEBUG_SIZE; i++) { for (int j = 0; j < (int)EditorLevelVisibilityUI.DEBUG_SIZE; j++) { int num = i * (int)EditorLevelVisibilityUI.DEBUG_SIZE + j; int num2 = x - (int)(EditorLevelVisibilityUI.DEBUG_SIZE / 2) + i; int num3 = y - (int)(EditorLevelVisibilityUI.DEBUG_SIZE / 2) + j; SleekLabel sleekLabel = EditorLevelVisibilityUI.regionLabels[num]; if (Regions.checkSafe(num2, num3)) { int num4 = LevelObjects.objects[num2, num3].Count + LevelGround.trees[num2, num3].Count; int num5 = LevelObjects.total + LevelGround.total; double num6 = Math.Round((double)num4 / (double)num5 * 1000.0) / 10.0; int num7 = 0; for (int k = 0; k < LevelObjects.objects[num2, num3].Count; k++) { LevelObject levelObject = LevelObjects.objects[num2, num3][k]; if (levelObject.transform) { levelObject.transform.GetComponents <MeshFilter>(EditorLevelVisibilityUI.meshes); if (EditorLevelVisibilityUI.meshes.Count == 0) { Transform transform = levelObject.transform.FindChild("Model_0"); if (transform) { transform.GetComponentsInChildren <MeshFilter>(true, EditorLevelVisibilityUI.meshes); } } if (EditorLevelVisibilityUI.meshes.Count != 0) { for (int l = 0; l < EditorLevelVisibilityUI.meshes.Count; l++) { Mesh sharedMesh = EditorLevelVisibilityUI.meshes[l].sharedMesh; if (sharedMesh) { num7 += sharedMesh.triangles.Length; } } } } } for (int m = 0; m < LevelGround.trees[num2, num3].Count; m++) { ResourceSpawnpoint resourceSpawnpoint = LevelGround.trees[num2, num3][m]; if (resourceSpawnpoint.model) { resourceSpawnpoint.model.GetComponents <MeshFilter>(EditorLevelVisibilityUI.meshes); if (EditorLevelVisibilityUI.meshes.Count == 0) { Transform transform2 = resourceSpawnpoint.model.FindChild("Model_0"); if (transform2) { transform2.GetComponentsInChildren <MeshFilter>(true, EditorLevelVisibilityUI.meshes); } } if (EditorLevelVisibilityUI.meshes.Count != 0) { for (int n = 0; n < EditorLevelVisibilityUI.meshes.Count; n++) { Mesh sharedMesh2 = EditorLevelVisibilityUI.meshes[n].sharedMesh; if (sharedMesh2) { num7 += sharedMesh2.triangles.Length; } } } } } long num8 = (long)num4 * (long)num7; float quality = Mathf.Clamp01((float)(1.0 - (double)num8 / 50000000.0)); sleekLabel.text = EditorLevelVisibilityUI.localization.format("Point", new object[] { num2, num3 }); SleekLabel sleekLabel2 = sleekLabel; sleekLabel2.text = sleekLabel2.text + "\n" + EditorLevelVisibilityUI.localization.format("Objects", new object[] { num4, num6 }); SleekLabel sleekLabel3 = sleekLabel; sleekLabel3.text = sleekLabel3.text + "\n" + EditorLevelVisibilityUI.localization.format("Triangles", new object[] { num7 }); if (num4 == 0 && num7 == 0) { sleekLabel.foregroundColor = Color.white; } else { sleekLabel.foregroundColor = ItemTool.getQualityColor(quality); } } } } }
// Token: 0x06003509 RID: 13577 RVA: 0x0015F05C File Offset: 0x0015D45C public EditorLevelVisibilityUI() { EditorLevelVisibilityUI.localization = Localization.read("/Editor/EditorLevelVisibility.dat"); EditorLevelVisibilityUI.container = new Sleek(); EditorLevelVisibilityUI.container.positionScale_X = 1f; EditorLevelVisibilityUI.container.sizeScale_X = 1f; EditorLevelVisibilityUI.container.sizeScale_Y = 1f; EditorUI.window.add(EditorLevelVisibilityUI.container); EditorLevelVisibilityUI.active = false; EditorLevelVisibilityUI.roadsToggle = new SleekToggle(); EditorLevelVisibilityUI.roadsToggle.positionOffset_X = -210; EditorLevelVisibilityUI.roadsToggle.positionOffset_Y = 90; EditorLevelVisibilityUI.roadsToggle.positionScale_X = 1f; EditorLevelVisibilityUI.roadsToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.roadsToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.roadsToggle.state = LevelVisibility.roadsVisible; EditorLevelVisibilityUI.roadsToggle.addLabel(EditorLevelVisibilityUI.localization.format("Roads_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle = EditorLevelVisibilityUI.roadsToggle; if (EditorLevelVisibilityUI.< > f__mg$cache0 == null) { EditorLevelVisibilityUI.< > f__mg$cache0 = new Toggled(EditorLevelVisibilityUI.onToggledRoadsToggle); } sleekToggle.onToggled = EditorLevelVisibilityUI.< > f__mg$cache0; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.roadsToggle); EditorLevelVisibilityUI.navigationToggle = new SleekToggle(); EditorLevelVisibilityUI.navigationToggle.positionOffset_X = -210; EditorLevelVisibilityUI.navigationToggle.positionOffset_Y = 140; EditorLevelVisibilityUI.navigationToggle.positionScale_X = 1f; EditorLevelVisibilityUI.navigationToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.navigationToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.navigationToggle.state = LevelVisibility.navigationVisible; EditorLevelVisibilityUI.navigationToggle.addLabel(EditorLevelVisibilityUI.localization.format("Navigation_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle2 = EditorLevelVisibilityUI.navigationToggle; if (EditorLevelVisibilityUI.< > f__mg$cache1 == null) { EditorLevelVisibilityUI.< > f__mg$cache1 = new Toggled(EditorLevelVisibilityUI.onToggledNavigationToggle); } sleekToggle2.onToggled = EditorLevelVisibilityUI.< > f__mg$cache1; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.navigationToggle); EditorLevelVisibilityUI.nodesToggle = new SleekToggle(); EditorLevelVisibilityUI.nodesToggle.positionOffset_X = -210; EditorLevelVisibilityUI.nodesToggle.positionOffset_Y = 190; EditorLevelVisibilityUI.nodesToggle.positionScale_X = 1f; EditorLevelVisibilityUI.nodesToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.nodesToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.nodesToggle.state = LevelVisibility.nodesVisible; EditorLevelVisibilityUI.nodesToggle.addLabel(EditorLevelVisibilityUI.localization.format("Nodes_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle3 = EditorLevelVisibilityUI.nodesToggle; if (EditorLevelVisibilityUI.< > f__mg$cache2 == null) { EditorLevelVisibilityUI.< > f__mg$cache2 = new Toggled(EditorLevelVisibilityUI.onToggledNodesToggle); } sleekToggle3.onToggled = EditorLevelVisibilityUI.< > f__mg$cache2; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.nodesToggle); EditorLevelVisibilityUI.itemsToggle = new SleekToggle(); EditorLevelVisibilityUI.itemsToggle.positionOffset_X = -210; EditorLevelVisibilityUI.itemsToggle.positionOffset_Y = 240; EditorLevelVisibilityUI.itemsToggle.positionScale_X = 1f; EditorLevelVisibilityUI.itemsToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.itemsToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.itemsToggle.state = LevelVisibility.itemsVisible; EditorLevelVisibilityUI.itemsToggle.addLabel(EditorLevelVisibilityUI.localization.format("Items_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle4 = EditorLevelVisibilityUI.itemsToggle; if (EditorLevelVisibilityUI.< > f__mg$cache3 == null) { EditorLevelVisibilityUI.< > f__mg$cache3 = new Toggled(EditorLevelVisibilityUI.onToggledItemsToggle); } sleekToggle4.onToggled = EditorLevelVisibilityUI.< > f__mg$cache3; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.itemsToggle); EditorLevelVisibilityUI.playersToggle = new SleekToggle(); EditorLevelVisibilityUI.playersToggle.positionOffset_X = -210; EditorLevelVisibilityUI.playersToggle.positionOffset_Y = 290; EditorLevelVisibilityUI.playersToggle.positionScale_X = 1f; EditorLevelVisibilityUI.playersToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.playersToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.playersToggle.state = LevelVisibility.playersVisible; EditorLevelVisibilityUI.playersToggle.addLabel(EditorLevelVisibilityUI.localization.format("Players_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle5 = EditorLevelVisibilityUI.playersToggle; if (EditorLevelVisibilityUI.< > f__mg$cache4 == null) { EditorLevelVisibilityUI.< > f__mg$cache4 = new Toggled(EditorLevelVisibilityUI.onToggledPlayersToggle); } sleekToggle5.onToggled = EditorLevelVisibilityUI.< > f__mg$cache4; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.playersToggle); EditorLevelVisibilityUI.zombiesToggle = new SleekToggle(); EditorLevelVisibilityUI.zombiesToggle.positionOffset_X = -210; EditorLevelVisibilityUI.zombiesToggle.positionOffset_Y = 340; EditorLevelVisibilityUI.zombiesToggle.positionScale_X = 1f; EditorLevelVisibilityUI.zombiesToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.zombiesToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.zombiesToggle.state = LevelVisibility.zombiesVisible; EditorLevelVisibilityUI.zombiesToggle.addLabel(EditorLevelVisibilityUI.localization.format("Zombies_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle6 = EditorLevelVisibilityUI.zombiesToggle; if (EditorLevelVisibilityUI.< > f__mg$cache5 == null) { EditorLevelVisibilityUI.< > f__mg$cache5 = new Toggled(EditorLevelVisibilityUI.onToggledZombiesToggle); } sleekToggle6.onToggled = EditorLevelVisibilityUI.< > f__mg$cache5; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.zombiesToggle); EditorLevelVisibilityUI.vehiclesToggle = new SleekToggle(); EditorLevelVisibilityUI.vehiclesToggle.positionOffset_X = -210; EditorLevelVisibilityUI.vehiclesToggle.positionOffset_Y = 390; EditorLevelVisibilityUI.vehiclesToggle.positionScale_X = 1f; EditorLevelVisibilityUI.vehiclesToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.vehiclesToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.vehiclesToggle.state = LevelVisibility.vehiclesVisible; EditorLevelVisibilityUI.vehiclesToggle.addLabel(EditorLevelVisibilityUI.localization.format("Vehicles_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle7 = EditorLevelVisibilityUI.vehiclesToggle; if (EditorLevelVisibilityUI.< > f__mg$cache6 == null) { EditorLevelVisibilityUI.< > f__mg$cache6 = new Toggled(EditorLevelVisibilityUI.onToggledVehiclesToggle); } sleekToggle7.onToggled = EditorLevelVisibilityUI.< > f__mg$cache6; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.vehiclesToggle); EditorLevelVisibilityUI.borderToggle = new SleekToggle(); EditorLevelVisibilityUI.borderToggle.positionOffset_X = -210; EditorLevelVisibilityUI.borderToggle.positionOffset_Y = 440; EditorLevelVisibilityUI.borderToggle.positionScale_X = 1f; EditorLevelVisibilityUI.borderToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.borderToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.borderToggle.state = LevelVisibility.borderVisible; EditorLevelVisibilityUI.borderToggle.addLabel(EditorLevelVisibilityUI.localization.format("Border_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle8 = EditorLevelVisibilityUI.borderToggle; if (EditorLevelVisibilityUI.< > f__mg$cache7 == null) { EditorLevelVisibilityUI.< > f__mg$cache7 = new Toggled(EditorLevelVisibilityUI.onToggledBorderToggle); } sleekToggle8.onToggled = EditorLevelVisibilityUI.< > f__mg$cache7; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.borderToggle); EditorLevelVisibilityUI.animalsToggle = new SleekToggle(); EditorLevelVisibilityUI.animalsToggle.positionOffset_X = -210; EditorLevelVisibilityUI.animalsToggle.positionOffset_Y = 490; EditorLevelVisibilityUI.animalsToggle.positionScale_X = 1f; EditorLevelVisibilityUI.animalsToggle.sizeOffset_X = 40; EditorLevelVisibilityUI.animalsToggle.sizeOffset_Y = 40; EditorLevelVisibilityUI.animalsToggle.state = LevelVisibility.animalsVisible; EditorLevelVisibilityUI.animalsToggle.addLabel(EditorLevelVisibilityUI.localization.format("Animals_Label"), ESleekSide.RIGHT); SleekToggle sleekToggle9 = EditorLevelVisibilityUI.animalsToggle; if (EditorLevelVisibilityUI.< > f__mg$cache8 == null) { EditorLevelVisibilityUI.< > f__mg$cache8 = new Toggled(EditorLevelVisibilityUI.onToggledAnimalsToggle); } sleekToggle9.onToggled = EditorLevelVisibilityUI.< > f__mg$cache8; EditorLevelVisibilityUI.container.add(EditorLevelVisibilityUI.animalsToggle); EditorLevelVisibilityUI.regionLabels = new SleekLabel[(int)(EditorLevelVisibilityUI.DEBUG_SIZE * EditorLevelVisibilityUI.DEBUG_SIZE)]; for (int i = 0; i < EditorLevelVisibilityUI.regionLabels.Length; i++) { SleekLabel sleekLabel = new SleekLabel(); sleekLabel.sizeOffset_X = 200; sleekLabel.sizeOffset_Y = 50; EditorLevelVisibilityUI.regionLabels[i] = sleekLabel; sleekLabel.foregroundTint = ESleekTint.NONE; EditorLevelVisibilityUI.container.add(sleekLabel); } EditorArea area = Editor.editor.area; Delegate onRegionUpdated = area.onRegionUpdated; if (EditorLevelVisibilityUI.< > f__mg$cache9 == null) { EditorLevelVisibilityUI.< > f__mg$cache9 = new EditorRegionUpdated(EditorLevelVisibilityUI.onRegionUpdated); } area.onRegionUpdated = (EditorRegionUpdated)Delegate.Combine(onRegionUpdated, EditorLevelVisibilityUI.< > f__mg$cache9); }
// 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); }
public SleekPlayer(SteamPlayer newPlayer, bool isButton, SleekPlayer.ESleekPlayerDisplayContext context) { this.player = newPlayer; this.context = context; base.init(); Texture2D texture; if (OptionsSettings.streamer) { texture = null; } else if (Provider.isServer) { texture = Provider.provider.communityService.getIcon(Provider.user); } else { texture = Provider.provider.communityService.getIcon(this.player.playerID.steamID); } if (isButton) { SleekButton sleekButton = new SleekButton(); sleekButton.sizeScale_X = 1f; sleekButton.sizeScale_Y = 1f; sleekButton.tooltip = this.player.playerID.playerName; sleekButton.fontSize = 14; sleekButton.onClickedButton = new ClickedButton(this.onClickedPlayerButton); base.add(sleekButton); this.box = sleekButton; } else { SleekBox sleekBox = new SleekBox(); sleekBox.sizeScale_X = 1f; sleekBox.sizeScale_Y = 1f; sleekBox.tooltip = this.player.playerID.playerName; sleekBox.fontSize = 14; base.add(sleekBox); this.box = sleekBox; } this.avatarImage = new SleekImageTexture(); this.avatarImage.positionOffset_X = 9; this.avatarImage.positionOffset_Y = 9; this.avatarImage.sizeOffset_X = 32; this.avatarImage.sizeOffset_Y = 32; this.avatarImage.texture = texture; this.avatarImage.shouldDestroyTexture = true; this.box.add(this.avatarImage); if (this.player.player != null && this.player.player.skills != null) { this.repImage = new SleekImageTexture(); this.repImage.positionOffset_X = 46; this.repImage.positionOffset_Y = 9; this.repImage.sizeOffset_X = 32; this.repImage.sizeOffset_Y = 32; this.repImage.texture = PlayerTool.getRepTexture(this.player.player.skills.reputation); this.repImage.backgroundColor = PlayerTool.getRepColor(this.player.player.skills.reputation); this.box.add(this.repImage); } this.nameLabel = new SleekLabel(); this.nameLabel.positionOffset_X = 83; this.nameLabel.sizeOffset_X = -113; this.nameLabel.sizeOffset_Y = 30; this.nameLabel.sizeScale_X = 1f; if (this.player.player.quests.isMemberOfSameGroupAs(Player.player)) { if (this.player.playerID.nickName != string.Empty && this.player.playerID.steamID != Provider.client) { this.nameLabel.text = this.player.playerID.nickName; } else { this.nameLabel.text = this.player.playerID.characterName; } } else { this.nameLabel.text = this.player.playerID.characterName; } this.nameLabel.fontSize = 14; this.box.add(this.nameLabel); if (this.player.player != null && this.player.player.skills != null) { this.repLabel = new SleekLabel(); this.repLabel.positionOffset_X = 83; this.repLabel.positionOffset_Y = 20; this.repLabel.sizeOffset_X = -113; this.repLabel.sizeOffset_Y = 30; this.repLabel.sizeScale_X = 1f; this.repLabel.foregroundTint = ESleekTint.NONE; this.repLabel.foregroundColor = this.repImage.backgroundColor; this.repLabel.text = PlayerTool.getRepTitle(this.player.player.skills.reputation); this.box.add(this.repLabel); } if (context == SleekPlayer.ESleekPlayerDisplayContext.GROUP_ROSTER) { this.nameLabel.positionOffset_Y = -5; this.repLabel.positionOffset_Y = 10; SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = 83; sleekLabel.positionOffset_Y = 25; sleekLabel.sizeOffset_X = -113; sleekLabel.sizeOffset_Y = 30; sleekLabel.sizeScale_X = 1f; sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.foregroundColor = this.repImage.backgroundColor; this.box.add(sleekLabel); EPlayerGroupRank groupRank = this.player.player.quests.groupRank; if (groupRank != EPlayerGroupRank.MEMBER) { if (groupRank != EPlayerGroupRank.ADMIN) { if (groupRank == EPlayerGroupRank.OWNER) { sleekLabel.text = PlayerDashboardInformationUI.localization.format("Group_Rank_Owner"); } } else { sleekLabel.text = PlayerDashboardInformationUI.localization.format("Group_Rank_Admin"); } } else { sleekLabel.text = PlayerDashboardInformationUI.localization.format("Group_Rank_Member"); } } this.voice = new SleekImageTexture(); this.voice.positionOffset_X = 15; this.voice.positionOffset_Y = 15; this.voice.sizeOffset_X = 20; this.voice.sizeOffset_Y = 20; this.voice.texture = (Texture2D)PlayerDashboardInformationUI.icons.load("Voice"); this.box.add(this.voice); this.skillset = new SleekImageTexture(); this.skillset.positionOffset_X = -25; this.skillset.positionOffset_Y = 25; this.skillset.positionScale_X = 1f; this.skillset.sizeOffset_X = 20; this.skillset.sizeOffset_Y = 20; this.skillset.texture = (Texture2D)MenuSurvivorsCharacterUI.icons.load("Skillset_" + (int)this.player.skillset); this.skillset.backgroundTint = ESleekTint.FOREGROUND; this.box.add(this.skillset); if (this.player.isAdmin && !Provider.isServer) { this.box.backgroundColor = Palette.ADMIN; this.box.foregroundColor = Palette.ADMIN; this.box.backgroundTint = ESleekTint.NONE; this.box.foregroundTint = ESleekTint.NONE; this.nameLabel.foregroundColor = Palette.ADMIN; this.nameLabel.foregroundTint = ESleekTint.NONE; this.icon = new SleekImageTexture(); this.icon.positionOffset_X = -25; this.icon.positionOffset_Y = 5; this.icon.positionScale_X = 1f; this.icon.sizeOffset_X = 20; this.icon.sizeOffset_Y = 20; this.icon.texture = (Texture2D)PlayerDashboardInformationUI.icons.load("Admin"); this.box.add(this.icon); } else if (this.player.isPro) { this.box.backgroundColor = Palette.PRO; this.box.foregroundColor = Palette.PRO; this.box.backgroundTint = ESleekTint.NONE; this.box.foregroundTint = ESleekTint.NONE; this.nameLabel.foregroundColor = Palette.PRO; this.nameLabel.foregroundTint = ESleekTint.NONE; this.icon = new SleekImageTexture(); this.icon.positionOffset_X = -25; this.icon.positionOffset_Y = 5; this.icon.positionScale_X = 1f; this.icon.sizeOffset_X = 20; this.icon.sizeOffset_Y = 20; this.icon.texture = (Texture2D)PlayerDashboardInformationUI.icons.load("Pro"); this.box.add(this.icon); } if (context == SleekPlayer.ESleekPlayerDisplayContext.GROUP_ROSTER) { int num = 0; if (!this.player.player.channel.isOwner) { if (Player.player.quests.hasPermissionToChangeRank) { if (this.player.player.quests.groupRank < EPlayerGroupRank.OWNER) { SleekButton sleekButton2 = new SleekButton(); sleekButton2.positionOffset_X = num; sleekButton2.positionScale_X = 1f; sleekButton2.sizeOffset_X = 80; sleekButton2.sizeScale_Y = 1f; sleekButton2.text = PlayerDashboardInformationUI.localization.format("Group_Promote"); sleekButton2.tooltip = PlayerDashboardInformationUI.localization.format("Group_Promote_Tooltip"); sleekButton2.onClickedButton = new ClickedButton(this.onClickedPromoteButton); this.box.add(sleekButton2); num += 80; } if (this.player.player.quests.groupRank == EPlayerGroupRank.ADMIN) { SleekButton sleekButton3 = new SleekButton(); sleekButton3.positionOffset_X = num; sleekButton3.positionScale_X = 1f; sleekButton3.sizeOffset_X = 80; sleekButton3.sizeScale_Y = 1f; sleekButton3.text = PlayerDashboardInformationUI.localization.format("Group_Demote"); sleekButton3.tooltip = PlayerDashboardInformationUI.localization.format("Group_Demote_Tooltip"); sleekButton3.onClickedButton = new ClickedButton(this.onClickedDemoteButton); this.box.add(sleekButton3); num += 80; } } if (Player.player.quests.hasPermissionToKickMembers && this.player.player.quests.canBeKickedFromGroup) { SleekButton sleekButton4 = new SleekButton(); sleekButton4.positionOffset_X = num; sleekButton4.positionScale_X = 1f; sleekButton4.sizeOffset_X = 50; sleekButton4.sizeScale_Y = 1f; sleekButton4.text = PlayerDashboardInformationUI.localization.format("Group_Kick"); sleekButton4.tooltip = PlayerDashboardInformationUI.localization.format("Group_Kick_Tooltip"); sleekButton4.onClickedButton = new ClickedButton(this.onClickedKickButton); this.box.add(sleekButton4); num += 50; } } this.box.sizeOffset_X = -num; } else if (context == SleekPlayer.ESleekPlayerDisplayContext.PLAYER_LIST) { int num2 = 0; this.muteButton = new SleekButton(); this.muteButton.positionScale_X = 1f; this.muteButton.sizeOffset_X = 60; this.muteButton.sizeScale_Y = 1f; this.muteButton.text = ((!this.player.isMuted) ? PlayerDashboardInformationUI.localization.format("Mute_On") : PlayerDashboardInformationUI.localization.format("Mute_Off")); this.muteButton.tooltip = PlayerDashboardInformationUI.localization.format("Mute_Tooltip"); this.muteButton.onClickedButton = new ClickedButton(this.onClickedMuteButton); this.box.add(this.muteButton); num2 += 60; if (!this.player.player.channel.isOwner && !this.player.isAdmin) { SleekButton sleekButton5 = new SleekButton(); sleekButton5.positionOffset_X = num2; sleekButton5.positionScale_X = 1f; sleekButton5.sizeOffset_X = 50; sleekButton5.sizeScale_Y = 1f; sleekButton5.text = PlayerDashboardInformationUI.localization.format("Vote_Kick"); sleekButton5.tooltip = PlayerDashboardInformationUI.localization.format("Vote_Kick_Tooltip"); sleekButton5.onClickedButton = new ClickedButton(this.onClickedKickButton); this.box.add(sleekButton5); num2 += 50; } if (Player.player != null) { if (!this.player.player.channel.isOwner && Player.player.quests.isMemberOfAGroup && Player.player.quests.hasPermissionToInviteMembers && !this.player.player.quests.isMemberOfAGroup) { SleekButton sleekButton6 = new SleekButton(); sleekButton6.positionOffset_X = num2; sleekButton6.positionScale_X = 1f; sleekButton6.sizeOffset_X = 60; sleekButton6.sizeScale_Y = 1f; sleekButton6.text = PlayerDashboardInformationUI.localization.format("Group_Invite"); sleekButton6.tooltip = PlayerDashboardInformationUI.localization.format("Group_Invite_Tooltip"); sleekButton6.onClickedButton = new ClickedButton(this.onClickedInviteButton); this.box.add(sleekButton6); num2 += 60; } if (Player.player.channel.owner.isAdmin) { SleekButton sleekButton7 = new SleekButton(); sleekButton7.positionOffset_X = num2; sleekButton7.positionScale_X = 1f; sleekButton7.sizeOffset_X = 50; sleekButton7.sizeScale_Y = 1f; sleekButton7.text = PlayerDashboardInformationUI.localization.format("Spy"); sleekButton7.tooltip = PlayerDashboardInformationUI.localization.format("Spy_Tooltip"); sleekButton7.onClickedButton = new ClickedButton(this.onClickedSpyButton); this.box.add(sleekButton7); num2 += 50; } } this.box.sizeOffset_X = -num2; } if (this.player != null) { PlayerVoice playerVoice = this.player.player.voice; playerVoice.onTalked = (Talked)Delegate.Combine(playerVoice.onTalked, new Talked(this.onTalked)); this.onTalked(this.player.player.voice.isTalking); } }
// Token: 0x060038E9 RID: 14569 RVA: 0x001A1804 File Offset: 0x0019FC04 public PlayerPauseUI() { PlayerPauseUI.localization = Localization.read("/Player/PlayerPause.dat"); if (PlayerPauseUI.icons != null) { PlayerPauseUI.icons.unload(); PlayerPauseUI.icons = null; } PlayerPauseUI.icons = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerPause/PlayerPause.unity3d"); PlayerPauseUI.container = new Sleek(); PlayerPauseUI.container.positionScale_Y = 1f; PlayerPauseUI.container.positionOffset_X = 10; PlayerPauseUI.container.positionOffset_Y = 10; PlayerPauseUI.container.sizeOffset_X = -20; PlayerPauseUI.container.sizeOffset_Y = -20; PlayerPauseUI.container.sizeScale_X = 1f; PlayerPauseUI.container.sizeScale_Y = 1f; PlayerUI.container.add(PlayerPauseUI.container); PlayerPauseUI.active = false; PlayerPauseUI.returnButton = new SleekButtonIcon((Texture2D)PlayerPauseUI.icons.load("Return")); PlayerPauseUI.returnButton.positionOffset_X = -100; PlayerPauseUI.returnButton.positionOffset_Y = -205; PlayerPauseUI.returnButton.positionScale_X = 0.5f; PlayerPauseUI.returnButton.positionScale_Y = 0.5f; PlayerPauseUI.returnButton.sizeOffset_X = 200; PlayerPauseUI.returnButton.sizeOffset_Y = 50; PlayerPauseUI.returnButton.text = PlayerPauseUI.localization.format("Return_Button_Text"); PlayerPauseUI.returnButton.tooltip = PlayerPauseUI.localization.format("Return_Button_Tooltip"); PlayerPauseUI.returnButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButton sleekButton = PlayerPauseUI.returnButton; if (PlayerPauseUI.< > f__mg$cache0 == null) { PlayerPauseUI.< > f__mg$cache0 = new ClickedButton(PlayerPauseUI.onClickedReturnButton); } sleekButton.onClickedButton = PlayerPauseUI.< > f__mg$cache0; PlayerPauseUI.returnButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.returnButton); PlayerPauseUI.optionsButton = new SleekButtonIcon((Texture2D)PlayerPauseUI.icons.load("Options")); PlayerPauseUI.optionsButton.positionOffset_X = -100; PlayerPauseUI.optionsButton.positionOffset_Y = -145; PlayerPauseUI.optionsButton.positionScale_X = 0.5f; PlayerPauseUI.optionsButton.positionScale_Y = 0.5f; PlayerPauseUI.optionsButton.sizeOffset_X = 200; PlayerPauseUI.optionsButton.sizeOffset_Y = 50; PlayerPauseUI.optionsButton.text = PlayerPauseUI.localization.format("Options_Button_Text"); PlayerPauseUI.optionsButton.tooltip = PlayerPauseUI.localization.format("Options_Button_Tooltip"); SleekButton sleekButton2 = PlayerPauseUI.optionsButton; if (PlayerPauseUI.< > f__mg$cache1 == null) { PlayerPauseUI.< > f__mg$cache1 = new ClickedButton(PlayerPauseUI.onClickedOptionsButton); } sleekButton2.onClickedButton = PlayerPauseUI.< > f__mg$cache1; PlayerPauseUI.optionsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; PlayerPauseUI.optionsButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.optionsButton); PlayerPauseUI.displayButton = new SleekButtonIcon((Texture2D)PlayerPauseUI.icons.load("Display")); PlayerPauseUI.displayButton.positionOffset_X = -100; PlayerPauseUI.displayButton.positionOffset_Y = -85; PlayerPauseUI.displayButton.positionScale_X = 0.5f; PlayerPauseUI.displayButton.positionScale_Y = 0.5f; PlayerPauseUI.displayButton.sizeOffset_X = 200; PlayerPauseUI.displayButton.sizeOffset_Y = 50; PlayerPauseUI.displayButton.text = PlayerPauseUI.localization.format("Display_Button_Text"); PlayerPauseUI.displayButton.tooltip = PlayerPauseUI.localization.format("Display_Button_Tooltip"); PlayerPauseUI.displayButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButton sleekButton3 = PlayerPauseUI.displayButton; if (PlayerPauseUI.< > f__mg$cache2 == null) { PlayerPauseUI.< > f__mg$cache2 = new ClickedButton(PlayerPauseUI.onClickedDisplayButton); } sleekButton3.onClickedButton = PlayerPauseUI.< > f__mg$cache2; PlayerPauseUI.displayButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.displayButton); PlayerPauseUI.graphicsButton = new SleekButtonIcon((Texture2D)PlayerPauseUI.icons.load("Graphics")); PlayerPauseUI.graphicsButton.positionOffset_X = -100; PlayerPauseUI.graphicsButton.positionOffset_Y = -25; PlayerPauseUI.graphicsButton.positionScale_X = 0.5f; PlayerPauseUI.graphicsButton.positionScale_Y = 0.5f; PlayerPauseUI.graphicsButton.sizeOffset_X = 200; PlayerPauseUI.graphicsButton.sizeOffset_Y = 50; PlayerPauseUI.graphicsButton.text = PlayerPauseUI.localization.format("Graphics_Button_Text"); PlayerPauseUI.graphicsButton.tooltip = PlayerPauseUI.localization.format("Graphics_Button_Tooltip"); PlayerPauseUI.graphicsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButton sleekButton4 = PlayerPauseUI.graphicsButton; if (PlayerPauseUI.< > f__mg$cache3 == null) { PlayerPauseUI.< > f__mg$cache3 = new ClickedButton(PlayerPauseUI.onClickedGraphicsButton); } sleekButton4.onClickedButton = PlayerPauseUI.< > f__mg$cache3; PlayerPauseUI.graphicsButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.graphicsButton); PlayerPauseUI.controlsButton = new SleekButtonIcon((Texture2D)PlayerPauseUI.icons.load("Controls")); PlayerPauseUI.controlsButton.positionOffset_X = -100; PlayerPauseUI.controlsButton.positionOffset_Y = 35; PlayerPauseUI.controlsButton.positionScale_X = 0.5f; PlayerPauseUI.controlsButton.positionScale_Y = 0.5f; PlayerPauseUI.controlsButton.sizeOffset_X = 200; PlayerPauseUI.controlsButton.sizeOffset_Y = 50; PlayerPauseUI.controlsButton.text = PlayerPauseUI.localization.format("Controls_Button_Text"); PlayerPauseUI.controlsButton.tooltip = PlayerPauseUI.localization.format("Controls_Button_Tooltip"); PlayerPauseUI.controlsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButton sleekButton5 = PlayerPauseUI.controlsButton; if (PlayerPauseUI.< > f__mg$cache4 == null) { PlayerPauseUI.< > f__mg$cache4 = new ClickedButton(PlayerPauseUI.onClickedControlsButton); } sleekButton5.onClickedButton = PlayerPauseUI.< > f__mg$cache4; PlayerPauseUI.controlsButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.controlsButton); PlayerPauseUI.exitButton = new SleekButtonIcon((Texture2D)PlayerPauseUI.icons.load("Exit")); PlayerPauseUI.exitButton.positionOffset_X = -100; PlayerPauseUI.exitButton.positionOffset_Y = 155; PlayerPauseUI.exitButton.positionScale_X = 0.5f; PlayerPauseUI.exitButton.positionScale_Y = 0.5f; PlayerPauseUI.exitButton.sizeOffset_X = 200; PlayerPauseUI.exitButton.sizeOffset_Y = 50; PlayerPauseUI.exitButton.text = PlayerPauseUI.localization.format("Exit_Button_Text"); PlayerPauseUI.exitButton.tooltip = PlayerPauseUI.localization.format("Exit_Button_Tooltip"); PlayerPauseUI.exitButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButton sleekButton6 = PlayerPauseUI.exitButton; if (PlayerPauseUI.< > f__mg$cache5 == null) { PlayerPauseUI.< > f__mg$cache5 = new ClickedButton(PlayerPauseUI.onClickedExitButton); } sleekButton6.onClickedButton = PlayerPauseUI.< > f__mg$cache5; PlayerPauseUI.exitButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.exitButton); PlayerPauseUI.suicideButton = new SleekButtonIconConfirm((Texture2D)PlayerPauseUI.icons.load("Suicide"), PlayerPauseUI.localization.format("Suicide_Button_Confirm"), PlayerPauseUI.localization.format("Suicide_Button_Confirm_Tooltip"), PlayerPauseUI.localization.format("Suicide_Button_Deny"), PlayerPauseUI.localization.format("Suicide_Button_Deny_Tooltip")); PlayerPauseUI.suicideButton.positionOffset_X = -100; PlayerPauseUI.suicideButton.positionOffset_Y = 95; PlayerPauseUI.suicideButton.positionScale_X = 0.5f; PlayerPauseUI.suicideButton.positionScale_Y = 0.5f; PlayerPauseUI.suicideButton.sizeOffset_X = 200; PlayerPauseUI.suicideButton.sizeOffset_Y = 50; PlayerPauseUI.suicideButton.text = PlayerPauseUI.localization.format("Suicide_Button_Text"); PlayerPauseUI.suicideButton.tooltip = PlayerPauseUI.localization.format("Suicide_Button_Tooltip"); PlayerPauseUI.suicideButton.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButtonIconConfirm sleekButtonIconConfirm = PlayerPauseUI.suicideButton; if (PlayerPauseUI.< > f__mg$cache6 == null) { PlayerPauseUI.< > f__mg$cache6 = new Confirm(PlayerPauseUI.onClickedSuicideButton); } sleekButtonIconConfirm.onConfirmed = PlayerPauseUI.< > f__mg$cache6; PlayerPauseUI.suicideButton.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.suicideButton); if (!Provider.modeConfigData.Gameplay.Can_Suicide) { PlayerPauseUI.suicideButton.isInputable = false; SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = -100; sleekLabel.positionOffset_Y = 95; sleekLabel.positionScale_X = 0.5f; sleekLabel.positionScale_Y = 0.5f; sleekLabel.sizeOffset_X = 200; sleekLabel.sizeOffset_Y = 50; sleekLabel.text = PlayerPauseUI.localization.format("Suicide_Disabled"); sleekLabel.foregroundColor = Palette.COLOR_R; sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.fontSize = 32; PlayerPauseUI.container.add(sleekLabel); } PlayerPauseUI.spyBox = new SleekBox(); PlayerPauseUI.spyBox.positionOffset_Y = -310; PlayerPauseUI.spyBox.positionScale_X = 0.5f; PlayerPauseUI.spyBox.positionScale_Y = 0.5f; PlayerPauseUI.spyBox.sizeOffset_X = 660; PlayerPauseUI.spyBox.sizeOffset_Y = 500; PlayerPauseUI.container.add(PlayerPauseUI.spyBox); PlayerPauseUI.spyBox.isVisible = false; PlayerPauseUI.spyImage = new SleekImageTexture(); PlayerPauseUI.spyImage.positionOffset_X = 10; PlayerPauseUI.spyImage.positionOffset_Y = 10; PlayerPauseUI.spyImage.sizeOffset_X = 640; PlayerPauseUI.spyImage.sizeOffset_Y = 480; PlayerPauseUI.spyBox.add(PlayerPauseUI.spyImage); PlayerPauseUI.spyRefreshButton = new SleekButton(); PlayerPauseUI.spyRefreshButton.positionOffset_X = -205; PlayerPauseUI.spyRefreshButton.positionOffset_Y = 10; PlayerPauseUI.spyRefreshButton.positionScale_X = 0.5f; PlayerPauseUI.spyRefreshButton.positionScale_Y = 1f; PlayerPauseUI.spyRefreshButton.sizeOffset_X = 200; PlayerPauseUI.spyRefreshButton.sizeOffset_Y = 50; PlayerPauseUI.spyRefreshButton.text = PlayerPauseUI.localization.format("Spy_Refresh_Button_Text"); PlayerPauseUI.spyRefreshButton.tooltip = PlayerPauseUI.localization.format("Spy_Refresh_Button_Tooltip"); SleekButton sleekButton7 = PlayerPauseUI.spyRefreshButton; if (PlayerPauseUI.< > f__mg$cache7 == null) { PlayerPauseUI.< > f__mg$cache7 = new ClickedButton(PlayerPauseUI.onClickedSpyRefreshButton); } sleekButton7.onClickedButton = PlayerPauseUI.< > f__mg$cache7; PlayerPauseUI.spyRefreshButton.fontSize = 14; PlayerPauseUI.spyBox.add(PlayerPauseUI.spyRefreshButton); PlayerPauseUI.spySlayButton = new SleekButton(); PlayerPauseUI.spySlayButton.positionOffset_X = 5; PlayerPauseUI.spySlayButton.positionOffset_Y = 10; PlayerPauseUI.spySlayButton.positionScale_X = 0.5f; PlayerPauseUI.spySlayButton.positionScale_Y = 1f; PlayerPauseUI.spySlayButton.sizeOffset_X = 200; PlayerPauseUI.spySlayButton.sizeOffset_Y = 50; PlayerPauseUI.spySlayButton.text = PlayerPauseUI.localization.format("Spy_Slay_Button_Text"); PlayerPauseUI.spySlayButton.tooltip = PlayerPauseUI.localization.format("Spy_Slay_Button_Tooltip"); SleekButton sleekButton8 = PlayerPauseUI.spySlayButton; if (PlayerPauseUI.< > f__mg$cache8 == null) { PlayerPauseUI.< > f__mg$cache8 = new ClickedButton(PlayerPauseUI.onClickedSpySlayButton); } sleekButton8.onClickedButton = PlayerPauseUI.< > f__mg$cache8; PlayerPauseUI.spySlayButton.fontSize = 14; PlayerPauseUI.spyBox.add(PlayerPauseUI.spySlayButton); PlayerPauseUI.serverBox = new SleekBox(); PlayerPauseUI.serverBox.positionOffset_Y = -50; PlayerPauseUI.serverBox.positionScale_Y = 1f; PlayerPauseUI.serverBox.sizeOffset_X = -5; PlayerPauseUI.serverBox.sizeOffset_Y = 50; PlayerPauseUI.serverBox.sizeScale_X = 0.75f; PlayerPauseUI.serverBox.fontSize = 14; PlayerPauseUI.container.add(PlayerPauseUI.serverBox); PlayerPauseUI.favoriteButton = new SleekButtonIcon(null); PlayerPauseUI.favoriteButton.positionScale_X = 0.75f; PlayerPauseUI.favoriteButton.positionOffset_Y = -50; PlayerPauseUI.favoriteButton.positionOffset_X = 5; PlayerPauseUI.favoriteButton.positionScale_Y = 1f; PlayerPauseUI.favoriteButton.sizeOffset_X = -5; PlayerPauseUI.favoriteButton.sizeOffset_Y = 50; PlayerPauseUI.favoriteButton.sizeScale_X = 0.25f; PlayerPauseUI.favoriteButton.tooltip = PlayerPauseUI.localization.format("Favorite_Button_Tooltip"); PlayerPauseUI.favoriteButton.fontSize = 14; SleekButton sleekButton9 = PlayerPauseUI.favoriteButton; if (PlayerPauseUI.< > f__mg$cache9 == null) { PlayerPauseUI.< > f__mg$cache9 = new ClickedButton(PlayerPauseUI.onClickedFavoriteButton); } sleekButton9.onClickedButton = PlayerPauseUI.< > f__mg$cache9; PlayerPauseUI.container.add(PlayerPauseUI.favoriteButton); if (Provider.isServer) { PlayerPauseUI.favoriteButton.isVisible = false; PlayerPauseUI.serverBox.sizeScale_X = 1f; } new MenuConfigurationOptionsUI(); new MenuConfigurationDisplayUI(); new MenuConfigurationGraphicsUI(); new MenuConfigurationControlsUI(); PlayerPauseUI.updateFavorite(); if (PlayerPauseUI.< > f__mg$cacheA == null) { PlayerPauseUI.< > f__mg$cacheA = new PlayerSpyReady(PlayerPauseUI.onSpyReady); } Player.onSpyReady = PlayerPauseUI.< > f__mg$cacheA; }
// Token: 0x060032EC RID: 13036 RVA: 0x00149C74 File Offset: 0x00148074 public SleekLevel(LevelInfo level, bool isEditor) { base.init(); base.sizeOffset_X = 400; base.sizeOffset_Y = 100; this.button = new SleekButton(); this.button.sizeOffset_X = 0; this.button.sizeOffset_Y = 0; this.button.sizeScale_X = 1f; this.button.sizeScale_Y = 1f; if (level.isEditable || !isEditor) { this.button.onClickedButton = new ClickedButton(this.onClickedButton); } base.add(this.button); if (ReadWrite.fileExists(level.path + "/Icon.png", false, false)) { byte[] data = ReadWrite.readBytes(level.path + "/Icon.png", false, false); Texture2D texture2D = new Texture2D(380, 80, TextureFormat.ARGB32, false, true); texture2D.name = "Icon_" + level.name + "_List_Icon"; texture2D.hideFlags = HideFlags.HideAndDontSave; texture2D.LoadImage(data); this.icon = new SleekImageTexture(); this.icon.positionOffset_X = 10; this.icon.positionOffset_Y = 10; this.icon.sizeOffset_X = -20; this.icon.sizeOffset_Y = -20; this.icon.sizeScale_X = 1f; this.icon.sizeScale_Y = 1f; this.icon.texture = texture2D; this.icon.shouldDestroyTexture = true; this.button.add(this.icon); } this.nameLabel = new SleekLabel(); this.nameLabel.positionOffset_Y = 10; this.nameLabel.sizeScale_X = 1f; this.nameLabel.sizeOffset_Y = 50; this.nameLabel.fontAlignment = TextAnchor.MiddleCenter; this.nameLabel.fontSize = 14; this.button.add(this.nameLabel); Local local = Localization.tryRead(level.path, false); if (local != null && local.has("Name")) { this.nameLabel.text = local.format("Name"); } else { this.nameLabel.text = level.name; } this.infoLabel = new SleekLabel(); this.infoLabel.positionOffset_Y = 60; this.infoLabel.sizeScale_X = 1f; this.infoLabel.sizeOffset_Y = 30; this.infoLabel.fontAlignment = TextAnchor.MiddleCenter; string text = "#SIZE"; if (level.size == ELevelSize.TINY) { text = MenuPlaySingleplayerUI.localization.format("Tiny"); } else if (level.size == ELevelSize.SMALL) { text = MenuPlaySingleplayerUI.localization.format("Small"); } else if (level.size == ELevelSize.MEDIUM) { text = MenuPlaySingleplayerUI.localization.format("Medium"); } else if (level.size == ELevelSize.LARGE) { text = MenuPlaySingleplayerUI.localization.format("Large"); } else if (level.size == ELevelSize.INSANE) { text = MenuPlaySingleplayerUI.localization.format("Insane"); } string text2 = "#TYPE"; if (level.type == ELevelType.SURVIVAL) { text2 = MenuPlaySingleplayerUI.localization.format("Survival"); } else if (level.type == ELevelType.HORDE) { text2 = MenuPlaySingleplayerUI.localization.format("Horde"); } else if (level.type == ELevelType.ARENA) { text2 = MenuPlaySingleplayerUI.localization.format("Arena"); } this.infoLabel.text = MenuPlaySingleplayerUI.localization.format("Info", new object[] { text, text2 }); this.button.add(this.infoLabel); if (!level.isEditable && isEditor) { Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Workshop/MenuWorkshopEditor/MenuWorkshopEditor.unity3d"); SleekImageTexture sleekImageTexture = new SleekImageTexture(); sleekImageTexture.positionOffset_X = 20; sleekImageTexture.positionOffset_Y = -20; sleekImageTexture.positionScale_Y = 0.5f; sleekImageTexture.sizeOffset_X = 40; sleekImageTexture.sizeOffset_Y = 40; sleekImageTexture.texture = (Texture2D)bundle.load("Lock"); sleekImageTexture.backgroundTint = ESleekTint.FOREGROUND; this.button.add(sleekImageTexture); bundle.unload(); } if (level.configData != null && level.configData.Status != EMapStatus.NONE) { SleekNew sleek = new SleekNew(level.configData.Status == EMapStatus.UPDATED); if (this.icon != null) { this.icon.add(sleek); } else { base.add(sleek); } } if (level.configData != null && level.configData.Category == ESingleplayerMapCategory.CURATED && level.configData.CuratedMapMode == ECuratedMapMode.TIMED) { SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = -105; sleekLabel.positionScale_X = 1f; sleekLabel.sizeOffset_X = 100; sleekLabel.sizeOffset_Y = 30; sleekLabel.fontAlignment = TextAnchor.MiddleRight; sleekLabel.text = MenuPlaySingleplayerUI.localization.format("Curated_Map_Timed"); sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.foregroundColor = Color.green; if (level.configData.Status != EMapStatus.NONE) { sleekLabel.positionOffset_Y += 30; } SleekLabel sleekLabel2 = new SleekLabel(); sleekLabel2.positionOffset_X = -205; sleekLabel2.positionOffset_Y = -30; sleekLabel2.positionScale_X = 1f; sleekLabel2.positionScale_Y = 1f; sleekLabel2.sizeOffset_X = 200; sleekLabel2.sizeOffset_Y = 30; sleekLabel2.fontAlignment = TextAnchor.MiddleRight; sleekLabel2.text = MenuPlaySingleplayerUI.localization.format("Curated_Map_Timestamp", new object[] { level.configData.getCuratedMapTimestamp().ToString(MenuPlaySingleplayerUI.localization.format("Curated_Map_Timestamp_Format")) }); sleekLabel2.foregroundTint = ESleekTint.NONE; sleekLabel2.foregroundColor = Color.green; if (this.icon != null) { this.icon.add(sleekLabel); this.icon.add(sleekLabel2); } else { base.add(sleekLabel); base.add(sleekLabel2); } } }
// Token: 0x06003335 RID: 13109 RVA: 0x0014CA84 File Offset: 0x0014AE84 public SleekSkill(byte speciality, byte index, Skill skill) { base.init(); this.fontStyle = FontStyle.Bold; this.fontAlignment = TextAnchor.MiddleCenter; this.fontSize = SleekRender.FONT_SIZE; this.calculateContent(); for (byte b = 0; b < skill.max; b += 1) { SleekImageTexture sleekImageTexture = new SleekImageTexture(); sleekImageTexture.positionOffset_X = -20 - (int)(b * 20); sleekImageTexture.positionOffset_Y = 10; sleekImageTexture.positionScale_X = 1f; sleekImageTexture.sizeOffset_X = 10; sleekImageTexture.sizeOffset_Y = -10; sleekImageTexture.sizeScale_Y = 0.5f; if (b < skill.level) { sleekImageTexture.texture = (Texture2D)PlayerDashboardSkillsUI.icons.load("Unlocked"); } else { sleekImageTexture.texture = (Texture2D)PlayerDashboardSkillsUI.icons.load("Locked"); } base.add(sleekImageTexture); } base.add(new SleekLabel { positionOffset_X = 5, positionOffset_Y = 5, sizeOffset_X = -10, sizeOffset_Y = 30, sizeScale_X = 0.5f, fontAlignment = TextAnchor.UpperLeft, text = PlayerDashboardSkillsUI.localization.format("Skill", new object[] { PlayerDashboardSkillsUI.localization.format(string.Concat(new object[] { "Speciality_", speciality, "_Skill_", index })), PlayerDashboardSkillsUI.localization.format("Level_" + skill.level) }), foregroundColor = Palette.COLOR_Y, foregroundTint = ESleekTint.NONE, fontSize = 14 }); SleekImageTexture sleekImageTexture2 = new SleekImageTexture(); sleekImageTexture2.positionOffset_X = 10; sleekImageTexture2.positionOffset_Y = -10; sleekImageTexture2.positionScale_Y = 0.5f; sleekImageTexture2.sizeOffset_X = 20; sleekImageTexture2.sizeOffset_Y = 20; sleekImageTexture2.backgroundTint = ESleekTint.FOREGROUND; byte b2 = 0; while ((int)b2 < PlayerSkills.SKILLSETS.Length) { byte b3 = 0; while ((int)b3 < PlayerSkills.SKILLSETS[(int)b2].Length) { SpecialitySkillPair specialitySkillPair = PlayerSkills.SKILLSETS[(int)b2][(int)b3]; if ((int)speciality == specialitySkillPair.speciality && (int)index == specialitySkillPair.skill) { sleekImageTexture2.texture = (Texture2D)MenuSurvivorsCharacterUI.icons.load("Skillset_" + b2); break; } b3 += 1; } b2 += 1; } base.add(sleekImageTexture2); base.add(new SleekLabel { positionOffset_X = 5, positionOffset_Y = -35, positionScale_Y = 1f, sizeOffset_X = -10, sizeOffset_Y = 30, sizeScale_X = 0.5f, foregroundTint = ESleekTint.NONE, fontAlignment = TextAnchor.LowerLeft, text = PlayerDashboardSkillsUI.localization.format(string.Concat(new object[] { "Speciality_", speciality, "_Skill_", index, "_Tooltip" })) }); if (skill.level > 0) { base.add(new SleekLabel { positionOffset_X = 5, positionOffset_Y = 5, positionScale_X = 0.25f, sizeOffset_X = -10, sizeOffset_Y = -10, sizeScale_X = 0.5f, sizeScale_Y = 0.5f, foregroundTint = ESleekTint.NONE, fontAlignment = TextAnchor.MiddleCenter, text = PlayerDashboardSkillsUI.localization.format("Bonus_Current", new object[] { PlayerDashboardSkillsUI.localization.format(string.Concat(new object[] { "Speciality_", speciality, "_Skill_", index, "_Level_", skill.level })) }), foregroundColor = Palette.COLOR_G }); } if (skill.level < skill.max) { base.add(new SleekLabel { positionOffset_X = 5, positionOffset_Y = 5, positionScale_X = 0.25f, positionScale_Y = 0.5f, sizeOffset_X = -10, sizeOffset_Y = -10, sizeScale_X = 0.5f, sizeScale_Y = 0.5f, fontAlignment = TextAnchor.MiddleCenter, foregroundTint = ESleekTint.NONE, text = PlayerDashboardSkillsUI.localization.format("Bonus_Next", new object[] { PlayerDashboardSkillsUI.localization.format(string.Concat(new object[] { "Speciality_", speciality, "_Skill_", index, "_Level_", (int)(skill.level + 1) })) }), foregroundColor = Palette.COLOR_G }); } SleekLabel sleekLabel = new SleekLabel(); sleekLabel.positionOffset_X = 5; sleekLabel.positionOffset_Y = -35; sleekLabel.positionScale_X = 0.5f; sleekLabel.positionScale_Y = 1f; sleekLabel.sizeOffset_X = -10; sleekLabel.sizeOffset_Y = 30; sleekLabel.sizeScale_X = 0.5f; sleekLabel.foregroundColor = Palette.COLOR_Y; sleekLabel.foregroundTint = ESleekTint.NONE; sleekLabel.fontAlignment = TextAnchor.LowerRight; if (skill.level < skill.max) { sleekLabel.text = PlayerDashboardSkillsUI.localization.format("Cost", new object[] { Player.player.skills.cost((int)speciality, (int)index) }); } else { sleekLabel.text = PlayerDashboardSkillsUI.localization.format("Full"); } base.add(sleekLabel); base.tooltip = PlayerDashboardSkillsUI.localization.format(string.Concat(new object[] { "Speciality_", speciality, "_Skill_", index, "_Tooltip" })); }