protected override void LoadPage() { Debug.Log("Tabs LoadPage"); if (!(bool)this.webView) { return; } MyWebView webView; if (!this.FindWebView(this.m_InitialOpenURL, out webView) || (UnityEngine.Object)webView == (UnityEngine.Object)null) { this.NotifyVisibility(false); this.webView.SetHostView((GUIView)null); this.webView = (MyWebView)null; this.InitWebView(MyGUIClip.Unclip(new Rect(0.0f, 0.0f, this.position.width, this.position.height))); this.RegisterWebviewUrl(this.m_InitialOpenURL, this.webView); this.NotifyVisibility(true); } else { if ((UnityEngine.Object)webView != (UnityEngine.Object) this.webView) { this.NotifyVisibility(false); webView.SetHostView((GUIView)this.m_Parent.host); this.webView.SetHostView((GUIView)null); this.webView = webView; this.NotifyVisibility(true); this.webView.Show(); } this.LoadUri(); } }
public virtual void OnGUI() { Rect rect = MyGUIClip.Unclip(new Rect(0.0f, 0.0f, this.position.width, this.position.height)); GUILayout.BeginArea(rect); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); GUILayout.Label("Loading...", EditorStyles.label, new GUILayoutOption[0]); GUILayout.FlexibleSpace(); GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndArea(); if (Event.current.type == EventType.Repaint && this.m_HasDelayedRefresh) { this.Refresh(); this.m_HasDelayedRefresh = false; } if (this.m_InitialOpenURL == null) { return; } if (!(bool)this.webView) { this.InitWebView(rect); } if (Event.current.type == EventType.Repaint) { this.webView.SetHostView((GUIView)this.m_Parent.host); this.webView.SetSizeAndPosition((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height); } }
public void OnBatchMode() { Rect m_WebViewRect = MyGUIClip.Unclip(new Rect(0.0f, 0.0f, this.position.width, this.position.height)); if (this.m_InitialOpenURL == null || (bool)this.webView) { return; } this.InitWebView(m_WebViewRect); }