nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

`WebUI:SetFocus` prevents game inputs to work #741

Closed Timmy-the-nobody closed 2 years ago

Timmy-the-nobody commented 2 years ago

Prerequisites

Your Environment

Description

After a SetFocus call on a WebUI it seems like all pressed input are ignored by the game outside of this WebUI. It prevents the console or the escape menu to be opened, but it also lead to some weird behaviours, like a button that doesn't work because it's binded to toggle a WebUI (would work to open the UI but not to close it)

Steps to reproduce the behavior

  1. Create a WebUI
  2. Call SetFocus on it
  3. Try to open the console, or the escape menu

Expected behavior

Inputs should be triggered outside of the WebUI as well.

Actual behavior

What's in the issue title and description

gtnardy commented 2 years ago

Fixed, thanks

gtnardy commented 2 years ago

Just a quick note: It is indeed not supposed to support game bindings or input when having a WebUI with focus. But it is supposed to have ESC working always.

Timmy-the-nobody commented 2 years ago

Just a quick note: It is indeed not supposed to support game bindings or input when having a WebUI with focus. But it is supposed to have ESC working always.

Then there's no way to have keyboard input working in the world and in a WebUI at the same time?

vugi99 commented 2 years ago

I think functions were added to pass key events into webuis

vugi99 commented 2 years ago

C40BE432-2D61-48B4-A9E8-55EA59A30322

Timmy-the-nobody commented 2 years ago

I think functions were added to pass key events into webuis

it would complicate the thing unnecessarily in my opinion check this canny idea for more context

gtnardy commented 2 years ago

You always only have one element with focus at a time, this is an universal concept, even on Unreal if you have a widget with focus, other widgets will not get "Key Input" events anymore, neither game inputs.

Timmy-the-nobody commented 2 years ago

You always only have one element with focus at a time, this is an universal concept, even on Unreal if you have a widget with focus, other widgets will not get "Key Input" events anymore, neither game inputs.

Hmm, it worked fine with ultralight tho