Skip to content

Commit 9bbee7b

Browse files
author
Unity Technologies
committed
Unity 2017.3.0a3 C# reference source code
1 parent 55dd5f4 commit 9bbee7b

File tree

247 files changed

+9366
-2898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+9366
-2898
lines changed

Editor/Mono/Animation/AnimationWindow/AddCurvesPopup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ internal static bool ShowAtPosition(Rect buttonRect, AnimationWindowState state,
7575
internal void OnGUI()
7676
{
7777
// We do not use the layout event
78-
if (Event.current.type == EventType.layout)
78+
if (Event.current.type == EventType.Layout)
7979
return;
8080

8181
if (s_Hierarchy == null)

Editor/Mono/Animation/AnimationWindow/AnimationWindowHierarchyGUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ private void DoCurveDropdown(Rect rect, AnimationWindowHierarchyNode node, int r
470470

471471
private void DoCurveColorIndicator(Rect rect, AnimationWindowHierarchyNode node)
472472
{
473-
if (Event.current.type != EventType.repaint)
473+
if (Event.current.type != EventType.Repaint)
474474
return;
475475

476476
Color originalColor = GUI.color;

Editor/Mono/Animation/AnimationWindow/CurveEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2439,7 +2439,7 @@ private void EditAxisLabels()
24392439
Event evt = Event.current;
24402440
switch (evt.GetTypeForControl(id))
24412441
{
2442-
case EventType.repaint:
2442+
case EventType.Repaint:
24432443
if (GUIUtility.hotControl == 0)
24442444
EditorGUIUtility.AddCursorRect(dragRect, MouseCursor.SlideArrow);
24452445
break;

Editor/Mono/Animation/AnimationWindow/CurveEditorWindow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ Keyframe[] GetNormalizedKeys(Keyframe[] sourceKeys)
448448

449449
void OnGUI()
450450
{
451-
bool gotMouseUp = (Event.current.type == EventType.mouseUp);
451+
bool gotMouseUp = (Event.current.type == EventType.MouseUp);
452452

453453
if (delegateView == null && m_OnCurveChanged == null)
454454
m_Curve = null;
@@ -492,7 +492,7 @@ void OnGUI()
492492
RefreshShownCurves();
493493
SendEvent("CurveChanged", true);
494494
}
495-
if (Event.current.type == EventType.repaint)
495+
if (Event.current.type == EventType.Repaint)
496496
curveLibrary.Draw(swatchRect, i);
497497

498498
if (swatchRect.xMax > position.width - 2 * margin)
@@ -507,7 +507,7 @@ void OnGUI()
507507
//if (EditorGUI.DropdownButton(new Rect (position.width -26, yPos, 20, 20), GUIContent.none, FocusType.Passive, "OL Plus"))
508508
// AddDefaultPresetsToCurrentLib ();
509509

510-
if (Event.current.type == EventType.used && gotMouseUp)
510+
if (Event.current.type == EventType.Used && gotMouseUp)
511511
{
512512
DoUpdateCurve(false);
513513
SendEvent("CurveChangeCompleted", true);

Editor/Mono/Animation/AnimationWindow/CurveRenderer/NormalCurveRenderer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 trans
272272

273273
public static void DrawPolyLine(Matrix4x4 transform, float minDistance, params Vector3[] points)
274274
{
275-
if (Event.current.type != EventType.repaint)
275+
if (Event.current.type != EventType.Repaint)
276276
return;
277277

278278
Color col = Handles.color * new Color(1, 1, 1, 0.75f);
@@ -307,7 +307,7 @@ public static void DrawCurveWrapped(float minTime, float maxTime, float rangeSta
307307
if (mesh.vertexCount == 0)
308308
return;
309309

310-
if (Event.current.type != EventType.repaint)
310+
if (Event.current.type != EventType.Repaint)
311311
return;
312312

313313
int minRep;

Editor/Mono/Animation/AnimationWindow/DopeSheetEditor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ private void HandleDragging()
649649
}
650650
}
651651

652-
if (eventType == EventType.mouseUp)
652+
if (eventType == EventType.MouseUp)
653653
{
654654
if (m_IsDragging && GUIUtility.hotControl == id)
655655
{
@@ -1359,7 +1359,7 @@ public void OnGUI(Rect position)
13591359
int id = s_RectSelectionID;
13601360
switch (evt.GetTypeForControl(id))
13611361
{
1362-
case EventType.mouseDown:
1362+
case EventType.MouseDown:
13631363
if (evt.button == 0 && position.Contains(mousePos))
13641364
{
13651365
GUIUtility.hotControl = id;
@@ -1368,7 +1368,7 @@ public void OnGUI(Rect position)
13681368
evt.Use();
13691369
}
13701370
break;
1371-
case EventType.mouseDrag:
1371+
case EventType.MouseDrag:
13721372
if (GUIUtility.hotControl == id)
13731373
{
13741374
m_ValidRect = Mathf.Abs((mousePos - m_SelectStartPoint).x) > 1f;
@@ -1380,12 +1380,12 @@ public void OnGUI(Rect position)
13801380
}
13811381
break;
13821382

1383-
case EventType.repaint:
1383+
case EventType.Repaint:
13841384
if (GUIUtility.hotControl == id && m_ValidRect)
13851385
EditorStyles.selectionRect.Draw(GetCurrentPixelRect(), GUIContent.none, false, false, false, false);
13861386
break;
13871387

1388-
case EventType.mouseUp:
1388+
case EventType.MouseUp:
13891389
if (GUIUtility.hotControl == id && evt.button == 0)
13901390
{
13911391
if (m_ValidRect)

Editor/Mono/Animation/ZoomableArea.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ public void HandleZoomAndPanEvents(Rect area)
536536

537537
switch (Event.current.GetTypeForControl(id))
538538
{
539-
case EventType.mouseDown:
539+
case EventType.MouseDown:
540540
if (area.Contains(Event.current.mousePosition))
541541
{
542542
// Catch keyboard control when clicked inside zoomable area
@@ -552,7 +552,7 @@ public void HandleZoomAndPanEvents(Rect area)
552552
}
553553
}
554554
break;
555-
case EventType.mouseUp:
555+
case EventType.MouseUp:
556556
//Debug.Log("mouse-up!");
557557
if (GUIUtility.hotControl == id)
558558
{
@@ -564,7 +564,7 @@ public void HandleZoomAndPanEvents(Rect area)
564564
//Event.current.Use();
565565
}
566566
break;
567-
case EventType.mouseDrag:
567+
case EventType.MouseDrag:
568568
if (GUIUtility.hotControl != id) break;
569569

570570
if (IsZoomEvent())
@@ -580,7 +580,7 @@ public void HandleZoomAndPanEvents(Rect area)
580580
Event.current.Use();
581581
}
582582
break;
583-
case EventType.scrollWheel:
583+
case EventType.ScrollWheel:
584584
if (!area.Contains(Event.current.mousePosition))
585585
break;
586586
if (m_IgnoreScrollWheelUntilClicked && GUIUtility.keyboardControl != id)

Editor/Mono/Annotation/SceneFXWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public override void OnGUI(Rect rect)
3737
return;
3838

3939
// We do not use the layout event
40-
if (Event.current.type == EventType.layout)
40+
if (Event.current.type == EventType.Layout)
4141
return;
4242

4343
if (s_Styles == null)

Editor/Mono/Audio/Mixer/GUI/AudioMixerChannelStripView.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Texture2D gridTextureTilable
145145

146146
void DrawAreaBackground(Rect rect)
147147
{
148-
if (Event.current.type == EventType.repaint)
148+
if (Event.current.type == EventType.Repaint)
149149
{
150150
// Draw background
151151
Color prevColor = GUI.color;
@@ -822,7 +822,7 @@ private bool DoSoloButton(Rect r, AudioMixerGroupController group, List<AudioMix
822822
Event evt = Event.current;
823823

824824
// Right click toggle
825-
if (evt.type == EventType.mouseUp && evt.button == 1 && r.Contains(evt.mousePosition) && allGroups.Any(g => g.solo))
825+
if (evt.type == EventType.MouseUp && evt.button == 1 && r.Contains(evt.mousePosition) && allGroups.Any(g => g.solo))
826826
{
827827
Undo.RecordObject(group, "Change solo state");
828828
foreach (var g in allGroups)
@@ -849,7 +849,7 @@ private bool DoMuteButton(Rect r, AudioMixerGroupController group, List<AudioMix
849849
{
850850
Event evt = Event.current;
851851
// Right click toggle
852-
if (evt.type == EventType.mouseUp && evt.button == 1 && r.Contains(evt.mousePosition) && allGroups.Any(g => g.mute))
852+
if (evt.type == EventType.MouseUp && evt.button == 1 && r.Contains(evt.mousePosition) && allGroups.Any(g => g.mute))
853853
{
854854
Undo.RecordObject(group, "Change mute state");
855855
if (allGroups.Any(g => g.solo))
@@ -883,7 +883,7 @@ private bool DoBypassEffectsButton(Rect r, AudioMixerGroupController group, List
883883
{
884884
Event evt = Event.current;
885885
// Right click toggle
886-
if (evt.type == EventType.mouseUp && evt.button == 1 && r.Contains(evt.mousePosition) && allGroups.Any(g => g.bypassEffects))
886+
if (evt.type == EventType.MouseUp && evt.button == 1 && r.Contains(evt.mousePosition) && allGroups.Any(g => g.bypassEffects))
887887
{
888888
Undo.RecordObject(group, "Change bypass effects state");
889889
foreach (var g in allGroups)
@@ -1170,7 +1170,7 @@ List<Rect> GetBackgroundRects(Rect r, AudioMixerGroupController group, int maxNu
11701170

11711171
void DrawBackgrounds(ChannelStripParams p, bool selected)
11721172
{
1173-
if (Event.current.type == EventType.repaint)
1173+
if (Event.current.type == EventType.Repaint)
11741174
{
11751175
// Bg
11761176
styles.channelStripBg.Draw(p.stripRect, false, false, selected, false);
@@ -1320,7 +1320,7 @@ void DoEffectList(ChannelStripParams p, bool selected, ref int highlightEffectIn
13201320
if (p.visible)
13211321
{
13221322
Rect effectRect = p.bgRects[p.bgRects.Count - 1];
1323-
if (evt.type == EventType.repaint)
1323+
if (evt.type == EventType.Repaint)
13241324
{
13251325
GUI.DrawTextureWithTexCoords(new Rect(effectRect.x, effectRect.y, effectRect.width, effectRect.height - 1), styles.effectBar.hover.background, new Rect(0, 0.5f, 0.1f, 0.1f));
13261326
GUI.Label(effectRect, addText, styles.effectName);
@@ -1525,10 +1525,10 @@ public void OnGUI(Rect rect, bool showReferencedBuses, bool showBusConnections,
15251525
DrawChannelStrip(channelStripParams, ref m_Controller.m_HighlightEffectIndex, ref patchslots, showBusConnectionsOfSelection);
15261526

15271527
// If we click inside the the strip rect we use the event to ensure the mousedown is not caught by rectangle selection
1528-
if (evt.type == EventType.mouseDown && evt.button == 0 && channelStripParams.stripRect.Contains(evt.mousePosition))
1528+
if (evt.type == EventType.MouseDown && evt.button == 0 && channelStripParams.stripRect.Contains(evt.mousePosition))
15291529
evt.Use();
15301530
// If we are dragging effects we reset destination index when dragging outside effects
1531-
if (IsMovingEffect() && evt.type == EventType.mouseDrag && channelStripParams.stripRect.Contains(evt.mousePosition) && GUIUtility.hotControl == m_EffectInteractionControlID)
1531+
if (IsMovingEffect() && evt.type == EventType.MouseDrag && channelStripParams.stripRect.Contains(evt.mousePosition) && GUIUtility.hotControl == m_EffectInteractionControlID)
15321532
{
15331533
m_MovingEffectDstIndex = -1;
15341534
evt.Use();

Editor/Mono/Audio/Mixer/GUI/AudioMixerDrawUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public static void DrawVerticalShow(Rect rect, bool fadeToTheRight)
325325

326326
public static void DrawScrollDropShadow(Rect scrollViewRect, float scrollY, float contentHeight)
327327
{
328-
if (Event.current.type == EventType.repaint)
328+
if (Event.current.type == EventType.Repaint)
329329
{
330330
bool isShowingScrollBar = contentHeight > scrollViewRect.height;
331331
if (!isShowingScrollBar)

0 commit comments

Comments
 (0)