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.
  • 7 Pages +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 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: -----

#71 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,027
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 16 October 2023 - 06:28 AM

View Postcjakeman, on 15 October 2023 - 08:14 AM, said:

Next, I'll have a look at the Map Window translations. Since it was originally just a Debug Window, I don't think it ever had translations working.


I've got the translations in the MapForm to work now on my PC, as in the first image.

Attached Image: 2023-10-16 15_22_28-Open Rails.jpg


Windows Forms require an extra statement and you have to run Localizer.Localize() on the appropriate catalog after you initialize the form - see code diff below.

Attached Image: 2023-10-16 15_24_37-GitHub Desktop.jpg

Hope this helps,

#72 User is offline   Looky1173 

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

Posted 24 October 2023 - 05:10 AM

View Postcjakeman, on 16 October 2023 - 06:28 AM, said:

Windows Forms require an extra statement and you have to run Localizer.Localize() on the appropriate catalog after you initialize the form - see code diff below.

Thank you for your help Chris, I finally got translations working! However, they do not work with dropdown menus (ContextMenuStrip), and I can't find anything online for why should this be.

In general, the new Map window has reached feature parity with the old one (as of the build after U2023.10.24-0407), so please test it and let me know of any bugs! I will soon remove the old Dispatcher if everyone's satisfied with the new one. Additional features for the new window will come in subsequent PRs (pull requests).

#73 User is offline   Weter 

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

Posted 24 October 2023 - 12:18 PM

Szervusz, Gergely.
>Drop-down menus
They should have get text tags, as I can see.

#74 User is offline   Csantucci 

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

Posted 10 December 2023 - 12:56 PM

Maybe I have lost some related post, but where can I find the Daylight offset box in the new Map Window?

#75 User is offline   Looky1173 

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

Posted 11 December 2023 - 03:48 AM

View PostCsantucci, on 10 December 2023 - 12:56 PM, said:

Maybe I have lost some related post, but where can I find the Daylight offset box in the new Map Window?

It's now a key combination, like the other debug actions:

Attached Image: Screenshot 2023-12-11 124402.jpg

#76 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,027
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 11 December 2023 - 07:17 AM

View PostLooky1173, on 11 December 2023 - 03:48 AM, said:

It's now a key combination, like the other debug actions:

So that you can use it without opening the Map Window.


Glad you find it useful.


#77 User is offline   Csantucci 

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

Posted 11 December 2023 - 12:27 PM

Thanks, Gergely.

#78 User is offline   Weter 

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

Posted 16 December 2023 - 05:47 AM

Hello.
I'm grateful to authors for this new window - the next step for such long-awaited 2-d viewer.
I hope, some day it will become standalone option to run the game - very useful as a low-resource consumption testing environment for activity/timetables debugging.
Pair of issues, partially tied with translation:
Attached Image: мп.jpgAttached Image: м.jpg
Drawn path now is light-blue (instead of red before) dashed line, platforms are light-light blue and very thin highlight - They both are looking the same now!:(.
So it's hard to see platforms on map.

What "Allow new players to join" and "Penalty for speeding && SPAD" actually mean?
I have to re-phrase those for fitting fields, but the Manual tells no details.

#79 User is offline   Looky1173 

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

Posted 16 December 2023 - 06:57 AM

Hi Weter,

I appreciate your feedback, and will look into making platforms stand out more. By the way, do you like the dashed path, or would you prefer it to be drawn as a solid line as in the old Map window?

"Allow new players to join" controls whether players who aren't in the multiplayer server may join the session. If it's checked (it is by default), people will be able to join your multiplayer session normally. If it's unchecked, the server will refuse any new connections and those who attempt to join will start in the classic offline single player mode instead.

I copied "Penalty for speeding & SPAD" (the double ampersand && is necessary as explained here, but I should probably change it to the second solution to avoid confusion) from the old Map window. However, I've just done some digging into the code and it appears that this option actually does nothing. Essentially, in its current state, it's a waste of CPU time. It would be interesting to hear from a developer who knows more about why this option was added and if it is still needed or not.

#80 User is offline   Weter 

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

Posted 16 December 2023 - 07:06 AM

Good evening, Gergely!
Thanks for interest.
I think, dashed path drawing is a good idea. Maybe, making it thinner on greater map magnification?

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?

#81 User is offline   Looky1173 

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

Posted 16 December 2023 - 07:12 AM

Good evening to you too,

View PostWeter, 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!

View PostWeter, 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!

View PostWeter, 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...

View PostWeter, 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 Group
  • Posts: 8,848
  • 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 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,027
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 06 January 2024 - 12:00 PM

View PostLooky1173, 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: Posts: Active Member
  • Posts: 188
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 04 March 2024 - 03:10 PM

View PostLooky1173, 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: Posts: Active Member
  • Posts: 188
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 04 March 2024 - 03:42 PM

View PostWeter, 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.

View PostWeter, 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.

  • 7 Pages +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 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