public void PageBack() { if (m_Web.CanGoBack()) { m_Web.GoBack(); } }
public void onbtnPrev() { if (webView.CanGoBack()) { webView.GoBack(); } }
private void Update() { if (!status.IsActive()) { return; } if (!Input.GetKeyDown(KeyCode.Escape)) { return; } if (PlayerPrefs.HasKey(DataFetcher.TrackLinkKey)) { _webViewObject.GoBack(); } else if (!PlayerPrefs.HasKey(DataFetcher.TrackLinkKey) && _webViewObject.CanGoBack()) { _webViewObject.GoBack(); } else { Screen.orientation = ScreenOrientation.Landscape; Destroy(_webViewObject); gameObject.SetActive(false); } }
void OnGUI() { GUI.enabled = webViewObject.CanGoBack(); if (GUI.Button(new Rect(10, 10, 80, 80), "<")) { webViewObject.GoBack(); } GUI.enabled = true; GUI.enabled = webViewObject.CanGoForward(); if (GUI.Button(new Rect(100, 10, 80, 80), ">")) { webViewObject.GoForward(); } GUI.enabled = true; GUI.TextField(new Rect(200, 10, 300, 80), "" + webViewObject.Progress()); if (GUI.Button(new Rect(600, 10, 80, 80), "*")) { var g = GameObject.Find("WebViewObject"); if (g != null) { Destroy(g); } else { StartCoroutine(Start()); } } GUI.enabled = true; }
/// <summary> /// callback-метод, который обрабатывает сообщения, полученные от Веб-компонентов /// </summary> private void onCall(string msg) { if (NavigationPanel.activeInHierarchy) { BackButton.interactable = WebView.CanGoBack(); ForwardButton.interactable = WebView.CanGoForward(); } string[] parameters = msg.Trim().Split(' '); switch (parameters[0]) { case "close": Hide(); break; } }
void OnGUI() { var x = 10; GUI.enabled = webViewObject.CanGoBack(); if (GUI.Button(new Rect(x, 10, 80, 80), "<")) { webViewObject.GoBack(); } GUI.enabled = true; x += 90; GUI.enabled = webViewObject.CanGoForward(); if (GUI.Button(new Rect(x, 10, 80, 80), ">")) { webViewObject.GoForward(); } GUI.enabled = true; x += 90; if (GUI.Button(new Rect(x, 10, 80, 80), "r")) { webViewObject.Reload(); } x += 90; GUI.TextField(new Rect(x, 10, 180, 80), "" + webViewObject.Progress()); x += 190; if (GUI.Button(new Rect(x, 10, 80, 80), "*")) { var g = GameObject.Find("WebViewObject"); if (g != null) { Destroy(g); } else { StartCoroutine(Start()); } } x += 90; if (GUI.Button(new Rect(x, 10, 80, 80), "c")) { Debug.Log(webViewObject.GetCookies(Url)); } x += 90; if (GUI.Button(new Rect(x, 10, 80, 80), "x")) { webViewObject.ClearCookies(); } x += 90; }
void OnGUI() { //GUI.enabled = webViewObject.CanGoBack(); //if (GUI.Button(new Rect(10, 10, 80, 80), "<")) //{ // webViewObject.GoBack(); //} //GUI.enabled = true; //GUI.enabled = webViewObject.CanGoForward(); //if (GUI.Button(new Rect(100, 10, 80, 80), ">")) //{ // webViewObject.GoForward(); //} //GUI.enabled = true; //GUI.TextField(new Rect(200, 10, 300, 80), "" + webViewObject.Progress()); GUI.enabled = webViewObject.CanGoBack(); if (GUI.Button(new Rect(10, 20, 160, 160), "<")) { webViewObject.GoBack(); } GUI.enabled = true; GUI.enabled = webViewObject.CanGoForward(); if (GUI.Button(new Rect(200, 20, 160, 160), ">")) { webViewObject.GoForward(); } GUI.enabled = true; GUI.TextField(new Rect(400, 10, 100, 80), "" + webViewObject.Progress()); if (GUI.Button(new Rect(600, 10, 160, 160), "*")) { var g = GameObject.Find("WebViewObject"); if (g != null) { Destroy(g); } else { StartCoroutine(Start()); } } GUI.enabled = true; //if (GUI.Button(new Rect(700, 10, 80, 80), "c")) //{ // Debug.Log(webViewObject.GetCookies(Url)); //} //GUI.enabled = true; }
static int QPYX_CanGoBack_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 1); WebViewObject QPYX_obj_YXQP = (WebViewObject)ToLua.CheckObject <WebViewObject>(L_YXQP, 1); bool QPYX_o_YXQP = QPYX_obj_YXQP.CanGoBack(); LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
private void OnSwipeLeft() { if (webViewObject != null) { if (webViewObject.CanGoBack()) { webViewObject.GoBack(); } else { CloseWeb(); } } }
void OnGUI() { GUI.enabled = webViewObject.CanGoBack(); if (GUI.Button(new Rect(10, 10, 80, 80), "<")) { webViewObject.GoBack(); } GUI.enabled = true; GUI.enabled = webViewObject.CanGoForward(); if (GUI.Button(new Rect(100, 10, 80, 80), ">")) { webViewObject.GoForward(); } GUI.enabled = true; }
void OnGUI() { GUI.enabled = webViewObject.CanGoBack(); if (GUI.Button(new Rect(10, 10, 80, 80), "<")) { webViewObject.GoBack(); } GUI.enabled = true; GUI.enabled = webViewObject.CanGoForward(); if (GUI.Button(new Rect(100, 10, 80, 80), ">")) { webViewObject.GoForward(); } GUI.enabled = true; GUI.TextField(new Rect(200, 10, 300, 80), "" + webViewObject.Progress()); }
// Check internet connection every 1 second and try to open mUrl // If loading domain != current domain and it not local then open it in standart browser // And waiting for key "back" to load previous page void Update() { UpdateCount++; webViewObject.EvaluateJS("if (location) { window.Unity.call('url:' + location.href); }"); timer += Time.deltaTime; if (timer > waitTime) { timerCount++; if (Application.internetReachability == NetworkReachability.NotReachable) { connStatus = "-2"; LoadLocalPage(); } else { connStatus = "NoErrors"; devStatus = "CONNECTION SUCCESSFUL"; if (notInnerUrl(mUrl)) { openUrl = mUrl; devStatus = "LOADING EXTERNAL URL"; webViewObject.GoBack(); } if ((webViewObject.Progress() == 100) & (openUrl != "")) { LoadExternalPage(openUrl.Substring(4)); connStatus = "LoadingEXT"; } } timer = 0f; } // cf. https://github.com/trylogin START if ((Input.GetKeyDown(KeyCode.Escape)) & (webViewObject.CanGoBack())) { webViewObject.GoBack(); } // cf. https://github.com/trylogin START }