Пример #1
0
        public void ChangeWindowSettings()
        {
            Task task = new Task(() => {
                // Get the window title from the RPG Maker MV
                object windowTitle = EvaluateScript(browser, "document.head.getElementsByTagName('title')[0].innerText;");
                // Get the width and height values from the Graphics object.
                object boxWidth  = EvaluateScript(browser, "Graphics.boxWidth;");
                object boxHeight = EvaluateScript(browser, "Graphics.boxHeight;");
                // Set the game title and screen size in Cef.
                rsTools.SetGameTitle(windowTitle.ToString());
                rsTools.SetScreenSize(Int32.Parse(boxWidth.ToString()), Int32.Parse(boxHeight.ToString()));
            });

            task.Start();
        }