public void DrawLoader() { this.editor.DrawBackground(); var darkLabel = ME.Utilities.CacheStyle("FlowEditor.Minimap.Styles", "DarkLabel", (styleName) => { var _darkLabel = FlowSystemEditorWindow.defaultSkin.FindStyle(styleName); _darkLabel.alignment = TextAnchor.MiddleCenter; _darkLabel.stretchWidth = true; _darkLabel.stretchHeight = true; _darkLabel.fixedWidth = 0f; _darkLabel.fixedHeight = 0f; return(_darkLabel); }); var rect = FlowSystemEditor.GetCenterRect(this.editor.position, this.splash.width, this.splash.height); var boxStyle = ME.Utilities.CacheStyle("FlowEditor.Minimap.Styles", "boxStyle", (styleName) => { var _boxStyle = new GUIStyle(GUI.skin.box); _boxStyle.margin = new RectOffset(0, 0, 0, 0); _boxStyle.padding = new RectOffset(0, 0, 0, 0); _boxStyle.normal.background = null; return(_boxStyle); }); GUI.Box(rect, this.splash, boxStyle); var width = 730f; var height = 456f; var rectOffset = FlowSystemEditor.GetCenterRect(this.editor.position, width, height); var marginLeft = 240f; var margin = 20f; var padding = 20f; GUILayout.BeginArea(rectOffset); { var borderWidth = width - marginLeft - margin; var borderHeight = height - margin * 2f; var labelStyle = ME.Utilities.CacheStyle("FlowEditor.Minimap.Styles", "sv_iconselector_labelselection"); GUILayout.BeginArea(new Rect(marginLeft, margin, borderWidth, borderHeight), labelStyle); { GUILayout.BeginArea(new Rect(padding, padding, borderWidth - padding * 2f, borderHeight - padding * 2f)); { GUILayout.Label("Loading...", darkLabel); } GUILayout.EndArea(); } GUILayout.EndArea(); } GUILayout.EndArea(); }
private void DrawSplash(System.Action drawer) { this.editor.BeginWindows(); this.editor.DrawBackground(); if (this.splash == null) { return; } var rect = FlowSystemEditor.GetCenterRect(this.editor.position, this.splash.width, this.splash.height); var boxStyle = new GUIStyle(GUI.skin.box); boxStyle.margin = new RectOffset(0, 0, 0, 0); boxStyle.padding = new RectOffset(0, 0, 0, 0); boxStyle.normal.background = null; GUI.Box(rect, this.splash, boxStyle); var width = 730f; var height = 456f; var rectOffset = FlowSystemEditor.GetCenterRect(this.editor.position, width, height); var marginLeft = 240f; var margin = 20f; var padding = 20f; GUILayout.BeginArea(rectOffset.PixelPerfect()); { var borderWidth = width - marginLeft - margin; var borderHeight = height - margin * 2f; var labelStyle = ME.Utilities.CacheStyle("FlowEditor.DataSelection.Styles", "sv_iconselector_labelselection"); GUILayout.BeginArea(new Rect(marginLeft, margin, borderWidth, borderHeight).PixelPerfect(), labelStyle); { GUILayout.BeginArea(new Rect(padding, padding, borderWidth - padding * 2f, borderHeight - padding * 2f).PixelPerfect()); { drawer.Invoke(); } GUILayout.EndArea(); } GUILayout.EndArea(); } GUILayout.EndArea(); this.editor.EndWindows(); }