Commit Graph

10561 Commits

Author SHA1 Message Date
TÖRÖK Attila d7d5928c21 chore: Follow rfd API change (set_description) 2023-09-18 00:00:45 +02:00
TÖRÖK Attila b8190660aa chore: Follow rfd API change (MessageDialogResult) 2023-09-18 00:00:45 +02:00
renovate[bot] 37e2c06034 fix(deps): update rust dependencies 2023-09-18 00:00:45 +02:00
Crowdin Bot 8885c35c54 chore: Update translations from Crowdin 2023-09-17 22:45:09 +02:00
Lord-McSweeney 98cfa60832 avm2: Namespace improvements 2023-09-17 22:22:50 +02:00
Lord-McSweeney 6eddd3532e avm2: Support Error 1089 2023-09-17 22:03:05 +02:00
Lord-McSweeney 613c21a5d2 avm2: Minor Video improvements
Throw RangeError when Video is initialized with negative height or width
Stub Video.clear
2023-09-16 22:55:03 +02:00
sleepycatcoding 6028505f8c avm2: Small XML code cleanup 2023-09-15 20:20:12 +02:00
Crowdin Bot 7f416f85a8 chore: Update translations from Crowdin 2023-09-14 23:50:25 +02:00
Daniel Jacobs 33eb739ee6 web: Add width, height, and type to RufflePlayer (fix #13176) 2023-09-14 23:49:31 +02:00
sleepycatcoding ecbf325d41
avm2: Improve XML set_property_local implementation (#13041)
* avm2: Add error 1087

* avm2: Add deep_copy method to XmlObject

Changes existing AS3 copy method to use this instead

* avm2: Add a few utility methods to E4XNode

* avm2: Change XML.replace impl to use new utility methods

* avm2: allow setting XML/XMLList as a element

* avm2: Fix `xml_namespaced_property` test failure

* chore: fmt

* chore: Appease clippy

* avm2: Add test for XML/XMLList as element
2023-09-14 21:33:32 +00:00
Ikko Eltociear Ashimine 67f2d85e38 core: fix typo in movie_clip.rs
occured -> occurred
2023-09-13 23:03:14 +02:00
sleepycatcoding b5fdd9142f avm2: Coerce value in set slot opcode
This was causing a bunch of implicit conversion test failures.
2023-09-13 23:02:44 +02:00
Positron832Alt 591e4b4da1
desktop: Change "Open URL Mode" to "Open Links" (#13099) 2023-09-13 22:33:17 +02:00
Lord-McSweeney 53199a5116
avm2: Fix a stub message (#13140) 2023-09-11 17:51:55 -04:00
Nathan Adams f092fa5809 core: Make a glyph shape handle Optional, for ie whitespace 2023-09-09 00:01:20 +02:00
Nathan Adams bcf47622f0 core: Don't make Font/GlyphSource Clone, it's super wasteful if something did actually clone it 2023-09-09 00:01:20 +02:00
Nathan Adams 8d71ab3436 core: Make Font ascent and descent i16, as it can technically be negative 2023-09-09 00:01:20 +02:00
Nathan Adams 3758f27490 core: Move kerning info to GlyphSource 2023-09-09 00:01:20 +02:00
Nathan Adams b8ce4e9249 core: Extract out GlyphSource from FontData 2023-09-09 00:01:20 +02:00
Nathan Adams 2cd10f614e core: Split up Drawing's registration of the shape vs rendering of the shape 2023-09-09 00:01:20 +02:00
Nathan Adams 4d4e9b55a2 core: Refactor Glyph's internal Shape a bit, and make it not contain two duplicate shapes 2023-09-09 00:01:20 +02:00
Nathan Adams e8e7e91584 core: Store advance separately in Glyph 2023-09-09 00:01:20 +02:00
Aaron Hill 981dedafd2 avm2: Fix avmplus.describeTypeJSON bugs and add test 2023-09-08 17:52:12 -04:00
Aaron Hill 34fb2e4f48 avm2: Fix some Object method signature definitions
This is exposed by avmplus.describeTypeJSON
2023-09-08 17:52:12 -04:00
Daniel Jacobs d6bc408286 web: Don't show context menu when any modal is open (fix #13096) 2023-09-08 20:26:18 +02:00
nosamu a4a9653ecd avm2: Fix a RangeError message 2023-09-08 09:57:07 -04:00
Aaron Hill a3e0a84a3d core: Convert two unused doc comments to normal comments
This fixes Nightly warnings
2023-09-07 19:36:23 -04:00
Aaron Hill 1c0ae0b6d8 render: Bump wgpu to 0.17 and naga to 0.13 2023-09-07 18:49:59 -04:00
Lord-McSweeney 20db9f8326
avm2: Implement XML.setName (#12979)
* avm2/tests: Implement XML.setName; add a test

* avm2: Basic support for QNames in XML.setName (no namespace support yet)

* avm2: Reorder order of Attribute/Element/PI checks in XML.setName

* avm2: Throw error #1117 when the name passed to XML.setName is not a valid XML name
2023-09-07 21:47:02 +02:00
Adrian Wielgosik 0e507e870d ci: Only run clippy on Linux 2023-09-07 18:51:00 +02:00
Adrian Wielgosik f1a8fa8840 ci: only save cache on master builds 2023-09-07 18:51:00 +02:00
sleepycatcoding 9c7eb90d69 avm2: Implement XML.prependChild 2023-09-07 01:13:16 +02:00
Kornelius Rohrschneider 53ba75d587 Move logarithmic volume transformation to AudioMixer
Previously, the volume transformation to adapt the volume for
logarithmic hearing has been performed in the VolumeControls Rust struct
and TypeScript class each.
Since this calculation is the same on desktop and web and should be
implemented in the audio backend, it has been moved into the
AudioMixer::mix_audio method.
The VolumeControls struct and class now only calculate the linear volume
out of the checkbox and the slider.
Player::set_volume and Player::volume now don't take and return the
adapted volume, but use the linear volume (which gets saved internally).
2023-09-07 00:51:58 +02:00
Kornelius Rohrschneider f04470247e web: Add web volume controls
The web version of Ruffle now has a volume controls window. It can be
accessed through the right-click menu (Right-click > Volume controls).
It contains a mute button and a slider from 0 to 100.

To achieve this, a new volume controls modal has been added to the
shadow template.
TypeScript is used to create texts, set the controls and add event
listeners to update the settings and controls when being changed.

The volume settings set in the GUI are saved in a new VolumeControls
class, which is also used to calculate the real volume (adapted for
logarithmic hearing) out of the entered volume and the mute checkbox.
As soon as the volume is changed in the GUI, the real volume will be set
in the Ruffle instance.

The existing ftl files have been adapted (and new ones have been
created) to include the new multilingual text in the right-click menu
and the volume controls window.

This closes #1771.
2023-09-07 00:51:58 +02:00
Kornelius Rohrschneider a550a998c3 desktop: Add desktop volume controls
The desktop version of Ruffle now has a volume controls window. It can
be accessed through the menu bar (Controls > Volume controls).
It contains a mute button and a slider from 0 to 100.

The volume settings set in the GUI are saved in a new VolumeControls
struct, which is also used to calculate the real volume (adapted for
logarithmic hearing) out of the entered volume and the mute checkbox.
As soon as the volume is changed in the GUI, the real volume will be set
in the player (if the player exists).

The player doesn't set its volume level according to the PlayerOptions
after its creation anymore. Instead, RuffleGui::on_player_created now
gets the player and sets its volume to the real volume set in the GUI.
The volume in the GUI itself defaults to the PlayerOptions value.
This also fixes the issue that the PlayerOptions volume has previously
not been adapted for logarithmic hearing.

The existing ftl files have been adapted (and new ones have been
created) to include the new multilingual text in the menu bar and the
volume controls window.
2023-09-07 00:51:58 +02:00
Crowdin Bot d195da59af chore: Update translations from Crowdin 2023-09-06 23:55:17 +02:00
Adrian Wielgosik c6bad73cb2 avm2: Use ArrayObject::empty() instead of array.construct() 2023-09-06 23:53:22 +02:00
Aaron Hill ee62044cad avm2: Implement avmplus.describeTypeJSON and use it for describeType
Some SWFS (in particular, anything using Unity) call
avmplus.describeTypeJSON, and rely on the behavior of the various
flags.

This PR changes our internal implementation to implement
describeTypeJSON (producing an `Object` with dynamic fields).
We then convert this to XML in `describeType`, using an implementation
inspired by avmplus.

The existing describeType tests are passing - in a follow-up PR,
I'll add tests for describeTypeJSON
2023-09-06 23:53:22 +02:00
Lord-McSweeney 2ccd45a2af avm2: Implement Array.insertAt 2023-09-06 23:03:57 +02:00
sleepycatcoding db60964e2b avm2: Bail early if character is smaller than range start 2023-09-06 23:01:34 +02:00
sleepycatcoding 936eb777e8 avm2: Implement isXMLName 2023-09-06 23:01:34 +02:00
Crowdin Bot 654799b1a9 chore: Update translations from Crowdin 2023-09-06 12:22:24 +02:00
Aaron Hill 62e9eb9d6f avm2: Remove unnecessary '&mut self' from Object methods 2023-09-05 17:30:28 -04:00
renovate[bot] dabc2d56b9 fix(deps): update rust dependencies 2023-09-04 10:25:24 +02:00
Crowdin Bot 2996f97578 chore: Update translations from Crowdin 2023-09-02 15:43:08 +02:00
renovate[bot] d14550e851 chore(deps): update node.js dependencies 2023-09-02 15:19:06 +02:00
renovate[bot] cbd0c89f9b chore(deps): update npm to v10 2023-09-02 15:10:07 +02:00
Lord-McSweeney 5edba670de tests: Add a test for using Shared Objects without a root movie 2023-08-31 19:58:53 -04:00
Lord-McSweeney c454faf064 avm2: SharedObject::get_local should use URL of root movie 2023-08-31 19:58:53 -04:00