forked from hunterzonewu/unity-decompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigation.cs
More file actions
140 lines (130 loc) · 3.4 KB
/
Navigation.cs
File metadata and controls
140 lines (130 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Decompiled with JetBrains decompiler
// Type: UnityEngine.UI.Navigation
// Assembly: UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 2216A18B-AF52-44A5-85A0-A1CAA19C1090
// Assembly location: C:\Users\Blake\sandbox\unity\test-project\Library\UnityAssemblies\UnityEngine.UI.dll
using System;
using UnityEngine.Serialization;
namespace UnityEngine.UI
{
/// <summary>
/// <para>Structure storing details related to navigation.</para>
/// </summary>
[Serializable]
public struct Navigation : IEquatable<Navigation>
{
[SerializeField]
[FormerlySerializedAs("mode")]
private Navigation.Mode m_Mode;
[FormerlySerializedAs("selectOnUp")]
[SerializeField]
private Selectable m_SelectOnUp;
[SerializeField]
[FormerlySerializedAs("selectOnDown")]
private Selectable m_SelectOnDown;
[SerializeField]
[FormerlySerializedAs("selectOnLeft")]
private Selectable m_SelectOnLeft;
[FormerlySerializedAs("selectOnRight")]
[SerializeField]
private Selectable m_SelectOnRight;
/// <summary>
/// <para>Navitation mode.</para>
/// </summary>
public Navigation.Mode mode
{
get
{
return this.m_Mode;
}
set
{
this.m_Mode = value;
}
}
/// <summary>
/// <para>Selectable to select on up.</para>
/// </summary>
public Selectable selectOnUp
{
get
{
return this.m_SelectOnUp;
}
set
{
this.m_SelectOnUp = value;
}
}
/// <summary>
/// <para>Selectable to select on down.</para>
/// </summary>
public Selectable selectOnDown
{
get
{
return this.m_SelectOnDown;
}
set
{
this.m_SelectOnDown = value;
}
}
/// <summary>
/// <para>Selectable to select on left.</para>
/// </summary>
public Selectable selectOnLeft
{
get
{
return this.m_SelectOnLeft;
}
set
{
this.m_SelectOnLeft = value;
}
}
/// <summary>
/// <para>Selectable to select on right.</para>
/// </summary>
public Selectable selectOnRight
{
get
{
return this.m_SelectOnRight;
}
set
{
this.m_SelectOnRight = value;
}
}
/// <summary>
/// <para>Return a Navigation with sensible default values.</para>
/// </summary>
public static Navigation defaultNavigation
{
get
{
return new Navigation() { m_Mode = Navigation.Mode.Automatic };
}
}
public bool Equals(Navigation other)
{
if (this.mode == other.mode && (UnityEngine.Object) this.selectOnUp == (UnityEngine.Object) other.selectOnUp && ((UnityEngine.Object) this.selectOnDown == (UnityEngine.Object) other.selectOnDown && (UnityEngine.Object) this.selectOnLeft == (UnityEngine.Object) other.selectOnLeft))
return (UnityEngine.Object) this.selectOnRight == (UnityEngine.Object) other.selectOnRight;
return false;
}
/// <summary>
/// <para>Navigation mode. Used by Selectable.</para>
/// </summary>
[Flags]
public enum Mode
{
None = 0,
Horizontal = 1,
Vertical = 2,
Automatic = Vertical | Horizontal,
Explicit = 4,
}
}
}