Construct 3 suggestions & ideas

Suggest and vote on ideas for Construct 3! Please note this is only one aspect of planning. We do not guarantee any features here will be implemented, even if they are top-voted ideas. The aim is just to collect feedback. Remember to search for existing submissions before adding an idea, describe your ideas as comprehensively as possible, and vote for plausible ideas that are well thought out. Please see our full guidelines on suggesting features.

Global Javascript prompt() function compatible with web workers mode

As of r194, the runtime patches in a global alert() function in worker mode.
(Source https://www.construct.net/en/forum/construct-3/scripting-51/scripts-action-cant-work-151187)

Could we also have a global prompt() function working in web workers mode, please?

I need to prompt the user to input short texts and I'd like it to be through a native browser popup, which is the only simple solution I could find to properly adapt the user experience to screen size, keyboard etc. The javascript prompt() function is very convenient to achieve this, but it can't be used in web workers mode as far as I know.

Thank you!

  • Stéphane Martin
  • Jan 6 2021
  • No status
  • Attach files
  • Admin
    Ashley Gullen commented
    8 Jan 11:52am

    It is best practice to use input fields and not dialogs for such inputs. Virtually all apps and websites out there do so using input fields.

  • Stéphane Martin commented
    6 Jan 08:07pm

    Because on mobile devices, to get simple inputs like room name or nickname it can be better to rely on basic dialogs which don't require the developer to care about their size or whether the user's preferred virtual keyboard (or even a speech-to-text interface) will be invoked.

    I think many apps, not necessarily made with Construct, rely on built-in browser dialogs for such purposes, knowing that the user experience will be consistently exactly as expected.

  • Admin
    Ashley Gullen commented
    6 Jan 05:26pm

    Why not use a text input object or some other approach? These built-in browser dialogs tend to only be for basic diagnostic purposes and aren't really widely used in practice.

  • +2