Elvas Tower: Reworking the Dispatcher Window - 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.
  • 9 Pages +
  • « First
  • 7
  • 8
  • 9
  • You cannot start a new topic
  • You cannot reply to this topic

Reworking the Dispatcher Window How could we make it more intuitive? Rate Topic: -----

#81 User is offline   Looky1173 

  • Hostler
  • Group: Status: Active Member
  • Posts: 67
  • Joined: 16-May 22
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 16 December 2023 - 07:12 AM

Good evening to you too,

 Weter, on 16 December 2023 - 07:06 AM, said:

I think, dashed path drawing is a good idea. Maybe, making it thinner on greater map magnification?

Thanks, that's a good idea!

 Weter, on 16 December 2023 - 07:09 AM, said:

Hm, Do I understand it right, since multiplayer dispatcher (host) have decided, that there are enough players already - he can uncheck that box to prevent new players joining, while everyone, who have already joined will be left within multiplayer and allowed to continue current session?

Yes, exactly!

 Weter, on 16 December 2023 - 07:16 AM, said:

This would be my guess only, but...
In case of MSTS, SPSD will result instant GameOver.

That makes sense for MSTS, but I'm not sure how that could work in a multiplayer context. In any case, the current "implementation" of this option determines if there was a SPAD, but then doesn't do anything with that information...

 Weter, on 16 December 2023 - 07:36 AM, said:

Is it possible to save map customization settings for not to set the same things over and over again, at every next session?

Not yet, but that's something I want to implement in the near future. When starting this topic, I've asked if there was a preferred way to persist settings that do not fit into the Options window, but it seems like my question was missed. I'm still open to responses, though! https://www.elvastower.com/forums/public/style_emoticons/default/smile.gif

#82 User is offline   Weter 

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

Posted 16 December 2023 - 08:06 AM

I believe, that's possible, as far, F4 track monitor "remembers" somehow, did, or didn't player set signal aspects to be shown or not (did he pressed Shift-F4)

#83 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 06 January 2024 - 12:00 PM

 Looky1173, on 19 August 2023 - 07:09 AM, said:

I finally got the time to return to this and I made some progress.
To-do before the new Dispatcher window could replace the old one:
  • Persist preferences. I need some help with this too. Is there a preferred way to persist settings in OR that do not go in the Options window? Should they be saved to the registry?


Sorry this was overlooked.

The preferred way to persist settings is just to declare them along with the other hidden settings:

Attached Image: 2024-01-06 19_58_05-MS Excel with extensions - Squared1.jpg


The UserSettings properties are accessible in most places using simulator.Settings.<newSetting>. Note that there is nothing "smart" about them. You can just read and write to them like any other property, but to save them in the registry, use Settings.Save() like this:

Attached Image: 2024-01-06 19_58_16-MS Excel with extensions - Squared1.jpg


Note also in this case that the CarVibratingLevel is copied from a property of the Simulator, but there is no need for this indirection.


Hope that helps and it would be nice to have this applied to all the appropriate settings on the Map Window.

#84 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 04 March 2024 - 03:10 PM

 Looky1173, on 16 December 2023 - 08:02 AM, said:

Not yet, but that's something I want to implement in the near future. When starting this topic, I've asked if there was a preferred way to persist settings that do not fit into the Options window, but it seems like my question was missed. I'm still open to responses, though! https://www.elvastower.com/forums/public/style_emoticons/default/smile.gif


I chuckled when i read the request because I had already done it,
for the price of 4 multiplayer name out of 24 before the listbox becomes scrollable.

I've approached this new Mapview as what will need to happen before I'm happy.
1. Map customization button out of map window
2. Start up theme respected - not wanting to cycle through them
3. Default values in all the check boxes so I don't have to click them all every time.
4. Removal of the Set switch/Signal menu's and bigger font size
5. Code wise, hard coded rgb values hoisted out of functions and put to the top for easy access.

And this is how the map windows now look when I press ctrl+9, just without the customization window open
Attached Image: New_MapView_DarkStart.jpg

But to archive that I had to set default values to a dark theme

private string ThemeName = "dark"; // Start theme - Originally light


And copied the theme initialization code from rotateThemesButton_Click and put in into
MapViewer(

   InitializeData();
   // start theme
   Theme = MapThemeProvider.GetTheme(ThemeName);
   ApplyThemeRecursively(this);
   MapCanvasColor = Theme.MapCanvasColor;
   TrackPen.Color = Theme.TrackColor;
   InitializeImage();


Create some new brush colors and set the track pen width to 2
public Pen TrackPen = new Pen(Color.FromArgb(99, 99, 99),2); //  Pen width = 2
public SolidBrush SwitchBrush = new SolidBrush(Color.FromArgb(132, 157, 172));
public SolidBrush SwitchBrushSelected = new SolidBrush(Color.FromArgb(127, 209, 193));

public SolidBrush SignalBrushRed = new SolidBrush(Color.FromArgb(244, 67, 54));
public SolidBrush SignalBrushGreen  = new SolidBrush(Color.FromArgb(76, 194, 80));
public SolidBrush SignalBrushYellow = new SolidBrush(Color.FromArgb(255, 235, 59));


I think that's about it, now I'm happy and the only changes I will make to my version besides fine tuning theme colors,
is maybe decrease the amplified mouse map movement.

Code wise I see a nice total clean up, and jumping into this is nowhere as hard and confusing as the other, that seams to have started as a debug window.

I'm assuming Csantucci will incorporate this new Map viewer in the NewYear_MG at some point ?

Of course Users will still be in the woods until the values get into a external cfg file basically,
( I was just joking for my self thinking that open rails run 90% on text cfg files and seams to have hard coded values everywhere
that would be nice to have in a cfg file, I was playing with WindSpeed = 50 mph and saw some nice clouds movement yesterday.)

Thanks for a new themeed map viewer with a real close button.

#85 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 04 March 2024 - 03:42 PM

 Weter, on 04 March 2024 - 03:30 PM, said:

I like "Side route" background color on tab - it provides some warning, as speed should be lower at diverged switch.
this one looks better - for me.

Sounds like you have picked up my intent, looking at the signal window i thought in the same terms straight/mainline green/blue clear go matching switch colors vs divergent - yellowish caution.

 Weter, on 04 March 2024 - 03:53 PM, said:

Yes, that was exactly, what I thought.
but, as I told Yesterday - we should care to avoid possible confusion with signal colors - for clear distinction of switches/signals on large station throats.

I was just looking at the train and thought the same, looks to much like signals colors, I will adjust them if it don't signal something with there strong red/green colors,
I want the signal to be very clear vs everything else, kind like a traffic display, same with switches and trains route, not sure I'm a fan of the broken line since it looks like at long freight train zoomed out, maybe that's just habit or the color is to similar to platforms.

#86 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 05 March 2024 - 03:28 PM

 cjakeman, on 06 January 2024 - 12:00 PM, said:

The preferred way to persist settings is just to declare them along with the other hidden settings:


Thanks, I can now control WindSpeed from windows RegEditor.exe
Attached Image: RegKey_WindSpeed.jpg

Some observation made during this successful attempt:
1. The function Settings.Save("VariableName") only works meaning creates a reg key if the value is different from the default, set in Usersettings.cs
2. Don't user floats , use ints and a float cast. The error box is quite clear and have usersettings in first line.

To externalize Windspeed I did the following:
Usersettings.cs
    // ExRail settings
    [Default(0)]
    public int ExWindSpeed { get; set; }

Sky.cs

public SkyViewer(Viewer viewer)
{
   // Default wind speed and direction - 5.0f m/s (approx 11 mph)
   WindSpeed = (float) Program.Simulator.Settings.ExWindSpeed;
   // Force a regkey creation
   if (Program.Simulator.Settings.ExWindSpeed == 0 ) Program.Simulator.Settings.ExWindSpeed = 5;
   Program.Simulator.Settings.Save("ExWindSpeed");
   //
   mstsskywindDirection = 4.7f; // radians (approx 270 deg, i.e. westerly)



Now it should be easy to make WindSpeed & Direction adjustable from the Menu program weather option,
witch is next step, since regedit is a hack, but at least I don't have to recompile to test.

#87 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 156
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 05 March 2024 - 05:36 PM

The dark themed MapWindow in it's natural night habitat now with a dark titlebar.
I looked into making the titlebar dark in code:

https://stackoverflo...r-on-windows-10
Screw that, so now I've adjusted the titlebar colors in Windows 10 it self, I'm running dark theme anyway,
and will for sure repeat this at work where I have problems with overlapping window's black title bars and telling there order from each other.
https://onmsft.com/h...-accent-colour/

Attached Image: DarkThemeInUse.jpg

  • 9 Pages +
  • « First
  • 7
  • 8
  • 9
  • 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