phileday / whirligig-old-issues

Whirligig Media Player bug tracking
0 stars 0 forks source link

Feature request: mouse binding support #65

Open cheater opened 4 years ago

cheater commented 4 years ago

It would be great to be able to change the mouse bindings in Whirligig. eg being able to move the mouse around to pan the view around would be great help. Also binding the various buttons would be very useful. Note that many mice have multiple buttons, so you'd need to either: A) be able to detect all the buttons a mouse has, and display them all in the config UI B) have a dialog like this:

  1. The UI has a list of mouse buttons and their associated functionality like this:
    • Mouse 0: select / enter menu
    • Mouse 1: quick settings
    • Mouse 2: play/pause
    • Mouse Wheel Up: skip forward +3 seconds
    • Mouse Wheel Down: skip backward -3 seconds
    • Mouse Horizontal Axis: pan view left and right
    • Mouse Vertical Axis: pan view up and down
    • button that says "add binding"
  2. You click "add binding"
  3. You are asked to press the mouse button you'd like to bind. E.g. if I click one of the side buttons it would be registered as "Mouse 4" or "Mouse 5".
  4. This new button input gets added to the list in the UI, but has no function assigned to it, like this:
    • Mouse 4: click to assign
  5. You can click on it, and select the function you'd like it to perform.

Note that B is probably much better, because there's a bunch of different mice, and you can't display a UI like you can with the Xbox controller. Some mice have 20 buttons, and having a list that dynamically expands depending on what the mouse does is probably the only way to display all of them.

I think B is probably also better because I have never seen a game that is able to detect all mice buttons. So it's probably not something that Unity would be able to do, either. I think the concept here is that Unity handles input events from Windows, and Windows has some huge list of inputs it could send, eg 255 mouse buttons or something like that, and Unity will have to handle whatever input is used, but obviously no game coded in Unity will display 255 mouse buttons because that would be stupid. So the list needs to be dynamic, but without the user actually clicking all the buttons, we can't know what Windows will send to Unity. That's why I think there needs to be a dialog that prompts the user to click the button that they would like to be bound.

Also, it's probably necessary to do the following things:

  1. make sure at least one mouse button is assigned to the action of entering the menu and clicking items in it. But make sure that it doesn't have to be the left mouse button.
  2. In the menus, the mouse should always only be used to move the pointer around.
  3. There should be a mouse sensitivity option, separate for vertical and horizontal. And there should be a checkbox that says "separate vertical and horizontal sensitivity" and if it's unchecked there is only a single slider for both.
  4. There should be an X next to every mouse button binding that would delete that binding, except for:
    • buttons 0, 1, and 2
    • mouse horizontal and vertical axis
    • any button that has the click action assigned to it