Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Emscripten shell mouse events #2634

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ArnisLielturks
Copy link
Contributor

Mouse cursor visibility updates for the new html shell.

@ArnisLielturks
Copy link
Contributor Author

All samples available here: https://mouse-events.frameskippers.com/
Might be hard to notice any changes, but this basically fixes the rotation when mouse pointer is locked inside the canvas. Previously canvas captured the mouse pointer and sometimes you were not able to fully rotate the camera around the character. It allowed to rotate the camera until the cursor hit the canvas border.

@eugeneko
Copy link
Contributor

The issue with fullscreen-windowed transition became worse.

STR:

  1. Open sample that always captures mouse (e.g. S13)
  2. Capture mouse
  3. Go to fullscreen (I use F11)

Now the mouse movement is completely disabled (although clicks work).
In current Urho samples it becomes alive when I click any mouse button.
In PR samples it doesn't and I have to Esc and re-capture mouse in order to make it work.

Win10, Chrome x64, 81.0.4044.138

@@ -167,7 +174,13 @@ void EmscriptenInput::RequestPointerLock(MouseMode mode, bool suppressEvent)
{
requestedMouseMode_ = mode;
suppressMouseModeEvent_ = suppressEvent;
#ifdef URHO3D_CUSTOM_SHELL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we have "custom" shell and when is it "standard"?
Is "standard" shell even supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be honest. I'm trying to keep the support for the legacy emscripten shell as it was before until I resolve all the important issues with the new shell. Once that's done, I'm planning to remove it completely.

@github-actions
Copy link

Marking this stale since there has been no activity for 30 days.
It will be closed if there is no activity for another 15 days.

@github-actions github-actions bot added the stale label Jun 30, 2020
@weitjong weitjong added backlog and removed stale labels Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants