Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

html backend: Configuring widht/height of root node in HtmlPlatform.Config object

9 views
Skip to first unread message

Guillermo Rodriguez Garcia

unread,
Jan 18, 2024, 2:10:59 PM1/18/24
to PlayN
Hi all,

I think that it would be nice if the width/height of the html element where the game is inserted could be configured directly in the HtmlPlatform.Config object. For simple use cases (such as tutorials, for example) I think this is more developer-friendly that having to customize the default index.html file. Also it is consistent with the way it is done in the Java backend.

I just created a PR (https://github.com/playn/playn/pull/99) to add support for this. It adds width/height parameters in HtmlPlatform.Config. These are optional -- if they are left to their default value (0), then the current behaviour is kept.

Not a big deal of course, but I though this would be useful.

BR,

Guillermo

Michael Bayne

unread,
Jan 20, 2024, 11:19:49 AM1/20/24
to pl...@googlegroups.com
Seems reasonable to me. I merged your PR, thanks!

--

---
You received this message because you are subscribed to the Google Groups "PlayN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/playn/b57948c9-e355-4509-adc1-47ce5e4e19f6n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages