These asset works great. Tell me please, it possible to create a new function?
I need some like: open_string_as_page(str)
Important! Without somewhere saving a file.
Embed a full web browser in your game · By
I have already been told how you can do what I need. To open a line as an HTML page without saving it. Instead of an address, you can use the following lines:
data:text/html;base256,<b>hello world</b>
or
data:text/html;base64,PGI+aGVsbG8gd29ybGQ8L2I+4oCL4oCL
It will be executed as HTML. Also, it works in browser (in the address bar)
I've posted an update, it now has the chromium_set_string() function that will load HTML directly onto the page. You probably want to set the dummy URL as about:blank.
As transparent rendering is turned on, you may need to make sure a background color is set. There are some odd effects here I haven't quite worked out yet relating to this transparency.
Regarding CPU usage: unfortunately in order to have chromium render frames in the background and send the data over to Gamemaker via a buffer, it can't take advantage of GPU rendering, and so CPU usage is high. There's no way around this other than to have Chromium pop up as an on-screen overlay (or borderless window) placed exactly over the game, this method is used by some other Chromium GM extensions, but this method does not allow layering or shaders.