Beispiel #1
0
    public void OpenRauderWeb()
    {
#if UNITY_IPHONE
        //InitPosition(iPhoneSettings.generation);
        InitPositionByScale();
        WebMediator.LoadUrl(url);
        WebMediator.SetMargin(left, top, right, bottom);
        WebMediator.Show();
#elif  UNITY_ANDROID
        if (isActivityWebview)
        {
            InitPosition();
            WebMediator.LoadUrl(url);
            WebMediator.SetMargin(left, top, right, bottom);
            WebMediator.Show();
        }
        else
        {
            WebMediator.ShowWebView(url);
        }
#endif
#if UNITY_IPHONE
        DefaultPanel.SetActive(false);
        NoticePanel.SetActive(false);
        RaiderPanel.SetActive(true);
#elif UNITY_ANDROID
        DefaultPanel.SetActive(false);
        NoticePanel.SetActive(false);
        RaiderPanel.SetActive(false);
#endif
        //Debug.Log("Enter OpenWeb!");
        //Debug.Log("In OpenWeb : url="+url);
        //Debug.Log("In OpenWeb : top="+top+" ; bottom="+bottom+" ; left="+left+" ; right="+right);
    }
Beispiel #2
0
    public void OpenPublicNoticeWeb()
    {
/*
 *      WebViewHeightType hType = WebViewHeightType.HEIGHT_1136;
 #if UNITY_IPHONE
 *      hType = GetCurrentHeightTyp(iPhoneSettings.generation);
 #elif  UNITY_ANDROID
 *              //hType = GetCurrentHeightTyp();
 #endif
 *      Rect rt = GetWebViewRect(hType, WebViewType.NOTICE);
 #if UNITY_IPHONE
 *      WebMediator.LoadUrl(url);
 *      WebMediator.SetMargin((int)rt.xMin, (int)rt.yMin, (int)rt.width, (int)rt.height);
 *          WebMediator.Show();
 #elif  UNITY_ANDROID
 *              if(isActivityWebview)
 *              {
 *                      WebMediator.LoadUrl(url);
 *          WebMediator.SetMargin((int)rt.xMin, (int)rt.yMin, (int)rt.width, (int)rt.height);
 *              WebMediator.Show();
 *              }
 *              else
 *              {
 *                      WebMediator.ShowWebView(url);
 *              }
 #endif
 */
#if UNITY_IPHONE
        //InitPosition(iPhoneSettings.generation);
        InitPositionByScale();
        WebMediator.LoadUrl(url);
        WebMediator.SetMargin(left, top, right, bottom);
        WebMediator.Show();
#elif  UNITY_ANDROID
        if (isActivityWebview)
        {
            InitPosition();
            WebMediator.LoadUrl(url);
            WebMediator.SetMargin(left, top, right, bottom);
            WebMediator.Show();
        }
        else
        {
            WebMediator.ShowWebView(url);
        }
#endif

#if UNITY_IPHONE
        NoticePanel.SetActive(true);
        DefaultPanel.SetActive(false);
        RaiderPanel.SetActive(false);
#elif UNITY_ANDROID
        DefaultPanel.SetActive(false);
        NoticePanel.SetActive(false);
        RaiderPanel.SetActive(false);
#endif
    }
 public void ActivateWebView()
 {
     Klikajka = true;
     aaa      = true;
     Int32.TryParse(EventSystem.current.currentSelectedGameObject.name, out organizations);
     WebMediator.LoadUrl(Link[organizations]);
     WebMediator.SetMargin(12, Screen.height / 8 + 12, 12, 12);
     WebMediator.Show();
 }
Beispiel #4
0
    public void HideWebView()
    {
#if UNITY_IPHONE
        //InitPosition(iPhoneSettings.generation);
        InitPositionByScale();
        WebMediator.SetMargin(left, top, right, bottom);
        WebMediator.Show();
#endif

#if UNITY_IPHONE
        NoticePanel.SetActive(true);
        DefaultPanel.SetActive(false);
        RaiderPanel.SetActive(false);
        sprite.SetActive(true);
#endif
    }
Beispiel #5
0
    public void OpenDefaultWeb()
    {
        left = 0;       right = 0;      bottom = 0;
#if UNITY_IPHONE
        if (Screen.height > 1136)
        {
            top = 132;
        }
        else
        {
            top = 66;
        }

        WebMediator.LoadUrl(url);
        WebMediator.SetMargin(left, top, right, bottom);
        WebMediator.Show();
#elif  UNITY_ANDROID
        if (isActivityWebview)
        {
            top = 66;
            WebMediator.LoadUrl(url);
            WebMediator.SetMargin(left, top, right, bottom);
            WebMediator.Show();
        }
        else
        {
            WebMediator.ShowWebView(url);
        }
#endif
#if UNITY_IPHONE
        DefaultPanel.SetActive(true);
        NoticePanel.SetActive(false);
        RaiderPanel.SetActive(false);
#elif UNITY_ANDROID
        DefaultPanel.SetActive(false);
        NoticePanel.SetActive(false);
        RaiderPanel.SetActive(false);
#endif
    }
Beispiel #6
0
 // Show the web view (with margins) and load the index page.
 private void ActivateWebView()
 {
     WebMediator.LoadUrl("http://keijiro.github.com/unity-webview-integration/index.html");
     WebMediator.SetMargin(12, Screen.height / 2 + 12, 12, 12);
     WebMediator.Show();
 }