Elvas Tower: Handling throttle, brakes, etc. with mouse scrollwheel? - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Handling throttle, brakes, etc. with mouse scrollwheel? Rate Topic: -----

#1 User is offline   Siebren 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 139
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 30 January 2024 - 03:02 AM

Handling throttle, brakes etc. via the screen/mouse left button is in my opinion difficult. The handle never goes the way I want.

Did anyone thought about using the mouse wheel instead of the left button? Just move your mouse pointer above the handle and turn the mouse wheel in the correct direction. I have this working for the direction, which is easy, because it has only 3 values: forward, neutral and backwards. The two methods (left button/mouse wheel) could co-exist next to each other.

If there are fans of this mouse wheel usage, please let me know. Then I'll continue.

Siebren.

#2 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,405
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 30 January 2024 - 07:13 AM

Hello, Siebren.
Definitely yes.
The only thing (but, I hope, it can be defined through third value of the *.eng-file) - wheel's "sensitivity", in case of notchless controls.

#3 User is offline   Siebren 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 139
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 30 January 2024 - 07:29 AM

Yes, and direction. I see differences between handles.

So it might be too difficult. I would not like to add a third value to the *.eng file.

#4 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,405
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 30 January 2024 - 07:47 AM

Quote

Yes, and direction. I see differences between handles.

What was meant?

Quote

So it might be too difficult.

What namely?

Quote

I would not like to add a third value to the *.eng file.

But it does exist there since MSTS origin:
ThrottleLever ( 0 1 0,1 0
etc...

1-lowest value
2-highest value
3-"step's size"
4-initial value

#5 User is offline   pschlik 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 655
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 30 January 2024 - 08:58 AM

After playing flight sim enough I get quite used to using the mouse wheel to do control adjustments, and consistently find myself frustrated when I can't do that in other sims. It's honestly a much more consistent way to interact with controls than trying to click and drag, and every sim should have it.

#6 User is offline   Siebren 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 139
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 23 February 2024 - 11:22 AM

I've added mouse wheel support. It works on all the controls with left button mouse support. In principal mouse wheel forward means more: more throttle, more brake force. But for some locomotives it works the other way round. Can't do anything about this, it's the way the left button mouse handling for the control in that particular locomotive is handled. Also the movement of the control is sometimes the other way round. I guess when MSTS was developed mousses did not have a scroll wheel.

Mouse wheel support to be found in unstable https://james-ross.c...%2016-13-14.zip or later.

So I'm not 100% satisfied. Programming this topic was more trial and error. If one of the developers can do it better, be my guest.

I've also added this:

Attached Image: Capture.JPG

Hidden behind Control F5. Gives the rectangles where the control surface is layout (seen in FlightGear). The key combination Control F5 is randomly taken by me. Please suggest another one which might be more logical. Or if a developer has already a particular purpose for this key.

#7 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,835
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 23 February 2024 - 12:00 PM

Those are some great additions

#8 User is offline   Jack@Elvas 

  • Fireman
  • Group: Status: First Class
  • Posts: 124
  • Joined: 30-August 23
  • Gender:Male
  • Simulator:All
  • Country:

Posted 23 February 2024 - 03:15 PM

This looks fantastic Siebren!

It feels like an exciting time for OpenRails - so much progress is being made on multiple fronts!

- Jack

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,559
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 24 February 2024 - 02:19 AM

For me a very welcome feature!

#10 User is offline   Siebren 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 139
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 24 February 2024 - 11:51 AM

View PostWeter, on 23 February 2024 - 12:19 PM, said:

Hello.
*.cvf-file's control blocks have parameter DirIncrease() Could it be for this?
Is "MouseControlled() parameter just that "left button support", You're talking about?
So, we can now check the actual areas, where controls are being affected by cursor and adjust them to be more accurate?

In one of flight sims, control's area had two halves: + and - (sign was displayed by the pointer's arrow)
depending on where the pointer was placed, wheel's rotation increased or decreased control.

The DirIncrease suggestion did the trick. Good one and thanks. Fix in a new unstable.

The control area's: I first thought of the normal OR user. So that all the areas can be easily found. But of course if an engine builder could use it to see how the areas fit, that would also be nice.

Seen that too, the + and - sign on the controls. But that would be too difficult to implement for now. Scroll wheel implementation follows the current Left button Mouse click.

#11 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,405
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 24 February 2024 - 10:57 PM

Quote

But for some locomotives it works the other way round. Can't do anything about this, it's the way the left button mouse handling for the control in that particular locomotive is handled

Of course, there shouldn't be any "mystery", about why it works the other way with them.
But how about "mouse controlled"? Are all such controls affected by scrolling now?
I'm afraid, at the same time, that rectangular area matches with frame's size (graphic image of given control), so I doubt, it can be adjustable separately...
That's pity, as some areas would better being narrowed-down, for not to overlap and for cover the handle only.
At the same time, if not to use MSTS cab editor, there was no way to see them, so, Thank You!

Not bad anyway - appreciate Your work a lot.

#12 User is offline   Siebren 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 139
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 24 March 2024 - 10:29 AM

I've finished this mouse scroll wheel topic. Can be tested with the latest unstable.

It's for 2d cabs, not for 3d cabs. The last one is too complicated for me. Besides that for 3d cabs the mouse scroll wheel is already in use for changing the view. I could have tried to make the scroll wheel act as a view change when mouse not pointing to a control. But as I said, too complicated. Besides that it looks like 3d cabs are rare.

If a certain control is acting funny on the mouse wheel, please let me know. I might be able to correct. Especially for steam engines, as I do not have that much experience with those.

And a reminder, ctrl-F5 gives yellow squares where the mouse wheel is active. And a certain square gets highlighted when the mouse wheel is active for that control (thanks Mauricio!).

#13 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,405
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 24 March 2024 - 10:39 AM

Good news there.
Thanks.

#14 User is offline   Albertosaurio65 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 116
  • Joined: 31-August 20
  • Gender:Male
  • Location:Málaga, España
  • Simulator:Open rails
  • Country:

Posted 06 June 2024 - 05:15 AM

Hello, a question, I have been using this enhancement for a while and I love it, but I still have not found the key value that makes each turn of the mouse wheel move x%, since in some trains it moves from 50% to 50% and in others from 5% to 6%

Does it depend on the CVF? from the eng section?

Thank you very much for this and in advance

#15 User is offline   Siebren 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 139
  • Joined: 16-November 22
  • Gender:Not Telling
  • Location:Ede, the Netherlands
  • Simulator:open rails
  • Country:

Posted 07 June 2024 - 01:33 AM

I've pulled back this Pull Request for the mouse wheel support. Technically is was not programmed handy. One of the other developers will start programming this mouse wheel support from scratch. Please wait for this enhancement.

The CTRL-F5 displaying the yellow rectangles is still available as a separate Pull Request. Is still part of the unstable version of OR.

Siebren.

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users