Schall Railway Controller


Assist train organizations and dispatches. Adds a GUI listing idling and stalled trains (or other customizable filters). Displays train status, for easy and quick schedule inspection and assignment. (Locale: English, Deutsch, 正體中文, 简体中文, Português Brasileiro)

Utilities
2 years ago
0.17 - 1.1
4.00K
Trains

i [Pending] wishlist: "show/hide" filter buttons in top-right show their "on/off" status

3 years ago

G'day. A bunch of things use a yellow, pressed-down look for an active toggle. The filter show/hide things in your display don't, which makes it a little harder to tell which one turns off the currently displayed filter options. Be nice to see that show the state.

3 years ago

Do you mean the small "frame-action-button" (together with close button) on the window title bar?

I try to make the style consistent with the vanilla counterparts, and it seems no vanilla GUI uses toggle styles in "frame-action-button".

The other problem being the current game API actually does NOT expose toggle state of GUI button. (Yes, current API really lacks a lot of almost essential things. The GUI part is rather basic...) Vanilla "toggle exoskeleton" & "toggle roboport" uses toggle state in GUI button; but mods cannot use that in our own GUIs. I actually have to use extra script to change the style of the train status buttons on-fly, and need to use global variables to store the state of every of these buttons! (A mature programming language, like C#, would have already handled that. That's why I said Factorio GUI API is rather basic.)
It is certainly quite bothersome. So I prefer not to use that too much, unless it is really necessary.

PS: There are many other IMO essential fundamental features missing in the Factorio GUI API. Say GUI tables does NOT have the concept of rows and columns (only got cells...), no header row/column, no row/column spanning, no row sorting... I wanted to have table sorting in the railway GUI, so to sort trains by name, cargo contents, or whatever. However, this is not supported by the GUI API. (Or else I have to write my own scripts to construct sorted table on-fly, at the cost of extra processing time.) So then I decided not to get myself into this kind of trouble. It is so difficult to implement a lot of things without support from the fundamental features.

3 years ago

https://imgur.com/a/ab4b6tK -- topmost is your mod; middle is raiguards LTN GUI -- the button for "auto-refresh" remains pressed when active. The third is obviously the shortcut toggles, which as you noted have color also.

I agree that the GUI is very basic, and of course I understand if you don't have the enthusiasm to go ahead and implement all that stuff yourself! Thanks for considering it. I also appreciate -- but don't demand -- the explanation of why. Thank you again.

3 years ago

LTN GUI is not vanilla style. (And it is using the same hack like what mentioned above: modifying button style on-fly, as what I did to the status buttons.)
Shortcut buttons are not in the same style. They are white in background; while the frame buttons are black in background.

Anyway, not having the style is not the big problem, not much work to create one.
Still, having to manually store the state is the bigger one. I may come back to it when I have that kind of time.

3 years ago

Of course!

New response