summaryrefslogtreecommitdiff
path: root/src/shell.html
AgeCommit message (Collapse)Author
2013-03-20Remove border from canvasVladimir Vukicevic
2013-03-06enable pointer lock checkbox by defaultAlon Zakai
2013-03-06realize fullscreen options (resize canvas and lock pointer) with checkboxesMichael Riss
2013-03-06Fixes for the full screen implementation:Michael Riss
- formatting fixes - added comments (for the SDL_FULLSCREEN flag) - add event handlers only once and communicate through object variables (Browser.lockPointer and Browser.resizeCanvas) Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
2013-03-06Improved fullscreen functionality.Michael Riss
- the requestFullScreen function now has two boolean arguments: "doLockPointer" and "doResizeCanvas" - when using "doResizeCanvas", the SDL application gets notified via the "SDL_VIDEORESIZE" event of the new resolution, the old resolution setting is saved and gets restored when the canvas returns to windowed mode - when setting "doLockPointer" to false the mouse pointer remains visible in fullscreen mode and allows e.g. RTS (Real Time Strategy) type games - the SDL application can check via the "SDL_FULLSCREEN" flag in the flags field of the SDL_Surface struct whether the canvas is currently in fullscreen mode or not. - depending on the browser the SDL application can switch out of the fullscreen mode with the "SDL_WM_ToggleFullScreen(SDL_Surface*);" call (currently chrome supports it, firefox does not) - Also, the requestFullScreen has been fixed to avoid repeated adding of the event listeners every time requestFullScreen is called. - src/shell.html got changed to demonstrate all variants to switch to fullscreen mode Note: Due to the security model of web browsers, the SDL model cannot be fully supported. What is not possible? - Initiating the switch to fullscreen from the SDL application. - Initiating the pointer lock from the SDL application when *not* in fullscreen mode How to work around the limitations? All the actions that cannot be initiated by the SDL application have to be initiated by the web browser instead. A good practice should be to start the application in windowed mode and have a button situated close to the canvas which switches the canvas into fullscreen mode and also changes the canvas size to fullscreen resolution. This way, the SDL application receives a SDL_VIDEORESIZE event and can check in the even handler whether it is now in fullscreen mode and take further actions. When leaving fullscreen mode the old windowed canvas resolution gets restored and triggers another SDL_VIDEORESIZE event which - again - can be used to adapt the application to windowed mode. Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
2013-02-28support multiple arguments to default html print, printErrAlon Zakai
2012-08-09show progress on datafile downloadAlon Zakai
2012-07-23center progressAlon Zakai
2012-07-23add progress to shell.htmlAlon Zakai
2012-07-21nicer status textAlon Zakai
2012-06-18write preparing, not downloading when preparing downloaded dataAlon Zakai
2012-06-17define preRun and postRun in browser htmlAlon Zakai
2012-06-01but disable dump by defaultAlon Zakai
2012-06-01use dump when available instead of console.logAlon Zakai
2012-05-12show Running... when calling run()Alon Zakai
2012-05-12nicer html messages during load/startupAlon Zakai
2012-05-05fix fullscreen for closureAlon Zakai
2012-04-29support for fullscreen and pointer lock, and prevent oom from sdl event ↵Alon Zakai
queue overflow
2012-04-18do not specify canvas size in css, to allow code to modify the size more easilyAlon Zakai
2012-04-18Make src/shell.html HTML5 compliant by fixing incorrect DOM around head/body ↵Diclophis
tags, also declare a new CSS class 'emscripten' and make all generated elements use it so that we can prevent collision of additional elements if a developer chooses to modify this page and add additional elements, plus remove inline styles
2012-04-04Prevent contextmenu event on canvasBehdad Esfahbod
I'm doing this in the shell so it benefits everyone, not only glut.
2012-04-04Add border to canvasBehdad Esfahbod
2012-04-02add encoding to html to remove browser warningsAlon Zakai
2012-03-26show status messages for decompressing and clear status on runAlon Zakai
2012-03-26improve output textarea behaviorAlon Zakai
2012-03-25show 'Downloading' in html on startupAlon Zakai
2012-03-25update shell.html output for textareaAlon Zakai
2012-03-25clear html debug outputAlon Zakai
2012-03-25make html print output more debug friendlyAlon Zakai
2012-03-23fix sdl keyboard input and add a testAlon Zakai
2012-03-16show download number progressAlon Zakai
2012-03-15almost working SDL_image test, just need async decodingAlon Zakai
2012-03-06escape & in htmlAlon Zakai
2012-03-05properly handle html-unfriendly print() outputAlon Zakai
2012-01-27Add a TODO message to add EMSCRIPTEN_ENVIRONMENT laterEhsan Akhgari
2012-01-20Unify the 2D and WebGL contextsEhsan Akhgari
2012-01-20Enable SDL to create a 2D or WebGL context depending on what the caller wantsEhsan Akhgari
2011-12-31override print() by default, to avoid errors when using the browser print() ↵Alon Zakai
(print to printer) if it hasn't been overridden. Overriding is now possible through Module.print
2011-12-13make shell.html more robust if no canvas supportAlon Zakai
2011-12-12support for generating html in emcc, and a test for that that also tests ↵Alon Zakai
SDL, and some fixes for SDL