コード例 #1
0
    public void OnEnable()
    {
        m_HHTMLBrowser    = HHTMLBrowser.Invalid;
        m_URL             = "http://steamworks.github.io";
        m_Texture         = null;
        m_Find            = "Steamworks";
        m_CurrentlyInFind = false;
        m_ScaleFactor     = 0f;
        m_BackgroundMode  = false;

        m_Init = SteamHTMLSurface.Init();
        print("SteamHTMLSurface.Init() : " + m_Init);

        m_HTML_NeedsPaint = Callback <HTML_NeedsPaint_t> .Create(OnHTML_NeedsPaint);

        m_HTML_StartRequest = Callback <HTML_StartRequest_t> .Create(OnHTML_StartRequest);

        m_HTML_CloseBrowser = Callback <HTML_CloseBrowser_t> .Create(OnHTML_CloseBrowser);

        m_HTML_URLChanged = Callback <HTML_URLChanged_t> .Create(OnHTML_URLChanged);

        m_HTML_FinishedRequest = Callback <HTML_FinishedRequest_t> .Create(OnHTML_FinishedRequest);

        m_HTML_OpenLinkInNewTab = Callback <HTML_OpenLinkInNewTab_t> .Create(OnHTML_OpenLinkInNewTab);

        m_HTML_ChangedTitle = Callback <HTML_ChangedTitle_t> .Create(OnHTML_ChangedTitle);

        m_HTML_SearchResults = Callback <HTML_SearchResults_t> .Create(OnHTML_SearchResults);

        m_HTML_CanGoBackAndForward = Callback <HTML_CanGoBackAndForward_t> .Create(OnHTML_CanGoBackAndForward);

        m_HTML_HorizontalScroll = Callback <HTML_HorizontalScroll_t> .Create(OnHTML_HorizontalScroll);

        m_HTML_VerticalScroll = Callback <HTML_VerticalScroll_t> .Create(OnHTML_VerticalScroll);

        m_HTML_LinkAtPosition = Callback <HTML_LinkAtPosition_t> .Create(OnHTML_LinkAtPosition);

        m_HTML_JSAlert = Callback <HTML_JSAlert_t> .Create(OnHTML_JSAlert);

        m_HTML_JSConfirm = Callback <HTML_JSConfirm_t> .Create(OnHTML_JSConfirm);

        m_HTML_FileOpenDialog = Callback <HTML_FileOpenDialog_t> .Create(OnHTML_FileOpenDialog);

        m_HTML_NewWindow = Callback <HTML_NewWindow_t> .Create(OnHTML_NewWindow);

        m_HTML_SetCursor = Callback <HTML_SetCursor_t> .Create(OnHTML_SetCursor);

        m_HTML_StatusText = Callback <HTML_StatusText_t> .Create(OnHTML_StatusText);

        m_HTML_ShowToolTip = Callback <HTML_ShowToolTip_t> .Create(OnHTML_ShowToolTip);

        m_HTML_UpdateToolTip = Callback <HTML_UpdateToolTip_t> .Create(OnHTML_UpdateToolTip);

        m_HTML_HideToolTip = Callback <HTML_HideToolTip_t> .Create(OnHTML_HideToolTip);

        m_HTML_BrowserRestarted = Callback <HTML_BrowserRestarted_t> .Create(OnHTML_BrowserRestarted);

        OnHTML_BrowserReadyCallResult = CallResult <HTML_BrowserReady_t> .Create(OnHTML_BrowserReady);
    }
コード例 #2
0
    public void OnEnable()
    {
        m_HTML_NeedsPaint = Callback <HTML_NeedsPaint_t> .Create(OnHTML_NeedsPaint);

        m_HTML_StartRequest = Callback <HTML_StartRequest_t> .Create(OnHTML_StartRequest);

        m_HTML_CloseBrowser = Callback <HTML_CloseBrowser_t> .Create(OnHTML_CloseBrowser);

        m_HTML_URLChanged = Callback <HTML_URLChanged_t> .Create(OnHTML_URLChanged);

        m_HTML_FinishedRequest = Callback <HTML_FinishedRequest_t> .Create(OnHTML_FinishedRequest);

        m_HTML_OpenLinkInNewTab = Callback <HTML_OpenLinkInNewTab_t> .Create(OnHTML_OpenLinkInNewTab);

        m_HTML_ChangedTitle = Callback <HTML_ChangedTitle_t> .Create(OnHTML_ChangedTitle);

        m_HTML_SearchResults = Callback <HTML_SearchResults_t> .Create(OnHTML_SearchResults);

        m_HTML_CanGoBackAndForward = Callback <HTML_CanGoBackAndForward_t> .Create(OnHTML_CanGoBackAndForward);

        m_HTML_HorizontalScroll = Callback <HTML_HorizontalScroll_t> .Create(OnHTML_HorizontalScroll);

        m_HTML_VerticalScroll = Callback <HTML_VerticalScroll_t> .Create(OnHTML_VerticalScroll);

        m_HTML_LinkAtPosition = Callback <HTML_LinkAtPosition_t> .Create(OnHTML_LinkAtPosition);

        m_HTML_JSAlert = Callback <HTML_JSAlert_t> .Create(OnHTML_JSAlert);

        m_HTML_JSConfirm = Callback <HTML_JSConfirm_t> .Create(OnHTML_JSConfirm);

        m_HTML_FileOpenDialog = Callback <HTML_FileOpenDialog_t> .Create(OnHTML_FileOpenDialog);

        m_HTML_ComboNeedsPaint = Callback <HTML_ComboNeedsPaint_t> .Create(OnHTML_ComboNeedsPaint);

        m_HTML_ShowPopup = Callback <HTML_ShowPopup_t> .Create(OnHTML_ShowPopup);

        m_HTML_HidePopup = Callback <HTML_HidePopup_t> .Create(OnHTML_HidePopup);

        m_HTML_SizePopup = Callback <HTML_SizePopup_t> .Create(OnHTML_SizePopup);

        m_HTML_NewWindow = Callback <HTML_NewWindow_t> .Create(OnHTML_NewWindow);

        m_HTML_SetCursor = Callback <HTML_SetCursor_t> .Create(OnHTML_SetCursor);

        m_HTML_StatusText = Callback <HTML_StatusText_t> .Create(OnHTML_StatusText);

        m_HTML_ShowToolTip = Callback <HTML_ShowToolTip_t> .Create(OnHTML_ShowToolTip);

        m_HTML_UpdateToolTip = Callback <HTML_UpdateToolTip_t> .Create(OnHTML_UpdateToolTip);

        m_HTML_HideToolTip = Callback <HTML_HideToolTip_t> .Create(OnHTML_HideToolTip);

        m_HTML_BrowserReadyResult = CallResult <HTML_BrowserReady_t> .Create(OnHTML_BrowserReady);

        m_Init = SteamHTMLSurface.Init();
        print("SteamHTMLSurface.Init() : " + m_Init);

        m_Texture = null;
    }
コード例 #3
0
        public static void Initialize(uint _Width, uint _Height)
        {
            Width  = _Width;
            Height = _Height;

            bool result = SteamHTMLSurface.Init();

            SteamHTMLSurface.SetSize(HHTMLBrowser.Invalid, Width, Height);
            Texture = new Texture2D(Game.GameClass.Graphics, (int)Width, (int)Height);
            pixels  = new byte[Width * Height * 4];

            var hSteamAPICall = SteamHTMLSurface.CreateBrowser("WAL", null);

            g_CallResultBrowserReady = new CallResult <HTML_BrowserReady_t>(OnBrowserReady);
            g_CallResultBrowserReady.Set(hSteamAPICall);

            Event_CloseBrowser    = new Callback <HTML_CloseBrowser_t>(OnCloseBrowser);
            Event_StartRequest    = new Callback <HTML_StartRequest_t>(OnStartRequest);
            Event_FinishedRequest = new Callback <HTML_FinishedRequest_t>(OnFinishedRequest);
            Event_NeedsPaint      = new Callback <HTML_NeedsPaint_t>(OnNeedsPaint);
            Event_URLChanged      = new Callback <HTML_URLChanged_t>(OnURLChange);
        }