ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.77k stars 819 forks source link

Decide how to implement the Ruffle GUI #895

Open Herschel opened 4 years ago

Herschel commented 4 years ago

We should plan on how to handle various GUI elements for the player itself, on both desktop and web.

There are several approaches we can take. We don't necessarily have to decide on the same solution for everything (for example, we could use some native UI for file loading on desktop, but also render our own UI for message dialogs, etc.).

Here are the various areas of UI we might need:

blackjyn commented 4 years ago

For desktop and mobile GUI , we don't even need Ruffle. This is because AIR is still alive so we can target directly to mobile/desktop. No plugins required.

We should rather focus on web target as this is the "missing" part of Flash.

Justin-CB commented 4 years ago

For the web:

Message dialogs can be opened on the web using window.alert() in JavaScript.

Right-click menus can be made using the contextmenu event in JavaScript(the return value of the event handler determines whether or not the normal browser context menu is displayed).

The settings menu for individual swf's on the web can be an HTML element(it can be on top using z-index in CSS, I believe). The global settings interface for the browser extension is more or less standard & I already have an open pull request for that. Opening the global settings page from a right-click menu would probably need to use custom events to break out of sandboxing.

desertking commented 4 years ago

In my experience I would highly suggest for the web-player:

right-click (desktop): open context-menu with "fullscreen" "un/mute" option mobile: global "fullscreen" and "un/mute" "top right, top left, bottom left, bottom right" (option to show the 2 icons/buttons)

pre-loader: The player desperately needs a pre-loader, also i get freezes in my "dom" and I can't interact with the website sometimes when the .swf is loaded which is a no-go

virtual gamepad: "top right, top left, bottom left, bottom right" in non fullscreen version option which overlays the game. In fullscreen landscape you can easily put a keypad to the left next to the game and the buttons right. (customization for webmasters)

geraldkrug commented 3 months ago

http://geraldkrug.epizy.com/ruffle/an1.html Try this on a cell phone in landscape.