Commit Graph

675 Commits

Author SHA1 Message Date
Moulins da6e2a96bf desktop: properly populate base and proxy URL fields from option struct
Fixes #11461
2023-06-11 12:46:13 -05:00
Crowdin Bot e8925832a1 chore: Update translations from Crowdin 2023-06-10 10:09:19 +02:00
AllinolCP 44ff49aa53
core: Fix status code implementation for AVM1 and implement HTTPStatusEvent.HTTP_STATUS for avm2 (#11360) 2023-06-10 03:06:26 +00:00
renovate[bot] a621472336 chore(deps): lock file maintenance rust dependencies 2023-06-09 20:17:25 +03:00
doomsdayrs 16210cbcf6 desktop: Add reverse engineered logo svg
There was no source file for the various logos.

I used the icon file provided by @nosamu and used existing pngs to recreate the style of the logo.
2023-06-09 18:21:56 +02:00
Nathan Adams 6ec01f3ecb desktop: Add dummy External Interface option 2023-06-09 13:03:46 +02:00
Aaron Hill 66f3198f50 desktop/web: Increase stack size on Windows and wasm
This works around a stack overflow with Bloonts Tower Defense 5,
where we have over 400 stack frames at once due to deep
`construct_frame` recursion in `goto` execution.
2023-06-08 22:17:27 -05:00
Crowdin Bot 650f872b19 chore: Update translations from Crowdin 2023-06-09 01:51:23 +02:00
Moulins fcd9935a81 desktop: Add `File > Reload` menu command
Also remove redundant `has_movie` parameter in `RuffleGui::update`
2023-06-09 00:42:03 +02:00
Moulins c1a3caefea desktop: point `Open Advanced`'s file dialog to the current file's directory 2023-06-09 00:42:03 +02:00
Moulins d7a056df8e desktop: keep options in-sync when using `Open` or drag-and-dropping a file 2023-06-09 00:42:03 +02:00
Moulins ac69926b5e desktop: add `Ctrl+Shift+O` shortcut for `Open Advanced` 2023-06-09 00:42:03 +02:00
Moulins 08fe4a4c94 desktop: Add button to clear all movie params. in `Open Advanced` 2023-06-09 00:42:03 +02:00
Moulins 5e1716d7e8 desktop: remember `Open Advanced` options across movie loads
Makes opening the same movie repeatedly less tedious.

Note that `Open` still ignore this and will use the default options
provided on the command-line.
2023-06-09 00:42:03 +02:00
Crowdin Bot 93f5869005 chore: Update translations from Crowdin 2023-06-08 00:57:49 +02:00
Crowdin Bot 808deaa378 chore: Update translations from Crowdin 2023-06-05 09:00:51 +02:00
renovate[bot] f1fe998869 chore(deps): lock file maintenance rust dependencies 2023-06-04 22:53:18 -05:00
Crowdin Bot 9767ffca96 chore: Update translations from Crowdin 2023-06-03 15:58:24 +02:00
Nathan Adams 16ce9aa437 core: Add debug rects to debugger 2023-06-03 09:11:06 +02:00
Nathan Adams e12e2a2e54 core: Initial Debug UI 2023-06-03 09:11:06 +02:00
Adrian Wielgosik c8fc810fa6 desktop: rewrite AS3 warning popup in egui 2023-05-31 23:21:30 +02:00
Adrian Wielgosik 5d3544ddc7 desktop: Simple hack to stop ignoring egui redraws 2023-05-30 23:55:31 +02:00
Crowdin Bot 6dc3743f4b chore: Update translations from Crowdin 2023-05-30 23:21:28 +02:00
tinaun ff518b9deb use light menus on light theme & detect changes 2023-05-30 23:07:09 +02:00
Adrian Wielgosik 8d6c08df4d Desktop: Stop busy looping when idling 2023-05-29 22:51:40 +02:00
Nathan Adams d99415c644 desktop: Don't use winit workaround for File->Open, to avoid unresponsive ruffle in that case alone 2023-05-29 22:12:56 +02:00
Nathan Adams 59d917b15a desktop: Default open the Advanced Open dialog 2023-05-29 22:12:56 +02:00
Nathan Adams 0c10e2a7b7 desktop: Add advanced open dialog 2023-05-29 22:12:56 +02:00
Nathan Adams 9e9ee361c4 desktop: Pass PlayerOptions when loading swfs, defaulting to the CLI args 2023-05-29 22:12:56 +02:00
Nathan Adams a86aff07a6 desktop: Use new PlayerOptions struct for player building, not CLI args directly 2023-05-29 22:12:56 +02:00
Nathan Adams 558fea2a7c desktop: Add PlayerController:handle_event that also checks for player pause status 2023-05-29 21:23:00 +02:00
Nathan Adams 101277a32b desktop: Add suspend/resume buttons 2023-05-29 21:23:00 +02:00
renovate[bot] 847dece735 chore(deps): lock file maintenance rust dependencies 2023-05-28 23:54:33 -05:00
Aaron Hill 14c6d1d959 avm2: Implement URLRequest.requestHeaders
These are directly set on the underlying navigator's HTTP
request type, and get printed out in our test navigator backend.

No validation of the header names is performed - on web, this will be
enforced by the browser.
2023-05-28 12:07:37 -05:00
Crowdin Bot e98230c988 chore: Update translations from Crowdin 2023-05-27 00:34:44 +02:00
TÖRÖK Attila 6d76e9669c nit: Github -> GitHub 2023-05-25 10:40:47 +02:00
Nathan Adams defe4d8308 desktop: Support dropping swfs onto the player 2023-05-24 23:50:48 +02:00
Nathan Adams 3e35e7887a desktop: Add a few comments about Player related structs 2023-05-24 23:50:48 +02:00
Nathan Adams ce714b92b6 desktop: When git info is unknown, don't show it 2023-05-24 23:50:48 +02:00
Nathan Adams cd54dc3bc7 desktop: Fix crash on minimize 2023-05-24 23:50:48 +02:00
Nathan Adams 8acd3e653a desktop: Use scale factor to determine menu height 2023-05-24 23:50:48 +02:00
Nathan Adams d8bfb003c5 desktop: Switch to egui 0.22.0 2023-05-24 23:50:48 +02:00
Nathan Adams 67370b0ced desktop: Revert attempts to fix x11 crash and stop relying on inner_size 2023-05-24 23:50:48 +02:00
Nathan Adams cb87dfed7f desktop: Move backend code into a backends mod 2023-05-24 23:50:48 +02:00
Nathan Adams 12e2758464 desktop: Localise texts 2023-05-24 23:50:48 +02:00
Nathan Adams 4600dc5c78 desktop: Forcefully update egui screen_rect to attempt to solve x11 crash 2023-05-24 23:50:48 +02:00
Nathan Adams 2ab2faa24d desktop: Don't recreate surface on resize events, but when drawing and the size is different 2023-05-24 23:50:48 +02:00
Nathan Adams 5c22bcddc6 desktop: Add more links to help menu 2023-05-24 23:50:48 +02:00
Nathan Adams 1dbfa19b04 desktop: Configure the surface immediately 2023-05-24 23:50:48 +02:00
Nathan Adams d11df54291 desktop: Hide menu in fullscreen 2023-05-24 23:50:48 +02:00
Nathan Adams ee59bd006b desktop: Add close movie menu item 2023-05-24 23:50:48 +02:00
Nathan Adams 3005158311 desktop: Always show the menu bar 2023-05-24 23:50:48 +02:00
Nathan Adams 7d7edec08c desktop: Add much more info to About dialog 2023-05-24 23:50:48 +02:00
Nathan Adams 01e33d82c9 desktop: Use vergen to get version info 2023-05-24 23:50:48 +02:00
Nathan Adams f6d0fcf822 desktop: Don't allow resizing of about and open-url dialogs 2023-05-24 23:50:48 +02:00
Nathan Adams e97d32dbc7 desktop: Recreate Player for each movie, and don't start with a Player unless a movie has been specified 2023-05-24 23:50:48 +02:00
Nathan Adams df51531de6 desktop: Move Player creation into PlayerController::new 2023-05-24 23:50:48 +02:00
Nathan Adams 6257c1218f desktop: Make PlayerController.get() return an Option, and handle that 2023-05-24 23:50:48 +02:00
Nathan Adams 2de0b5e7e0 desktop: Wrap Player in a new PlayerController 2023-05-24 23:50:48 +02:00
Nathan Adams 419330ecd5 desktop: Import utils nicer in app.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 73b8f80f57 desktop: Move parse_url and pick_file to util.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 34b1c671a8 desktop: Move --timedemo stuff to time_demo.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 91db9b1f55 desktop: Moved winit_to_ruffle_text_control, winit_to_ruffle_key_code, winit_key_to_char and get_screen_size to util.rs 2023-05-24 23:50:48 +02:00
Nathan Adams d69ffd3a46 desktop: Moved App struct to app.rs 2023-05-24 23:50:48 +02:00
Nathan Adams ff5377a8a9 desktop: Moved trace_path and parameters to Opt 2023-05-24 23:50:48 +02:00
Nathan Adams f54685d656 desktop: Move Opt into cli.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 998302aa77 desktop: Made movie optional when rendering 2023-05-24 23:50:48 +02:00
Nathan Adams a3d3230baf desktop: Turn MovieView into a custom render target 2023-05-24 23:50:48 +02:00
Nathan Adams 67fed1159c desktop: Refactor gui controller into its own file 2023-05-24 23:50:48 +02:00
Nathan Adams 9e17acdb2a desktop: Refactor movie blitting into its own file 2023-05-24 23:50:48 +02:00
Nathan Adams b9322ba93a desktop: Render game separately to UI, blit both onto surface 2023-05-24 23:50:48 +02:00
Mike Welsh 5bf43f9025 desktop: Add Open URL option 2023-05-24 23:50:48 +02:00
Mike Welsh e5a874065e desktop: Switch to loaded state immediately when no SWF running 2023-05-24 23:50:48 +02:00
Mike Welsh cac83320e4 desktop: Check if egui requests a redraw 2023-05-24 23:50:48 +02:00
Mike Welsh 83c3970003 desktop: Add About screen 2023-05-24 23:50:48 +02:00
Mike Welsh 3e150360a2 desktop: Don't show file dialog on startup 2023-05-24 23:50:48 +02:00
Mike Welsh 5efcb90293 desktop: Show menubar by holding Esc 2023-05-24 23:50:48 +02:00
Mike Welsh cb8b8d264c desktop: Implement Open menu option 2023-05-24 23:50:48 +02:00
Mike Welsh 3f878cc869 desktop: Take ownership of `EventLoop` on `App::run`
Change `App::event_loop` to an `Option` that will be taken on
`App::run` so that `App::run` can continue to call methods on
`self` later.

This is a little awkward, and better might be to remove `App::new`
and make `App:run` return `Result<!, Error>,` but `!` types are
experimental.
2023-05-24 23:50:48 +02:00
Mike Welsh c00b4bf55c desktop: Initial GUI work 2023-05-24 23:50:48 +02:00
Mike Welsh ef1125f456 desktop: Add egui crates 2023-05-24 23:50:48 +02:00
nosamu 91330d4a9f desktop: Fire both KeyDown and TextControl events
Fixup for #11059, which broke left/right arrows on desktop
2023-05-22 21:24:35 +02:00
renovate[bot] 5d2477fe98 chore(deps): lock file maintenance rust dependencies 2023-05-22 19:12:08 +03:00
nosamu 7dfc36c6fc web: Support pasting from clipboard 2023-05-21 15:26:42 +02:00
nosamu ee956927b7 core: Fix TextField.maxChars handling and address other reviews 2023-05-21 15:26:42 +02:00
nosamu 4e579b7e68 core: Move left/right arrow handling to `text_control_input` 2023-05-21 15:26:42 +02:00
nosamu 0dbb4c46e4 core: Move `Delete` and `Backspace` handling to `text_control_input()`
Co-authored-by: jmckiern <jmckiern@tcd.ie>
2023-05-21 15:26:42 +02:00
nosamu fab72ac01c core: Implement handling of text control input
Co-authored-by: jmckiern <jmckiern@tcd.ie>
2023-05-21 15:26:42 +02:00
jmckiern 67d74047a9 core: Add clipboard_content getter 2023-05-21 15:26:42 +02:00
Rasmus M d15d64e86e
desktop: Add volume option to CLI 2023-05-09 06:29:46 +00:00
Nathan Adams 9c2e77c88f desktop: Use system preferred language 2023-05-09 00:06:49 +02:00
Nathan Adams 229c301e18 core: Add i18n module using Fluent 2023-05-09 00:06:49 +02:00
Kornelius Rohrschneider fe56f8d212 core: Implement suggested changes in PR to documentation & code
- Documentation has been added, improved and clarified.
- The code of a string concatenation has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 27738a492e web: Implement suggested changes in PR to navigate_to_url handling
The suggested changes to the navigate_to_url handling in the feedback to
the pull request have been implemented.
Therefore, this commit consists of multiple smaller changes:

1. The allow_javascript_calls variable has been removed (as a CLI
argument and in the navigator). Javascript calls are now always denied
on desktop. This is because setting the argument was useless; no
javascript was executed in any case, at most, just a browser tab opened.
Therefore, it makes no sense to include this option.
2. The NavigateWebsiteHandlingMode default value has been provisionally
changed from Confirm to Allow. In the future (after a GUI toolkit has
been added), the default confirmation windows should include a "Save
this preference" checkbox.
3. The NetworkingRestrictionMode enum has been renamed to
NetworkingAccessMode since the previous naming was counter-intuitive.
4. The NavigateWebsiteHandlingMode enum (and variables related to it)
have been renamed to OpenURLMode to simplify the name.
5. The documentation has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 44ef22f646 core: Add navigate_to_url call configuration options
New configuration options (changing the navigate_to_url call handling)
have been added. The default behaviour has been changed as well.

A NavigateWebsiteHandlingMode enum has been added to Ruffle (in Rust and
Typescript). It contains the values "Allow", "Confirm" and "Deny" and
describes how navigate_to_url website calls should be handled. Allow
means that all website calls are allowed, Confirm means that a
confirmation window opens with each website call and Deny means that all
website calls are denied.
A respective navigate_website_handling_mode variable has been added to
the desktop CLI and to the JS config. The default value is "Confirm" in
each. The variable is given to the navigator (ExternalNavigatorBackend
or WebNavigatorBackend, depending on the platform) and is saved in it.
On each navigate_to_url website call, the respective navigator is now
checking navigate_website_handling_mode and acts correspondingly (allows
it, opens a confirmation window or denies it).
This changes the default behaviour of Ruffle from allowing all website
calls to opening a confirmation window with each website call.
On Safari, the confirm window can cause the background music to stop,
but this seems to be an issue with Safari.
Closes #838.

Additionally, an allow_javascript_calls variable (which defaults to
false) has been added to the desktop CLI. The variable is given to the
desktop navigator and is saved in it.
If a navigate_to_url javascript call is executed on desktop, the
navigator is now checking allow_javascript_calls and acts
correspondingly (allows it or denies it).
This changes the default behaviour of Ruffle on desktop to not allowing
javascript calls.
Closes #9316.
2023-05-02 17:13:42 +02:00
Toad06 45795c9d24 desktop/web: Add a mouse enter event 2023-04-25 18:01:49 +02:00
relrelb ff7c458739 core: Accept borrowed strings in `NavigatorBackend::navigate_to_url`
This avoids some unnecessary clones.
2023-04-24 22:06:47 +03:00
nosamu 3cde3482f4 core: Add frame rate config option 2023-04-24 14:01:37 +02:00
renovate[bot] 3b3c08a354 chore(deps): lock file maintenance rust dependencies 2023-04-24 01:22:07 +02:00
nosamu 6e8929e6d0 desktop: Handle relative URLs in navigate_to_url
Fixes #10773
2023-04-22 13:57:27 +02:00