ID:1848257
 
Code:


Problem description:

Is there any way that I can force the webclient into fullscreen mode, this is so once it's embedded on my website, right now it's forcing them to click play to even start connecting to the game and everything, so I know they want to play in this situation.

Is there any way to also force it to become fullscreen?

Even if it needs to be implemented by my game and not the site itself, that's fine.

***Also is there anyway to get rid of the bottom bar in the webclient completely so they can focus on the game? those controls aren't really needed, aside from maybe the drawing method change.
I would also like to know if a fullscreen mode is currently possible in the webclient. I attempted to force it before, but I just couldn't get it to work. I think it's either a security issue or some kind of bug, although I haven't tried recently.

As for the hotbar, you should be able to just leave it out of the .dms file. If for some reason, you don't want to include your own script file, you can just use this to remove it at runtime:
client
New()
..()
RemoveHotbar()

proc
RemoveHotbar()
if(connection == "web")
winset(src, null, {"command=".skin document.getElementsByClassName(\\"byond_hotbar_bar\\")\[0\].remove();\
byond.skin.attach(document.getElementsByClassName(\\"byond_hotbar_contents\\")\[0\],\\"pane\\").winset(\\{ size:\\"0x0\\" \\})""}
)
Thanks, that code is useful.

Currently I need it to be able to be toggled because like I said, the drawing mode option on the bar.

Unless there's a way to also add an option to change that via a verb for example, and using winset() or something else to the affect to do it for me.
In response to Superbike32
I think this should do it:
client
verb
ToggleRenderMode()
if(connection == "web")
winset(src, null, {"command=".skin ToggleRenderMode();\
function ToggleRenderMode() \\{\
var map=byond(':map'),c=map&&map.config;\
if(c) \\{\
if(c.engine.toLowerCase() != 'webgl') \\{c.engine='webgl'; c.sharp=true;\\}\
else if(c.sharp) c.sharp = false;\
else \\{c.engine='canvas2d'; c.sharp=true;\\}\
map.mapConfig();\
\\};\
\\};""}
)

I basically just copied the code for that button.
@Multiverse7, is this not just simply running JS basically? Because all that is does to go fullscreen is change document.body.className="maxgame"

But I can't get it to change the body's class. Maybe I'm wrong and that's not what it does though, in which case I'd need more understanding of what the code actually does.
One of the planned features is to improve communication with the outer frame, so that it's easier for users to handle maximizing and other functionality.