Fixes:
- pixel-perfect fullscreen (requested https://www.lexaloffle.com/bbs/?tid=28615)
- fullscreen mouse support (reported https://www.lexaloffle.com/bbs/?tid=28295)
- browser zoom (ctrl+/ctrl-) doesn't break fullscreen (also reported above)
- tab key disabled (https://www.lexaloffle.com/bbs/?tid=28844)
- select & drag disabled (https://www.lexaloffle.com/bbs/?tid=30380)
- context menu disabled on canvas & buttons
- gamepad support (krajzeg's https://github.com/krajzeg/pico8gamepad/)
Features:
- pixel-perfect auto-resizing (optional, set autoresize to true in html)
- minor enhancements (pico8 palette colors, black frame with shadow)
- play button when autoplay is denied (in compliance with autoplay policy changes in chrome 66)
Tested on:
- win10 (chrome,opera,firefox, edge(blurry as expected, lol@ms))
- linux mint (chromium,firefox)
- macos (safari)
- itch.io, site & app (min embed size is 516x540, close fit with borders without autoresize)
How to:
unzip ub.html to {application data}/pico-8/plates
and then
> EXPORT FOO.HTML -P UB
minified version:
> EXPORT FOO.HTML -P UBM
Download:
https://www.lexaloffle.com/bbs/files/13845/ub_html_12.zip
Have fun!
(edit) no mobile support for now
...
1.2: power button when autoplay disabled (chrome update may 2018)
1.1c: fixed cursor keys scrolling page within iframe
1.1b: removed CRs, added minified
1.1: fixed select/drag/context menu
1.0: first version
Previous versions:
https://www.lexaloffle.com/bbs/files/13845/ub_html_11c.zip
https://www.lexaloffle.com/bbs/files/13845/ub_html_11b.zip
https://www.lexaloffle.com/bbs/files/13845/ub_html_10.zip
(free to use and modify, no attribution required)
On windows noticed that PICO-8 generates corrupted newlines from your template:
"\r\r\n" ( 0D 0D 0A ) instead of "\r\n" ( 0D 0A )
This appears to not affect browsers much but it sure affects text editors like Notepad++, plus it makes the HTML pointlessly bigger :p
A solution is to convert your template to unix newlines format ( 0D 0A -> 0A ) to get around the PICO-8 bug... besides that's the proper format you should use anyway. ;)
Windows systems really need to stop doing the \r entirely.
Just, stop.
There's no need to emulate a physical printer.
updated!
yeah it seems pico-8 unconditionally adds CRs on windows...
Nice theplate!
It's fixing the bug with the stat(4) function on browser?
@MrBigaston: I don't think so, since I wasn't aware of that issue. I see it's about getting the clipboard content but I couldn't find more info... maybe it isn't implemented yet?
[Please log in to post a comment]