コード例 #1
0
 public void PageFoward()
 {
     if (m_Web.CanGoForward())
     {
         m_Web.GoForward();
     }
 }
コード例 #2
0
ファイル: WebViewManager.cs プロジェクト: creativa51/WebView
 public void onbtnNext()
 {
     if (webView.CanGoForward())
     {
         webView.GoForward();
     }
 }
コード例 #3
0
    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;
    }
コード例 #4
0
    /// <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;
        }
    }
コード例 #5
0
 private void OnSwipeRight()
 {
     if (webViewObject != null)
     {
         if (webViewObject.CanGoForward())
         {
             webViewObject.GoForward();
         }
     }
 }
コード例 #6
0
    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;
    }
コード例 #7
0
    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;
    }
コード例 #8
0
 static int QPYX_CanGoForward_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.CanGoForward();
         LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
コード例 #9
0
    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;
    }
コード例 #10
0
    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());
    }