Elvas Tower: Managing multiple screen pages on a display in 2D and 3D cabs - 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.
  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Managing multiple screen pages on a display in 2D and 3D cabs Rate Topic: -----

#11 User is offline   Csantucci 

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

Posted 02 November 2021 - 08:53 AM

Hi Cédric,
that's a powerful feature indeed. I think that one feature does not exclude the other. I may think that there are people which are more comfortable working with .cvf files instead of generating Javascript code, even at the cost of less power, while for others your feature will be preferred.

#12 User is offline   Csantucci 

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

Posted 06 November 2021 - 01:17 PM

The first release of the feature is now available in ORNYMG rev. 109, for both 2D and 3D cabs.

#13 User is offline   akioyamamura 

  • Hostler
  • Group: Status: Active Member
  • Posts: 73
  • Joined: 30-August 21
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 07 November 2021 - 07:24 AM

Thank you Carlo, nice feature! Please, could you show us a cvf file as an example? I'm confuse about how to animate the screen swap in a 3D cab.

#14 User is offline   Csantucci 

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

Posted 07 November 2021 - 08:08 AM

Hi,
The 3D cab I took as example is the unfinished 3D cab that you sent me. I didn't want to use Blender or so on, so as buttons I re-used the reset, bell and sanders button.
Attached you have the part of the modified test .cvf file
Attached File  AC44i.cvf.txt (4.36K)
Number of downloads: 357
In the .s file I renamed the Reset, Bell and Sanders entries to ORTS_SCREEN_SELECT:0:0, ORTS_SCREEN_SELECT:1 and ORTS_SCREEN_SELECT:2 both in the matrices and in the animations section.
The changes I have implemented work this way:
At the beginning of the game you won't see the Reset button and the digital speedometer: in fact, they are linked to screen page "sempronio", and the active screen page is "default" (the one active at game start).
When pressing the button showing up as "semproniobell", the digital speedometer will appear as well as the reset button will appear (because they are linked to the "sempronio" screenpage, and the semproniobell button has line ORTSNewScreenPage ( "sempronio" )) and the direction multistate will disappear (because it is linked with the "default" screenpage).
If you now press the button showing up as "---reset" the button itself, the direction multistate and the direction speedometer will disappear too, because they haven't line ORTSScreenPage ( "---" ).
If you press the button showing up as "defaultsanders", the direction multistate will appear again, because it is linked to screen page "default" and the button has line ORTSNewScreenPage ( "default" ).

Concept is: the controls with no ORTSScreenPage lines will appear always;
in addition, controls with ORTSScreenPage ( "default" ) will appear at game start;
if line ORTSDisplay is missing, the control is considered as belonging to display 0;
only one screen page per display can be active;
by pressing the ORTS_SCREEN_SELECT button, the controls related to screen page shown in line ORTSNewScreenPage will appear, and the ones related to screen page previously active won't show; if you press again the same ORTS_SCREEN_SELECT button, you won't have any effect, if its newscreenpage is already active;
also ORTS_SCREEN_SELECT buttons can be linked to a screen page, so they can appear or disappear when required;
you can insert in a control more lines ORTSScreenPage: in this case, the control will appear when any of the related screen pages is active.

#15 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 944
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 07 November 2021 - 08:12 AM

 Weter, on 30 October 2021 - 01:51 AM, said:

while 3d view have, in good case, just one default viewpoint,

The camera can be moved and rotated in any direction in the 3d cab. For example, you can look at the radio settings behind your back (Masha 3d cab). Crtl or Alt + arrows. While driving a steam locomotive, I move it in a left arc to the left and look there. In the meantime, I turn around from time to time to see the water level as well. Of course, it is not always possible to get back exactly, but this has not caused any problems so far.

#16 User is offline   akioyamamura 

  • Hostler
  • Group: Status: Active Member
  • Posts: 73
  • Joined: 30-August 21
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 07 November 2021 - 10:02 AM

 Csantucci, on 07 November 2021 - 08:08 AM, said:

Hi,
The 3D cab I took as example is the unfinished 3D cab that you sent me. I didn't want to use Blender or so on, so as buttons I re-used the reset, bell and sanders button.
Attached you have the part of the modified test .cvf file
AC44i.cvf.txt
In the .s file I renamed the Reset, Bell and Sanders entries to ORTS_SCREEN_SELECT:0:0, ORTS_SCREEN_SELECT:1 and ORTS_SCREEN_SELECT:2 both in the matrices and in the animations section.
The changes I have implemented work this way:
At the beginning of the game you won't see the Reset button and the digital speedometer: in fact, they are linked to screen page "sempronio", and the active screen page is "default" (the one active at game start).
When pressing the button showing up as "semproniobell", the digital speedometer will appear as well as the reset button will appear (because they are linked to the "sempronio" screenpage, and the semproniobell button has line ORTSNewScreenPage ( "sempronio" )) and the direction multistate will disappear (because it is linked with the "default" screenpage).
If you now press the button showing up as "---reset" the button itself, the direction multistate and the direction speedometer will disappear too, because they haven't line ORTSScreenPage ( "---" ).
If you press the button showing up as "defaultsanders", the direction multistate will appear again, because it is linked to screen page "default" and the button has line ORTSNewScreenPage ( "default" ).

Concept is: the controls with no ORTSScreenPage lines will appear always;
in addition, controls with ORTSScreenPage ( "default" ) will appear at game start;
if line ORTSDisplay is missing, the control is considered as belonging to display 0;
only one screen page per display can be active;
by pressing the ORTS_SCREEN_SELECT button, the controls related to screen page shown in line ORTSNewScreenPage will appear, and the ones related to screen page previously active won't show; if you press again the same ORTS_SCREEN_SELECT button, you won't have any effect, if its newscreenpage is already active;
also ORTS_SCREEN_SELECT buttons can be linked to a screen page, so they can appear or disappear when required;
you can insert in a control more lines ORTSScreenPage: in this case, the control will appear when any of the related screen pages is active.


If i understood correctly, the ORTS_SCREEN_SELECT TWO_STATE is related to the button that change the screens. Is it correct?
But what's the hierarchy name of the object and animation that contain the screen itself? Is there a command like ORTS_SCREEN_SELECT DISPLAY or something like this?

#17 User is offline   Csantucci 

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

Posted 07 November 2021 - 11:21 AM

Yes, ORTS_SCREEN_SELECT TWO_STATE is related to the button that changes the screen pages.
To answer your second question, every screen page is the sum of the controls that have the screen page name in one of their ORTSScreenPage lines, plus the controls that reside within the display area and that have no ORTSScreenPage lines.
So you build such controls like now any other control, and insert the additional line(s) in the .cvf file blocks of such controls. At runtime it will be OR that will display only the controls related to the active screen page.

#18 User is offline   akioyamamura 

  • Hostler
  • Group: Status: Active Member
  • Posts: 73
  • Joined: 30-August 21
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 07 November 2021 - 11:49 AM

 Csantucci, on 07 November 2021 - 11:21 AM, said:

Yes, ORTS_SCREEN_SELECT TWO_STATE is related to the button that changes the screen pages.
To answer your second question, every screen page is the sum of the controls that have the screen page name in one of their ORTSScreenPage lines, plus the controls that reside within the display area and that have no ORTSScreenPage lines.
So you build such controls like now any other control, and insert the additional line(s) in the .cvf file blocks of such controls. At runtime it will be OR that will display only the controls related to the active screen page.


Ok, I understood how to make the displays appear and disappear on the screen. My problem is how to change the screen itself.
In the image bellow you can see what I want to be my first screen.

https://ibb.co/R9nfj8N

In the second image you can see what I'm planning to change the screens. It's a animation that rotates 90 degrees and display the second screen. But what's the command to do that? Sorry, maybe I'm missing something about the mechanism of this feature.

https://ibb.co/Q9TymsJ

#19 User is offline   Csantucci 

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

Posted 07 November 2021 - 01:24 PM

OK, so you mean the background of the various screenpages (the part that remains unaltered).
To do this I have at the moment only this in mind. For every background you generate a multistatedisplay control; they can all refer to the same two state variable, like e.g. CAB_RADIO. CAB_RADIO has two states, so your .ace file will have two times the background picture. Everyone of these multistatedisplay controls will have an ORTSScreenPage line with the name of the screenpage displayed.
All these controls will have the same position and animation. At every moment, only the picture of the control will be shown, that has in ORTSScreenPage the name of the screenpage selected.
I understand that it is not very elegant, and it would be better to have a new ORTSDisplay cabview control that has only one state, so that it is not necessary to repeat twice the background picture in the .ace file, but such control does not exist at the moment.

#20 User is offline   akioyamamura 

  • Hostler
  • Group: Status: Active Member
  • Posts: 73
  • Joined: 30-August 21
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 07 November 2021 - 07:26 PM

Your idea works perfectly, Carlo. I tried with the CAB_RADIO variable, but I'm trying to find a TriState or a Multistate that allows me 3 backgrouds at least. Could tell me what variable I can choose? I'm tried the "Wipers" and "pantograph 4C" without success.

  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • 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