Page 1 of 2

Railtype selection sprites & GUI

Posted: 13 Mar 2019 13:29
by Erato
peter1138 wrote:Don't forget to draw and include your custom toolbar icons. This looks a bit bland:

Image
I have never seen such a thing. Is this a patch, or part of the latest update, or...

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 14:15
by michael blunck
Erato wrote:
peter1138 wrote:Don't forget to draw and include your custom toolbar icons. This looks a bit bland:
I have never seen such a thing. Is this a patch, or part of the latest update, or...
Yeah. Makes no sense and it's pretty much redundant.

regards
Michael

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 14:34
by Erato
michael blunck wrote:
Erato wrote:
peter1138 wrote:Don't forget to draw and include your custom toolbar icons. This looks a bit bland:
I have never seen such a thing. Is this a patch, or part of the latest update, or...
Yeah. Makes no sense and it's pretty much redundant.
Quite the contrary, this seems like an amazingly useful feature to make it easier to scroll through all the tracktypes you have installed. I'd love to have this, it seems extremely useful, especially now that OpenTTD allows for up to 64 railtypes. So I was wondering what this is from.

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 17:04
by acs121
Either the latest version of RATT, either the nightlies, but I haven't played any of them.

EDIT : Turns out it's from the latest nightly. Quite cool actually.

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 17:05
by michael blunck
Erato wrote: Quite the contrary, this seems like an amazingly useful feature to make it easier to scroll through all the tracktypes you have installed. I'd love to have this, it seems extremely useful, especially now that OpenTTD allows for up to 64 railtypes. So I was wondering what this is from.
LOL. For what purpose would you "need" 64 railtypes? And seriously, information derived from a 16 x 16 icon would be quite limited. Especially in contrast to such large number.

regards
Michael

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 17:12
by acs121
michael blunck wrote:
Erato wrote:For what purpose would you "need" 64 railtypes? And seriously, information derived from a 16 x 16 icon would be quite limited. Especially in contrast to such large number.
I admit it... 64 railtypes is about useless, as even with this GRF, Maglev Track Types, Vacuum Tube or others, you're not even at 32, so unless you want to make very special-looking railtypes, 64 isn't useful.

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 17:45
by peter1138
Probably nobody needs 64 right now, however there were requests for more than 16.

When provided with appropriate icon it's somewhat prettier, as below. These icons are not new, they are provided by the default rail types and rail type sets are able to (and should) provide them too, but it seems many authors did not do so.

It's possible to provide 2x zoom icons for the GUI as well, if you want even more detail...

Image

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 18:38
by Erato
peter1138 wrote:<snip>When provided with appropriate icon it's somewhat prettier, as below. These icons are not new, they are provided by the default rail types and rail type sets are able to (and should) provide them too, but it seems many authors did not do so.
<snip>
How would one provide such sprites? There is no such callback in the NML Specs. When included, how would they be made visible?

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 13 Mar 2019 20:54
by Michi_cc
Erato wrote:How would one provide such sprites? There is no such callback in the NML Specs. When included, how would they be made visible?
It is simply one of the gui sprites (you can probably guess which from the screenshot).

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 01:53
by kamnet
michael blunck wrote:LOL. For what purpose would you "need" 64 railtypes?
See, also: "There is no reason for any individual to have a computer in his home." - Ken Olson, Digital Equipment Corporation, 1977

Give it five years and we'll have players pushing up against the 64 limit. :)

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 08:08
by michael blunck
kamnet wrote: Give it five years and we'll have players pushing up against the 64 limit. :)
I have seen Peter's screenshot of a 256 railtypes menu. :P

Given that nobody wants to use all 64 railtypes in a single game, the underlying problem seems to be that you can't pick single railtypes from a bunch of loaded railtype sets.

Would it be possible to "hide" railtypes like it is possible for vehicles? Seems to be the same motive here.

regards
Michael

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 11:06
by Erato
Michi_cc wrote:
Erato wrote:How would one provide such sprites? There is no such callback in the NML Specs. When included, how would they be made visible?
It is simply one of the gui sprites (you can probably guess which from the screenshot).
I thought as much, but I already have all 16 gui sprites drawn & defined and still nothing.

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 11:13
by peter1138
Erato wrote:I thought as much, but I already have all 16 gui sprites drawn & defined and still nothing.
This minor feature is not in any release yet. However if the icons appear in the construction tool bar correctly, it will also work in the list when it does get released. It will NOT be in 1.9.

Re: Railtype selection sprites & GUI

Posted: 14 Mar 2019 12:02
by planetmaker
On request I split this off from the original thread at viewtopic.php?f=67&t=84591

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 13:48
by Quast65
peter1138 wrote:
Erato wrote:I thought as much, but I already have all 16 gui sprites drawn & defined and still nothing.
This minor feature is not in any release yet. However if the icons appear in the construction tool bar correctly, it will also work in the list when it does get released. It will NOT be in 1.9.
Very interesting!
A tiny suggestion, could it be possible to choose what icon is shown? Either one from the gui-sprites or a custom one?

As I personally see the handyness with the 64 railtypes availability in having the same basic rails, but lots of differences in the look of signals/catenary/tunnel-entrances, etc.
So having a choice in icon would be handy (so for example tracktypes with only differences in the look of tunnels, can get a tunnel-icon in front of them).

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 16:25
by Erato
peter1138 wrote:
Erato wrote:I thought as much, but I already have all 16 gui sprites drawn & defined and still nothing.
This minor feature is not in any release yet. However if the icons appear in the construction tool bar correctly, it will also work in the list when it does get released. It will NOT be in 1.9.
How would I, as a developer, get the game to recognise these symbols. Are they a 17th gui sprite, for instance?

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 16:35
by peter1138
Erato wrote:How would I, as a developer, get the game to recognise these symbols. Are they a 17th gui sprite, for instance?
No, it's simply the existing second icon within the GUI sprites.

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 17:04
by Erato
peter1138 wrote:
Erato wrote:How would I, as a developer, get the game to recognise these symbols. Are they a 17th gui sprite, for instance?
No, it's simply the existing second icon within the GUI sprites.
I see. Seeing as it is still in development, can it be made into a separate GUI sprite, which would default to the second icon when not defined specifically?

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 17:12
by planetmaker
peter1138 wrote:
Erato wrote:How would I, as a developer, get the game to recognise these symbols. Are they a 17th gui sprite, for instance?
No, it's simply the existing second icon within the GUI sprites.
Vehicles have a provision to provide separate GUI sprites for purchase list and different GUI purposes... via callback or extra_callback_info1 in particular: https://newgrf-specs.tt-wiki.net/wiki/N ... tes_in_GUI / https://newgrf-specs.tt-wiki.net/wiki/Action2/Vehicles
Similar behaviour here sounds very reasonable.

Re: Ufiby's Road, Tram, Trolleybus and Rail track (renewed)

Posted: 14 Mar 2019 19:24
by peter1138
Quast65 wrote:tracktypes with only differences in the look of tunnels
That definitely sounds like a bad feature. A better feature would be the ability to specifically choose a tunnel head style.