// Token: 0x06002473 RID: 9331 RVA: 0x000AAD68 File Offset: 0x000A8F68 private void ApplyButtonStyle(ref UISkinData.ButtonStyle buttonStyle) { if (this.useRecommendedMaterial) { this.button.image.material = buttonStyle.material; } this.button.colors = buttonStyle.colors; if (this.useRecommendedImage) { this.button.image.sprite = buttonStyle.sprite; } if (this.useRecommendedButtonWidth) { ((RectTransform)base.transform).SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, buttonStyle.recommendedWidth); } if (this.useRecommendedButtonHeight) { ((RectTransform)base.transform).SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, buttonStyle.recommendedHeight); } if (this.layoutElement) { if (this.useRecommendedButtonWidth) { this.layoutElement.preferredWidth = buttonStyle.recommendedWidth; } if (this.useRecommendedButtonHeight) { this.layoutElement.preferredHeight = buttonStyle.recommendedHeight; } } this.UpdateLabelStyle(ref buttonStyle); }
// Token: 0x06002471 RID: 9329 RVA: 0x000AACF8 File Offset: 0x000A8EF8 private void UpdateLabelStyle(ref UISkinData.ButtonStyle buttonStyle) { if (this.useRecommendedLabel) { TextMeshProUGUI componentInChildren = this.button.GetComponentInChildren <TextMeshProUGUI>(); if (componentInChildren) { if (this.button.interactable) { buttonStyle.interactableTextStyle.Apply(componentInChildren, this.useRecommendedAlignment); return; } buttonStyle.disabledTextStyle.Apply(componentInChildren, this.useRecommendedAlignment); } } }