summaryrefslogtreecommitdiff
path: root/platform/javascript/display_server_javascript.h
AgeCommit message (Collapse)Author
2021-02-19[HTML5] Better fullscreen, canvas resizing.Fabio Alessandrelli
Three canvas resize policies: - `None`: Godot window settings are ignored. - `Project`: Godot handles the canvas like a native app (resizing it when setting the window size). - `Adaptive`: Canvas size will always adapt to browser window size. Use `None` if you want to control the canvas size with custom JavaScript code.
2021-02-12[HTML5] Detect screen scale and DPI.Fabio Alessandrelli
`OS.get_screen_scale` will now return the `window.devicePixelRatio` value, `OS.get_screen_dpi` uses CSS media queries to find approximate DPI value for the current display. `OS.get_screen_size` also return the actual screen size (not the CSS pixel size).
2021-01-18[HTML5] Custom Gamepad library to allow remapping.Fabio Alessandrelli
No longer use emscripten functions for gamepads, implement them as library functions in library_godot_display.js instead. This allows us to do a better job at "guessing" vendorId, productId, OS, etc. thus allowing us to better find the remapping for the controller.
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-11-10[HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli
The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
2020-09-18[HTML5] Add override keyword, cleanup methods.Fabio Alessandrelli
2020-07-27Implement HTML5 cancel/ok button swap on Windows.Fabio Alessandrelli
Platform is detected on init via the `navigator.platform` string.
2020-07-01[JS] Check canvas size each loop, force redraw.Fabio Alessandrelli
Fix compatibility issues, achieve smoother resizing.
2020-07-01More static methods in DisplayServerJavaScript.Fabio Alessandrelli
Were static functions in cpp file, polluting global namespace.
2020-07-01Refactor canvas ID and locale handling.Fabio Alessandrelli
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10Add drop files functionFabio Alessandrelli
2020-05-10DisplayServerJavaScript implementation.Fabio Alessandrelli