Files
Dec2017-Script-Dump/UnityEngine/GUIWordWrapSizer.cs
T
2026-06-04 11:42:34 +02:00

72 lines
1.7 KiB
C#

using System;
namespace UnityEngine
{
// Token: 0x0200026E RID: 622
internal sealed class GUIWordWrapSizer : GUILayoutEntry
{
// Token: 0x06002A67 RID: 10855 RVA: 0x00036EC4 File Offset: 0x000350C4
public GUIWordWrapSizer(GUIStyle style, GUIContent content, GUILayoutOption[] options)
: base(0f, 0f, 0f, 0f, style)
{
this.m_Content = new GUIContent(content);
this.ApplyOptions(options);
this.m_ForcedMinHeight = this.minHeight;
this.m_ForcedMaxHeight = this.maxHeight;
}
// Token: 0x06002A68 RID: 10856 RVA: 0x00036F18 File Offset: 0x00035118
public override void CalcWidth()
{
if (this.minWidth == 0f || this.maxWidth == 0f)
{
float num;
float num2;
base.style.CalcMinMaxWidth(this.m_Content, out num, out num2);
if (this.minWidth == 0f)
{
this.minWidth = num;
}
if (this.maxWidth == 0f)
{
this.maxWidth = num2;
}
}
}
// Token: 0x06002A69 RID: 10857 RVA: 0x00036F8C File Offset: 0x0003518C
public override void CalcHeight()
{
if (this.m_ForcedMinHeight == 0f || this.m_ForcedMaxHeight == 0f)
{
float num = base.style.CalcHeight(this.m_Content, this.rect.width);
if (this.m_ForcedMinHeight == 0f)
{
this.minHeight = num;
}
else
{
this.minHeight = this.m_ForcedMinHeight;
}
if (this.m_ForcedMaxHeight == 0f)
{
this.maxHeight = num;
}
else
{
this.maxHeight = this.m_ForcedMaxHeight;
}
}
}
// Token: 0x04000791 RID: 1937
private readonly GUIContent m_Content;
// Token: 0x04000792 RID: 1938
private readonly float m_ForcedMinHeight;
// Token: 0x04000793 RID: 1939
private readonly float m_ForcedMaxHeight;
}
}