當前位置: 首頁>>代碼示例>>C#>>正文


C# Rect.Last方法代碼示例

本文整理匯總了C#中UnityEngine.Rect.Last方法的典型用法代碼示例。如果您正苦於以下問題:C# Rect.Last方法的具體用法?C# Rect.Last怎麽用?C# Rect.Last使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UnityEngine.Rect的用法示例。


在下文中一共展示了Rect.Last方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: LayoutWithStripsOnRightSideOneScrollBar

		private void LayoutWithStripsOnRightSideOneScrollBar(List<AudioMixerGroupController> allGroups, Dictionary<AudioMixerEffectController, AudioMixerGroupController> effectMap)
		{
			SplitterState horizontalSplitter = this.m_LayoutStripsOnRight.m_HorizontalSplitter;
			SplitterGUILayout.BeginHorizontalSplit(horizontalSplitter, new GUILayoutOption[]
			{
				GUILayout.ExpandWidth(true),
				GUILayout.ExpandHeight(true)
			});
			SplitterGUILayout.EndHorizontalSplit();
			float num = (float)horizontalSplitter.realSizes[0];
			float width = base.position.width - num;
			Rect rect = new Rect(0f, 17f, num, base.position.height - 17f);
			Rect rect2 = new Rect(num, 17f, width, rect.height);
			if (EditorGUIUtility.isProSkin)
			{
				EditorGUI.DrawRect(rect, (!EditorGUIUtility.isProSkin) ? new Color(0.6f, 0.6f, 0.6f, 0f) : new Color(0.19f, 0.19f, 0.19f));
			}
			float num2 = 10f;
			Rect[] array = new Rect[this.m_SectionOrder.Length];
			float num3 = 0f;
			for (int i = 0; i < this.m_SectionOrder.Length; i++)
			{
				num3 += num2;
				if (i > 0)
				{
					num3 += array[i - 1].height;
				}
				array[i] = new Rect(0f, num3, rect.width, this.GetHeightOfSection(this.m_SectionOrder[i]));
				Rect[] expr_155_cp_0 = array;
				int expr_155_cp_1 = i;
				expr_155_cp_0[expr_155_cp_1].x = expr_155_cp_0[expr_155_cp_1].x + 4f;
				Rect[] expr_16F_cp_0 = array;
				int expr_16F_cp_1 = i;
				expr_16F_cp_0[expr_16F_cp_1].width = expr_16F_cp_0[expr_16F_cp_1].width - 8f;
			}
			Rect viewRect = new Rect(0f, 0f, 1f, array.Last<Rect>().yMax);
			if (viewRect.height > rect.height)
			{
				for (int j = 0; j < array.Length; j++)
				{
					Rect[] expr_1DF_cp_0 = array;
					int expr_1DF_cp_1 = j;
					expr_1DF_cp_0[expr_1DF_cp_1].width = expr_1DF_cp_0[expr_1DF_cp_1].width - 14f;
				}
			}
			this.m_SectionsScrollPosition = GUI.BeginScrollView(rect, this.m_SectionsScrollPosition, viewRect);
			this.DoSections(rect, array, this.m_SectionOrder);
			GUI.EndScrollView();
			this.m_ChannelStripView.OnGUI(rect2, this.m_ShowReferencedBuses, this.m_ShowBusConnections, this.m_ShowBusConnectionsOfSelection, allGroups, effectMap, this.m_SortGroupsAlphabetically, this.m_ShowDeveloperOverlays, this.m_GroupTree.ScrollToItem);
			EditorGUI.DrawRect(new Rect(rect.xMax - 1f, 17f, 1f, base.position.height - 17f), (!EditorGUIUtility.isProSkin) ? new Color(0.6f, 0.6f, 0.6f) : new Color(0.15f, 0.15f, 0.15f));
		}
開發者ID:guozanhua,項目名稱:UnityDecompiled,代碼行數:51,代碼來源:AudioMixerWindow.cs


注:本文中的UnityEngine.Rect.Last方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。