999 lines
32 KiB
C#
999 lines
32 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000277 RID: 631
|
|
[RequiredByNativeCode]
|
|
[Serializable]
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public sealed class GUIStyle
|
|
{
|
|
// Token: 0x06002AF1 RID: 10993 RVA: 0x00038CF8 File Offset: 0x00036EF8
|
|
public GUIStyle()
|
|
{
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x06002AF2 RID: 10994 RVA: 0x00038D08 File Offset: 0x00036F08
|
|
public GUIStyle(GUIStyle other)
|
|
{
|
|
this.InitCopy(other);
|
|
}
|
|
|
|
// Token: 0x06002AF3 RID: 10995 RVA: 0x00038D18 File Offset: 0x00036F18
|
|
~GUIStyle()
|
|
{
|
|
this.Cleanup();
|
|
}
|
|
|
|
// Token: 0x06002AF4 RID: 10996 RVA: 0x00038D48 File Offset: 0x00036F48
|
|
internal static void CleanupRoots()
|
|
{
|
|
GUIStyle.s_None = null;
|
|
}
|
|
|
|
// Token: 0x06002AF5 RID: 10997 RVA: 0x00038D54 File Offset: 0x00036F54
|
|
internal void InternalOnAfterDeserialize()
|
|
{
|
|
this.m_FontInternal = this.GetFontInternalDuringLoadingThread();
|
|
this.m_Normal = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(0));
|
|
this.m_Hover = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(1));
|
|
this.m_Active = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(2));
|
|
this.m_Focused = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(3));
|
|
this.m_OnNormal = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(4));
|
|
this.m_OnHover = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(5));
|
|
this.m_OnActive = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(6));
|
|
this.m_OnFocused = GUIStyleState.ProduceGUIStyleStateFromDeserialization(this, this.GetStyleStatePtr(7));
|
|
}
|
|
|
|
// Token: 0x170009DF RID: 2527
|
|
// (get) Token: 0x06002AF6 RID: 10998 RVA: 0x00038E08 File Offset: 0x00037008
|
|
// (set) Token: 0x06002AF7 RID: 10999 RVA: 0x00038E44 File Offset: 0x00037044
|
|
public GUIStyleState normal
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Normal == null)
|
|
{
|
|
this.m_Normal = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(0));
|
|
}
|
|
return this.m_Normal;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(0, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E0 RID: 2528
|
|
// (get) Token: 0x06002AF8 RID: 11000 RVA: 0x00038E54 File Offset: 0x00037054
|
|
// (set) Token: 0x06002AF9 RID: 11001 RVA: 0x00038E90 File Offset: 0x00037090
|
|
public GUIStyleState hover
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Hover == null)
|
|
{
|
|
this.m_Hover = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(1));
|
|
}
|
|
return this.m_Hover;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(1, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E1 RID: 2529
|
|
// (get) Token: 0x06002AFA RID: 11002 RVA: 0x00038EA0 File Offset: 0x000370A0
|
|
// (set) Token: 0x06002AFB RID: 11003 RVA: 0x00038EDC File Offset: 0x000370DC
|
|
public GUIStyleState active
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Active == null)
|
|
{
|
|
this.m_Active = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(2));
|
|
}
|
|
return this.m_Active;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(2, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E2 RID: 2530
|
|
// (get) Token: 0x06002AFC RID: 11004 RVA: 0x00038EEC File Offset: 0x000370EC
|
|
// (set) Token: 0x06002AFD RID: 11005 RVA: 0x00038F28 File Offset: 0x00037128
|
|
public GUIStyleState onNormal
|
|
{
|
|
get
|
|
{
|
|
if (this.m_OnNormal == null)
|
|
{
|
|
this.m_OnNormal = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(4));
|
|
}
|
|
return this.m_OnNormal;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(4, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E3 RID: 2531
|
|
// (get) Token: 0x06002AFE RID: 11006 RVA: 0x00038F38 File Offset: 0x00037138
|
|
// (set) Token: 0x06002AFF RID: 11007 RVA: 0x00038F74 File Offset: 0x00037174
|
|
public GUIStyleState onHover
|
|
{
|
|
get
|
|
{
|
|
if (this.m_OnHover == null)
|
|
{
|
|
this.m_OnHover = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(5));
|
|
}
|
|
return this.m_OnHover;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(5, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E4 RID: 2532
|
|
// (get) Token: 0x06002B00 RID: 11008 RVA: 0x00038F84 File Offset: 0x00037184
|
|
// (set) Token: 0x06002B01 RID: 11009 RVA: 0x00038FC0 File Offset: 0x000371C0
|
|
public GUIStyleState onActive
|
|
{
|
|
get
|
|
{
|
|
if (this.m_OnActive == null)
|
|
{
|
|
this.m_OnActive = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(6));
|
|
}
|
|
return this.m_OnActive;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(6, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E5 RID: 2533
|
|
// (get) Token: 0x06002B02 RID: 11010 RVA: 0x00038FD0 File Offset: 0x000371D0
|
|
// (set) Token: 0x06002B03 RID: 11011 RVA: 0x0003900C File Offset: 0x0003720C
|
|
public GUIStyleState focused
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Focused == null)
|
|
{
|
|
this.m_Focused = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(3));
|
|
}
|
|
return this.m_Focused;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(3, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E6 RID: 2534
|
|
// (get) Token: 0x06002B04 RID: 11012 RVA: 0x0003901C File Offset: 0x0003721C
|
|
// (set) Token: 0x06002B05 RID: 11013 RVA: 0x00039058 File Offset: 0x00037258
|
|
public GUIStyleState onFocused
|
|
{
|
|
get
|
|
{
|
|
if (this.m_OnFocused == null)
|
|
{
|
|
this.m_OnFocused = GUIStyleState.GetGUIStyleState(this, this.GetStyleStatePtr(7));
|
|
}
|
|
return this.m_OnFocused;
|
|
}
|
|
set
|
|
{
|
|
this.AssignStyleState(7, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E7 RID: 2535
|
|
// (get) Token: 0x06002B06 RID: 11014 RVA: 0x00039068 File Offset: 0x00037268
|
|
// (set) Token: 0x06002B07 RID: 11015 RVA: 0x000390A4 File Offset: 0x000372A4
|
|
public RectOffset border
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Border == null)
|
|
{
|
|
this.m_Border = new RectOffset(this, this.GetRectOffsetPtr(0));
|
|
}
|
|
return this.m_Border;
|
|
}
|
|
set
|
|
{
|
|
this.AssignRectOffset(0, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E8 RID: 2536
|
|
// (get) Token: 0x06002B08 RID: 11016 RVA: 0x000390B4 File Offset: 0x000372B4
|
|
// (set) Token: 0x06002B09 RID: 11017 RVA: 0x000390F0 File Offset: 0x000372F0
|
|
public RectOffset margin
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Margin == null)
|
|
{
|
|
this.m_Margin = new RectOffset(this, this.GetRectOffsetPtr(1));
|
|
}
|
|
return this.m_Margin;
|
|
}
|
|
set
|
|
{
|
|
this.AssignRectOffset(1, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009E9 RID: 2537
|
|
// (get) Token: 0x06002B0A RID: 11018 RVA: 0x00039100 File Offset: 0x00037300
|
|
// (set) Token: 0x06002B0B RID: 11019 RVA: 0x0003913C File Offset: 0x0003733C
|
|
public RectOffset padding
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Padding == null)
|
|
{
|
|
this.m_Padding = new RectOffset(this, this.GetRectOffsetPtr(2));
|
|
}
|
|
return this.m_Padding;
|
|
}
|
|
set
|
|
{
|
|
this.AssignRectOffset(2, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009EA RID: 2538
|
|
// (get) Token: 0x06002B0C RID: 11020 RVA: 0x0003914C File Offset: 0x0003734C
|
|
// (set) Token: 0x06002B0D RID: 11021 RVA: 0x00039188 File Offset: 0x00037388
|
|
public RectOffset overflow
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Overflow == null)
|
|
{
|
|
this.m_Overflow = new RectOffset(this, this.GetRectOffsetPtr(3));
|
|
}
|
|
return this.m_Overflow;
|
|
}
|
|
set
|
|
{
|
|
this.AssignRectOffset(3, value.m_Ptr);
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009EB RID: 2539
|
|
// (get) Token: 0x06002B0E RID: 11022 RVA: 0x00039198 File Offset: 0x00037398
|
|
// (set) Token: 0x06002B0F RID: 11023 RVA: 0x000391B4 File Offset: 0x000373B4
|
|
[Obsolete("warning Don't use clipOffset - put things inside BeginGroup instead. This functionality will be removed in a later version.")]
|
|
public Vector2 clipOffset
|
|
{
|
|
get
|
|
{
|
|
return this.Internal_clipOffset;
|
|
}
|
|
set
|
|
{
|
|
this.Internal_clipOffset = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009EC RID: 2540
|
|
// (get) Token: 0x06002B10 RID: 11024 RVA: 0x000391C0 File Offset: 0x000373C0
|
|
// (set) Token: 0x06002B11 RID: 11025 RVA: 0x000391DC File Offset: 0x000373DC
|
|
public Font font
|
|
{
|
|
get
|
|
{
|
|
return this.GetFontInternal();
|
|
}
|
|
set
|
|
{
|
|
this.SetFontInternal(value);
|
|
this.m_FontInternal = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170009ED RID: 2541
|
|
// (get) Token: 0x06002B12 RID: 11026 RVA: 0x000391F0 File Offset: 0x000373F0
|
|
public float lineHeight
|
|
{
|
|
get
|
|
{
|
|
return Mathf.Round(GUIStyle.Internal_GetLineHeight(this.m_Ptr));
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B13 RID: 11027 RVA: 0x00039218 File Offset: 0x00037418
|
|
private static void Internal_Draw(IntPtr target, Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
|
|
{
|
|
Internal_DrawArguments internal_DrawArguments = default(Internal_DrawArguments);
|
|
internal_DrawArguments.target = target;
|
|
internal_DrawArguments.position = position;
|
|
internal_DrawArguments.isHover = ((!isHover) ? 0 : 1);
|
|
internal_DrawArguments.isActive = ((!isActive) ? 0 : 1);
|
|
internal_DrawArguments.on = ((!on) ? 0 : 1);
|
|
internal_DrawArguments.hasKeyboardFocus = ((!hasKeyboardFocus) ? 0 : 1);
|
|
GUIStyle.Internal_Draw(content, ref internal_DrawArguments);
|
|
}
|
|
|
|
// Token: 0x06002B14 RID: 11028 RVA: 0x0003929C File Offset: 0x0003749C
|
|
public void Draw(Rect position, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
|
|
{
|
|
GUIStyle.Internal_Draw(this.m_Ptr, position, GUIContent.none, isHover, isActive, on, hasKeyboardFocus);
|
|
}
|
|
|
|
// Token: 0x06002B15 RID: 11029 RVA: 0x000392B8 File Offset: 0x000374B8
|
|
public void Draw(Rect position, string text, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
|
|
{
|
|
GUIStyle.Internal_Draw(this.m_Ptr, position, GUIContent.Temp(text), isHover, isActive, on, hasKeyboardFocus);
|
|
}
|
|
|
|
// Token: 0x06002B16 RID: 11030 RVA: 0x000392D4 File Offset: 0x000374D4
|
|
public void Draw(Rect position, Texture image, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
|
|
{
|
|
GUIStyle.Internal_Draw(this.m_Ptr, position, GUIContent.Temp(image), isHover, isActive, on, hasKeyboardFocus);
|
|
}
|
|
|
|
// Token: 0x06002B17 RID: 11031 RVA: 0x000392F0 File Offset: 0x000374F0
|
|
public void Draw(Rect position, GUIContent content, bool isHover, bool isActive, bool on, bool hasKeyboardFocus)
|
|
{
|
|
GUIStyle.Internal_Draw(this.m_Ptr, position, content, isHover, isActive, on, hasKeyboardFocus);
|
|
}
|
|
|
|
// Token: 0x06002B18 RID: 11032 RVA: 0x00039308 File Offset: 0x00037508
|
|
public void Draw(Rect position, GUIContent content, int controlID)
|
|
{
|
|
this.Draw(position, content, controlID, false);
|
|
}
|
|
|
|
// Token: 0x06002B19 RID: 11033 RVA: 0x00039318 File Offset: 0x00037518
|
|
public void Draw(Rect position, GUIContent content, int controlID, bool on)
|
|
{
|
|
if (content != null)
|
|
{
|
|
GUIStyle.Internal_Draw2(this.m_Ptr, position, content, controlID, on);
|
|
}
|
|
else
|
|
{
|
|
Debug.LogError("Style.Draw may not be called with GUIContent that is null.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B1A RID: 11034 RVA: 0x00039340 File Offset: 0x00037540
|
|
public void DrawCursor(Rect position, GUIContent content, int controlID, int Character)
|
|
{
|
|
Event current = Event.current;
|
|
if (current.type == EventType.Repaint)
|
|
{
|
|
Color cursorColor = new Color(0f, 0f, 0f, 0f);
|
|
float cursorFlashSpeed = GUI.skin.settings.cursorFlashSpeed;
|
|
float num = (Time.realtimeSinceStartup - GUIStyle.Internal_GetCursorFlashOffset()) % cursorFlashSpeed / cursorFlashSpeed;
|
|
if (cursorFlashSpeed == 0f || num < 0.5f)
|
|
{
|
|
cursorColor = GUI.skin.settings.cursorColor;
|
|
}
|
|
GUIStyle.Internal_DrawCursor(this.m_Ptr, position, content, Character, cursorColor);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B1B RID: 11035 RVA: 0x000393D8 File Offset: 0x000375D8
|
|
internal void DrawWithTextSelection(Rect position, GUIContent content, bool isActive, bool hasKeyboardFocus, int firstSelectedCharacter, int lastSelectedCharacter, bool drawSelectionAsComposition)
|
|
{
|
|
Event current = Event.current;
|
|
Color cursorColor = new Color(0f, 0f, 0f, 0f);
|
|
float cursorFlashSpeed = GUI.skin.settings.cursorFlashSpeed;
|
|
float num = (Time.realtimeSinceStartup - GUIStyle.Internal_GetCursorFlashOffset()) % cursorFlashSpeed / cursorFlashSpeed;
|
|
if (cursorFlashSpeed == 0f || num < 0.5f)
|
|
{
|
|
cursorColor = GUI.skin.settings.cursorColor;
|
|
}
|
|
Internal_DrawWithTextSelectionArguments internal_DrawWithTextSelectionArguments = default(Internal_DrawWithTextSelectionArguments);
|
|
internal_DrawWithTextSelectionArguments.target = this.m_Ptr;
|
|
internal_DrawWithTextSelectionArguments.position = position;
|
|
internal_DrawWithTextSelectionArguments.firstPos = firstSelectedCharacter;
|
|
internal_DrawWithTextSelectionArguments.lastPos = lastSelectedCharacter;
|
|
internal_DrawWithTextSelectionArguments.cursorColor = cursorColor;
|
|
internal_DrawWithTextSelectionArguments.selectionColor = GUI.skin.settings.selectionColor;
|
|
internal_DrawWithTextSelectionArguments.isHover = ((!position.Contains(current.mousePosition)) ? 0 : 1);
|
|
internal_DrawWithTextSelectionArguments.isActive = ((!isActive) ? 0 : 1);
|
|
internal_DrawWithTextSelectionArguments.on = 0;
|
|
internal_DrawWithTextSelectionArguments.hasKeyboardFocus = ((!hasKeyboardFocus) ? 0 : 1);
|
|
internal_DrawWithTextSelectionArguments.drawSelectionAsComposition = ((!drawSelectionAsComposition) ? 0 : 1);
|
|
GUIStyle.Internal_DrawWithTextSelection(content, ref internal_DrawWithTextSelectionArguments);
|
|
}
|
|
|
|
// Token: 0x06002B1C RID: 11036 RVA: 0x00039508 File Offset: 0x00037708
|
|
internal void DrawWithTextSelection(Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter, bool drawSelectionAsComposition)
|
|
{
|
|
this.DrawWithTextSelection(position, content, controlID == GUIUtility.hotControl, controlID == GUIUtility.keyboardControl && GUIStyle.showKeyboardFocus, firstSelectedCharacter, lastSelectedCharacter, drawSelectionAsComposition);
|
|
}
|
|
|
|
// Token: 0x06002B1D RID: 11037 RVA: 0x00039534 File Offset: 0x00037734
|
|
public void DrawWithTextSelection(Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter)
|
|
{
|
|
this.DrawWithTextSelection(position, content, controlID, firstSelectedCharacter, lastSelectedCharacter, false);
|
|
}
|
|
|
|
// Token: 0x06002B1E RID: 11038 RVA: 0x00039548 File Offset: 0x00037748
|
|
public static implicit operator GUIStyle(string str)
|
|
{
|
|
GUIStyle guistyle;
|
|
if (GUISkin.current == null)
|
|
{
|
|
Debug.LogError("Unable to use a named GUIStyle without a current skin. Most likely you need to move your GUIStyle initialization code to OnGUI");
|
|
guistyle = GUISkin.error;
|
|
}
|
|
else
|
|
{
|
|
guistyle = GUISkin.current.GetStyle(str);
|
|
}
|
|
return guistyle;
|
|
}
|
|
|
|
// Token: 0x170009EE RID: 2542
|
|
// (get) Token: 0x06002B1F RID: 11039 RVA: 0x00039590 File Offset: 0x00037790
|
|
public static GUIStyle none
|
|
{
|
|
get
|
|
{
|
|
if (GUIStyle.s_None == null)
|
|
{
|
|
GUIStyle.s_None = new GUIStyle();
|
|
}
|
|
return GUIStyle.s_None;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B20 RID: 11040 RVA: 0x000395C0 File Offset: 0x000377C0
|
|
public Vector2 GetCursorPixelPosition(Rect position, GUIContent content, int cursorStringIndex)
|
|
{
|
|
Vector2 vector;
|
|
GUIStyle.Internal_GetCursorPixelPosition(this.m_Ptr, position, content, cursorStringIndex, out vector);
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06002B21 RID: 11041 RVA: 0x000395E8 File Offset: 0x000377E8
|
|
public int GetCursorStringIndex(Rect position, GUIContent content, Vector2 cursorPixelPosition)
|
|
{
|
|
return GUIStyle.Internal_GetCursorStringIndex(this.m_Ptr, position, content, cursorPixelPosition);
|
|
}
|
|
|
|
// Token: 0x06002B22 RID: 11042 RVA: 0x0003960C File Offset: 0x0003780C
|
|
internal int GetNumCharactersThatFitWithinWidth(string text, float width)
|
|
{
|
|
return GUIStyle.Internal_GetNumCharactersThatFitWithinWidth(this.m_Ptr, text, width);
|
|
}
|
|
|
|
// Token: 0x06002B23 RID: 11043 RVA: 0x00039630 File Offset: 0x00037830
|
|
public Vector2 CalcSize(GUIContent content)
|
|
{
|
|
Vector2 vector;
|
|
GUIStyle.Internal_CalcSize(this.m_Ptr, content, out vector);
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06002B24 RID: 11044 RVA: 0x00039654 File Offset: 0x00037854
|
|
internal Vector2 CalcSizeWithConstraints(GUIContent content, Vector2 constraints)
|
|
{
|
|
Vector2 vector;
|
|
GUIStyle.Internal_CalcSizeWithConstraints(this.m_Ptr, content, constraints, out vector);
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06002B25 RID: 11045 RVA: 0x0003967C File Offset: 0x0003787C
|
|
public Vector2 CalcScreenSize(Vector2 contentSize)
|
|
{
|
|
return new Vector2((this.fixedWidth == 0f) ? Mathf.Ceil(contentSize.x + (float)this.padding.left + (float)this.padding.right) : this.fixedWidth, (this.fixedHeight == 0f) ? Mathf.Ceil(contentSize.y + (float)this.padding.top + (float)this.padding.bottom) : this.fixedHeight);
|
|
}
|
|
|
|
// Token: 0x06002B26 RID: 11046 RVA: 0x00039718 File Offset: 0x00037918
|
|
public float CalcHeight(GUIContent content, float width)
|
|
{
|
|
return GUIStyle.Internal_CalcHeight(this.m_Ptr, content, width);
|
|
}
|
|
|
|
// Token: 0x170009EF RID: 2543
|
|
// (get) Token: 0x06002B27 RID: 11047 RVA: 0x0003973C File Offset: 0x0003793C
|
|
public bool isHeightDependantOnWidth
|
|
{
|
|
get
|
|
{
|
|
return this.fixedHeight == 0f && this.wordWrap && this.imagePosition != ImagePosition.ImageOnly;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B28 RID: 11048 RVA: 0x00039780 File Offset: 0x00037980
|
|
public void CalcMinMaxWidth(GUIContent content, out float minWidth, out float maxWidth)
|
|
{
|
|
GUIStyle.Internal_CalcMinMaxWidth(this.m_Ptr, content, out minWidth, out maxWidth);
|
|
}
|
|
|
|
// Token: 0x06002B29 RID: 11049 RVA: 0x00039794 File Offset: 0x00037994
|
|
public override string ToString()
|
|
{
|
|
return UnityString.Format("GUIStyle '{0}'", new object[] { this.name });
|
|
}
|
|
|
|
// Token: 0x06002B2A RID: 11050
|
|
[ThreadAndSerializationSafe]
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void Init();
|
|
|
|
// Token: 0x06002B2B RID: 11051
|
|
[ThreadAndSerializationSafe]
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void InitCopy(GUIStyle other);
|
|
|
|
// Token: 0x06002B2C RID: 11052
|
|
[ThreadAndSerializationSafe]
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void Cleanup();
|
|
|
|
// Token: 0x170009F0 RID: 2544
|
|
// (get) Token: 0x06002B2D RID: 11053
|
|
// (set) Token: 0x06002B2E RID: 11054
|
|
public extern string name
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x06002B2F RID: 11055 RVA: 0x000397C4 File Offset: 0x000379C4
|
|
[ThreadAndSerializationSafe]
|
|
private IntPtr GetStyleStatePtr(int idx)
|
|
{
|
|
IntPtr intPtr;
|
|
GUIStyle.INTERNAL_CALL_GetStyleStatePtr(this, idx, out intPtr);
|
|
return intPtr;
|
|
}
|
|
|
|
// Token: 0x06002B30 RID: 11056
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_GetStyleStatePtr(GUIStyle self, int idx, out IntPtr value);
|
|
|
|
// Token: 0x06002B31 RID: 11057
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void AssignStyleState(int idx, IntPtr srcStyleState);
|
|
|
|
// Token: 0x06002B32 RID: 11058 RVA: 0x000397E4 File Offset: 0x000379E4
|
|
private IntPtr GetRectOffsetPtr(int idx)
|
|
{
|
|
IntPtr intPtr;
|
|
GUIStyle.INTERNAL_CALL_GetRectOffsetPtr(this, idx, out intPtr);
|
|
return intPtr;
|
|
}
|
|
|
|
// Token: 0x06002B33 RID: 11059
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_GetRectOffsetPtr(GUIStyle self, int idx, out IntPtr value);
|
|
|
|
// Token: 0x06002B34 RID: 11060
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void AssignRectOffset(int idx, IntPtr srcRectOffset);
|
|
|
|
// Token: 0x170009F1 RID: 2545
|
|
// (get) Token: 0x06002B35 RID: 11061
|
|
// (set) Token: 0x06002B36 RID: 11062
|
|
public extern ImagePosition imagePosition
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009F2 RID: 2546
|
|
// (get) Token: 0x06002B37 RID: 11063
|
|
// (set) Token: 0x06002B38 RID: 11064
|
|
public extern TextAnchor alignment
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009F3 RID: 2547
|
|
// (get) Token: 0x06002B39 RID: 11065
|
|
// (set) Token: 0x06002B3A RID: 11066
|
|
public extern bool wordWrap
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009F4 RID: 2548
|
|
// (get) Token: 0x06002B3B RID: 11067
|
|
// (set) Token: 0x06002B3C RID: 11068
|
|
public extern TextClipping clipping
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009F5 RID: 2549
|
|
// (get) Token: 0x06002B3D RID: 11069 RVA: 0x00039804 File Offset: 0x00037A04
|
|
// (set) Token: 0x06002B3E RID: 11070 RVA: 0x00039824 File Offset: 0x00037A24
|
|
public Vector2 contentOffset
|
|
{
|
|
get
|
|
{
|
|
Vector2 vector;
|
|
this.INTERNAL_get_contentOffset(out vector);
|
|
return vector;
|
|
}
|
|
set
|
|
{
|
|
this.INTERNAL_set_contentOffset(ref value);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B3F RID: 11071
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void INTERNAL_get_contentOffset(out Vector2 value);
|
|
|
|
// Token: 0x06002B40 RID: 11072
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void INTERNAL_set_contentOffset(ref Vector2 value);
|
|
|
|
// Token: 0x170009F6 RID: 2550
|
|
// (get) Token: 0x06002B41 RID: 11073 RVA: 0x00039830 File Offset: 0x00037A30
|
|
// (set) Token: 0x06002B42 RID: 11074 RVA: 0x00039850 File Offset: 0x00037A50
|
|
internal Vector2 Internal_clipOffset
|
|
{
|
|
get
|
|
{
|
|
Vector2 vector;
|
|
this.INTERNAL_get_Internal_clipOffset(out vector);
|
|
return vector;
|
|
}
|
|
set
|
|
{
|
|
this.INTERNAL_set_Internal_clipOffset(ref value);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B43 RID: 11075
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void INTERNAL_get_Internal_clipOffset(out Vector2 value);
|
|
|
|
// Token: 0x06002B44 RID: 11076
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void INTERNAL_set_Internal_clipOffset(ref Vector2 value);
|
|
|
|
// Token: 0x170009F7 RID: 2551
|
|
// (get) Token: 0x06002B45 RID: 11077
|
|
// (set) Token: 0x06002B46 RID: 11078
|
|
public extern float fixedWidth
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009F8 RID: 2552
|
|
// (get) Token: 0x06002B47 RID: 11079
|
|
// (set) Token: 0x06002B48 RID: 11080
|
|
public extern float fixedHeight
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009F9 RID: 2553
|
|
// (get) Token: 0x06002B49 RID: 11081
|
|
// (set) Token: 0x06002B4A RID: 11082
|
|
public extern bool stretchWidth
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009FA RID: 2554
|
|
// (get) Token: 0x06002B4B RID: 11083
|
|
// (set) Token: 0x06002B4C RID: 11084
|
|
public extern bool stretchHeight
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x06002B4D RID: 11085
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern float Internal_GetLineHeight(IntPtr target);
|
|
|
|
// Token: 0x06002B4E RID: 11086
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern void SetFontInternal(Font value);
|
|
|
|
// Token: 0x06002B4F RID: 11087
|
|
[ThreadAndSerializationSafe]
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern Font GetFontInternalDuringLoadingThread();
|
|
|
|
// Token: 0x06002B50 RID: 11088
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private extern Font GetFontInternal();
|
|
|
|
// Token: 0x170009FB RID: 2555
|
|
// (get) Token: 0x06002B51 RID: 11089
|
|
// (set) Token: 0x06002B52 RID: 11090
|
|
public extern int fontSize
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009FC RID: 2556
|
|
// (get) Token: 0x06002B53 RID: 11091
|
|
// (set) Token: 0x06002B54 RID: 11092
|
|
public extern FontStyle fontStyle
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x170009FD RID: 2557
|
|
// (get) Token: 0x06002B55 RID: 11093
|
|
// (set) Token: 0x06002B56 RID: 11094
|
|
public extern bool richText
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x06002B57 RID: 11095
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void Internal_Draw(GUIContent content, ref Internal_DrawArguments arguments);
|
|
|
|
// Token: 0x06002B58 RID: 11096 RVA: 0x0003985C File Offset: 0x00037A5C
|
|
private static void Internal_Draw2(IntPtr style, Rect position, GUIContent content, int controlID, bool on)
|
|
{
|
|
GUIStyle.INTERNAL_CALL_Internal_Draw2(style, ref position, content, controlID, on);
|
|
}
|
|
|
|
// Token: 0x06002B59 RID: 11097
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_Internal_Draw2(IntPtr style, ref Rect position, GUIContent content, int controlID, bool on);
|
|
|
|
// Token: 0x06002B5A RID: 11098 RVA: 0x0003986C File Offset: 0x00037A6C
|
|
internal static void SetMouseTooltip(string tooltip, Rect screenRect)
|
|
{
|
|
GUIStyle.INTERNAL_CALL_SetMouseTooltip(tooltip, ref screenRect);
|
|
}
|
|
|
|
// Token: 0x06002B5B RID: 11099
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_SetMouseTooltip(string tooltip, ref Rect screenRect);
|
|
|
|
// Token: 0x06002B5C RID: 11100 RVA: 0x00039878 File Offset: 0x00037A78
|
|
private static void Internal_DrawPrefixLabel(IntPtr style, Rect position, GUIContent content, int controlID, bool on)
|
|
{
|
|
GUIStyle.INTERNAL_CALL_Internal_DrawPrefixLabel(style, ref position, content, controlID, on);
|
|
}
|
|
|
|
// Token: 0x06002B5D RID: 11101
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_Internal_DrawPrefixLabel(IntPtr style, ref Rect position, GUIContent content, int controlID, bool on);
|
|
|
|
// Token: 0x06002B5E RID: 11102
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern float Internal_GetCursorFlashOffset();
|
|
|
|
// Token: 0x06002B5F RID: 11103 RVA: 0x00039888 File Offset: 0x00037A88
|
|
private static void Internal_DrawCursor(IntPtr target, Rect position, GUIContent content, int pos, Color cursorColor)
|
|
{
|
|
GUIStyle.INTERNAL_CALL_Internal_DrawCursor(target, ref position, content, pos, ref cursorColor);
|
|
}
|
|
|
|
// Token: 0x06002B60 RID: 11104
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_Internal_DrawCursor(IntPtr target, ref Rect position, GUIContent content, int pos, ref Color cursorColor);
|
|
|
|
// Token: 0x06002B61 RID: 11105
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void Internal_DrawWithTextSelection(GUIContent content, ref Internal_DrawWithTextSelectionArguments arguments);
|
|
|
|
// Token: 0x06002B62 RID: 11106
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
internal static extern void SetDefaultFont(Font font);
|
|
|
|
// Token: 0x06002B63 RID: 11107 RVA: 0x00039898 File Offset: 0x00037A98
|
|
internal static void Internal_GetCursorPixelPosition(IntPtr target, Rect position, GUIContent content, int cursorStringIndex, out Vector2 ret)
|
|
{
|
|
GUIStyle.INTERNAL_CALL_Internal_GetCursorPixelPosition(target, ref position, content, cursorStringIndex, out ret);
|
|
}
|
|
|
|
// Token: 0x06002B64 RID: 11108
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_Internal_GetCursorPixelPosition(IntPtr target, ref Rect position, GUIContent content, int cursorStringIndex, out Vector2 ret);
|
|
|
|
// Token: 0x06002B65 RID: 11109 RVA: 0x000398A8 File Offset: 0x00037AA8
|
|
internal static int Internal_GetCursorStringIndex(IntPtr target, Rect position, GUIContent content, Vector2 cursorPixelPosition)
|
|
{
|
|
return GUIStyle.INTERNAL_CALL_Internal_GetCursorStringIndex(target, ref position, content, ref cursorPixelPosition);
|
|
}
|
|
|
|
// Token: 0x06002B66 RID: 11110
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern int INTERNAL_CALL_Internal_GetCursorStringIndex(IntPtr target, ref Rect position, GUIContent content, ref Vector2 cursorPixelPosition);
|
|
|
|
// Token: 0x06002B67 RID: 11111
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
internal static extern int Internal_GetNumCharactersThatFitWithinWidth(IntPtr target, string text, float width);
|
|
|
|
// Token: 0x06002B68 RID: 11112
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
internal static extern void Internal_CalcSize(IntPtr target, GUIContent content, out Vector2 ret);
|
|
|
|
// Token: 0x06002B69 RID: 11113 RVA: 0x000398C8 File Offset: 0x00037AC8
|
|
internal static void Internal_CalcSizeWithConstraints(IntPtr target, GUIContent content, Vector2 maxSize, out Vector2 ret)
|
|
{
|
|
GUIStyle.INTERNAL_CALL_Internal_CalcSizeWithConstraints(target, content, ref maxSize, out ret);
|
|
}
|
|
|
|
// Token: 0x06002B6A RID: 11114
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_Internal_CalcSizeWithConstraints(IntPtr target, GUIContent content, ref Vector2 maxSize, out Vector2 ret);
|
|
|
|
// Token: 0x06002B6B RID: 11115
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern float Internal_CalcHeight(IntPtr target, GUIContent content, float width);
|
|
|
|
// Token: 0x06002B6C RID: 11116
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void Internal_CalcMinMaxWidth(IntPtr target, GUIContent content, out float minWidth, out float maxWidth);
|
|
|
|
// Token: 0x040007C8 RID: 1992
|
|
[NonSerialized]
|
|
internal IntPtr m_Ptr;
|
|
|
|
// Token: 0x040007C9 RID: 1993
|
|
[NonSerialized]
|
|
private GUIStyleState m_Normal;
|
|
|
|
// Token: 0x040007CA RID: 1994
|
|
[NonSerialized]
|
|
private GUIStyleState m_Hover;
|
|
|
|
// Token: 0x040007CB RID: 1995
|
|
[NonSerialized]
|
|
private GUIStyleState m_Active;
|
|
|
|
// Token: 0x040007CC RID: 1996
|
|
[NonSerialized]
|
|
private GUIStyleState m_Focused;
|
|
|
|
// Token: 0x040007CD RID: 1997
|
|
[NonSerialized]
|
|
private GUIStyleState m_OnNormal;
|
|
|
|
// Token: 0x040007CE RID: 1998
|
|
[NonSerialized]
|
|
private GUIStyleState m_OnHover;
|
|
|
|
// Token: 0x040007CF RID: 1999
|
|
[NonSerialized]
|
|
private GUIStyleState m_OnActive;
|
|
|
|
// Token: 0x040007D0 RID: 2000
|
|
[NonSerialized]
|
|
private GUIStyleState m_OnFocused;
|
|
|
|
// Token: 0x040007D1 RID: 2001
|
|
[NonSerialized]
|
|
private RectOffset m_Border;
|
|
|
|
// Token: 0x040007D2 RID: 2002
|
|
[NonSerialized]
|
|
private RectOffset m_Padding;
|
|
|
|
// Token: 0x040007D3 RID: 2003
|
|
[NonSerialized]
|
|
private RectOffset m_Margin;
|
|
|
|
// Token: 0x040007D4 RID: 2004
|
|
[NonSerialized]
|
|
private RectOffset m_Overflow;
|
|
|
|
// Token: 0x040007D5 RID: 2005
|
|
[NonSerialized]
|
|
private Font m_FontInternal;
|
|
|
|
// Token: 0x040007D6 RID: 2006
|
|
internal static bool showKeyboardFocus = true;
|
|
|
|
// Token: 0x040007D7 RID: 2007
|
|
private static GUIStyle s_None;
|
|
}
|
|
}
|