Managing multiple screen pages on a display in 2D and 3D cabs
#11
Posted 02 November 2021 - 08:53 AM
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
Posted 06 November 2021 - 01:17 PM
#13
Posted 07 November 2021 - 07:24 AM
#14
Posted 07 November 2021 - 08:08 AM
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 (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
Posted 07 November 2021 - 08:12 AM
Weter, on 30 October 2021 - 01:51 AM, said:
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
Posted 07 November 2021 - 10:02 AM
Csantucci, on 07 November 2021 - 08:08 AM, said:
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
Posted 07 November 2021 - 11:21 AM
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
Posted 07 November 2021 - 11:49 AM
Csantucci, on 07 November 2021 - 11:21 AM, said:
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
Posted 07 November 2021 - 01:24 PM
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
Posted 07 November 2021 - 07:26 PM