Patch: new stations GUI

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Patch: new stations GUI

Post by thomasdev »

i wrote a patch that modifies the stations GUI. Features so far:
- bigger waiting list
- new, combined cargo list
- new stats function

known bugs:
- transferred cargo gets a rating (is it a bug or a feature?)

notes:
- stats are not recorded into the savegame in any way. This means the stats are reseted if you load a game.

pictures say more than words, so have a look:
Image

Image

Image

more pictures, patch and some windows binary there:
http://modclub.rigsofrods.com/thomas/.34759265/

the patch:
http://modclub.rigsofrods.com/thomas/.34759265/gui.diff

in order to test it

Code: Select all

svn co svn://svn.openttd.org/trunk ottd-svn
cd ottd-svn
wget http://modclub.rigsofrods.com/thomas/.34759265/gui.diff
patch -p0 < gui.diff
./configure && make 
...
EDIT's:
version 2: fixed a little font glitch (made top row buttons one pixel higher)
version 3: scrollbar working
version 4: monthly and yearly stats integrated
version 5: fixed patch to conform ottd's styleguide
version 6: fixed yearly stats: working yearly now, not monthly as before
version 7: fixed minor glitch where cargo icon was drawn into the text
version 8: put new strings together into one section, applied a naming convention
version 9: cleaned patch and improved comments a bit
version 10: fixed three more overflow bugs
version 11: thanks to the reviews of Yexu in IRC: the code is now compatible with the openttd coding style
version 12: improved scrollbar: now disables, correct scrolling when resizing. Also created little indention for cargo
Last edited by thomasdev on 11 Nov 2008 01:44, edited 17 times in total.
Donoteat
Engineer
Engineer
Posts: 90
Joined: 04 Feb 2007 19:10

Re: Patch: new stations GUI

Post by Donoteat »

Interesting...

What exactly does the stats function do? It looks like it tells you how much cargo has been generated at that station over time, but it isn't all that clear...
thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Re: Patch: new stations GUI

Post by thomasdev »

Donoteat wrote:Interesting...

What exactly does the stats function do? It looks like it tells you how much cargo has been generated at that station over time, but it isn't all that clear...
ATM it tells you how much cargo was generated at the station, how much cargo was received at the station (as final target) and how much cargo was put on storage there (transferred) during the running month.

The next update will add three little buttons i think, so you can see the current month, the last month and the yearly values.
thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Re: Patch: new stations GUI

Post by thomasdev »

version 3 released:
- scrollbars now fully working
- no more overdrawn content
(for download see post #1, same file)

====
version 4 released:
- monthly and yearly stats working, buttons added to GUI
- minor fixes (tab style)
Image

====
version 5 released:
- only styleguide changes for the code

====
version 6-7 released
audigex
Tycoon
Tycoon
Posts: 2010
Joined: 09 Dec 2007 21:28
Contact:

Re: Patch: new stations GUI

Post by audigex »

I like it, good work :)
Jon
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Patch: new stations GUI

Post by CommanderZ »

Cargodest branch is (hopefully) not far from being merged with trunk and it changes the station GUI significantly. Are you aware of that? Your patch looks nice, but I'm afraid it could fall in vain because of that.
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Patch: new stations GUI

Post by Aali »

Cargodest doesn't actually change that much, it's pretty much just the list in the "Waiting" tab that will be different, so it should be relatively easy to adapt this patch when cargodest gets into trunk.

Oh and, nice patch :P
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Patch: new stations GUI

Post by CommanderZ »

Aali wrote:Cargodest doesn't actually change that much, it's pretty much just the list in the "Waiting" tab that will be different, so it should be relatively easy to adapt this patch when cargodest gets into trunk.

Oh and, nice patch :P
And that is exactly what this patch changes ;)
thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Re: Patch: new stations GUI

Post by thomasdev »

CommanderZ wrote:
Aali wrote:Cargodest doesn't actually change that much, it's pretty much just the list in the "Waiting" tab that will be different, so it should be relatively easy to adapt this patch when cargodest gets into trunk.

Oh and, nice patch :P
And that is exactly what this patch changes ;)
AFAIK it 'just' adds a new tree view like control to the waiting list. Since this patch only removes the waiting list header "Waiting:", i think it should be easy to port.

also: new version uploaded :)
Antdovu
Engineer
Engineer
Posts: 19
Joined: 28 May 2008 19:54

Re: Patch: new stations GUI

Post by Antdovu »

Windows binary for those interested and not able to compile:
gui_patch_win32.zip
windows binary
(2.71 MiB) Downloaded 263 times
Attachments
Noob Transport, 20th Jan 2137.png
(133.88 KiB) Downloaded 267 times
Antdovu Domination, 2nd Jul 2158.png
(116.99 KiB) Downloaded 235 times
thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Re: Patch: new stations GUI

Post by thomasdev »

Antdovu wrote:Windows binary for those interested and not able to compile:
gui_patch_win32.zip
thank you very much (i only have linux available)! :)

also, there seems to be a bug with the transferred goods: if you say "unload, leave empty" it goes into the transferred category and not in the incoming, where it should go.
User avatar
prissi
Chief Executive
Chief Executive
Posts: 647
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Re: Patch: new stations GUI

Post by prissi »

Finally somebody who overhauls the Station gui. Well layouted imho, much clearer than the original one.
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com
iNVERTED
Route Supervisor
Route Supervisor
Posts: 387
Joined: 24 Apr 2005 21:21
Location: Torquay, England
Contact:

Re: Patch: new stations GUI

Post by iNVERTED »

Very nice - I'd recommend putting the this month/last month/last year into a dropdown activated when you clicked the "Stats" tab, just to tidy things up more (and this would probably make it easier to customize the list of ranges to view).

Is there any plan to put this in the trunk? I make a habit of not patching because it tends to break things (AFAIK).
thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Re: Patch: new stations GUI

Post by thomasdev »

what are your ideas for station stats? i mean we should put some meaningful in there and not just the ones i implemented?
Antdovu
Engineer
Engineer
Posts: 19
Joined: 28 May 2008 19:54

Re: Patch: new stations GUI

Post by Antdovu »

thomasdev wrote:what are your ideas for station stats? i mean we should put some meaningful in there and not just the ones i implemented?
It would be great to have graphs showing the amount of cargo being handled by stations. Expanding on that: cargo handled by road vehicles, trains, ships etc (and still keep the composite one).
Ruudjah
Engineer
Engineer
Posts: 44
Joined: 12 Nov 2007 11:09

Re: Patch: new stations GUI

Post by Ruudjah »

Where are the ratings?
thomasdev
Engineer
Engineer
Posts: 26
Joined: 15 Feb 2006 11:05

Re: Patch: new stations GUI

Post by thomasdev »

Antdovu wrote:
thomasdev wrote:what are your ideas for station stats? i mean we should put some meaningful in there and not just the ones i implemented?
It would be great to have graphs showing the amount of cargo being handled by stations. Expanding on that: cargo handled by road vehicles, trains, ships etc (and still keep the composite one).
nice idea, thanks :)
Ruudjah wrote:Where are the ratings?
look at the first screenshot "cargos" category.
i was thinking of moving the supplied above the accepted cargo, as its more used?
rokku
Engineer
Engineer
Posts: 23
Joined: 12 Mar 2006 05:38
Location: London, UK
Contact:

Re: Patch: new stations GUI

Post by rokku »

Sorry to be a party pooper, but I think when you click on a station it should tell you all the information you need on one page, to reduce mouse clicking.

R :)
Check out the NEW GALLIFREY multiplayer server if you like DOCTOR WHO.

PRISONER: CELL BLOCK H Back in your cell Smith!!
"If I had a bulldog with a face as ugly as hers I'd shave its backside and teach it to walk backwards!"

DOCTOR WHO FORUM Best Doctor Who forum on the net!!
DISCWORLD Great books!! PREMIUM BONDS Not the lottery!!
el koeno
Route Supervisor
Route Supervisor
Posts: 454
Joined: 24 Sep 2004 15:47

Re: Patch: new stations GUI

Post by el koeno »

thomasdev wrote:
Ruudjah wrote:Where are the ratings?
look at the first screenshot "cargos" category.
i was thinking of moving the supplied above the accepted cargo, as its more used?
Good point. Cargo waiting is used more.

Also, I agree with Rokku. The stats can have their own tab, but ratings and cargo waiting should be integrated. So IMO there should be two tabs. One should be like this:

Cargo waiting:
Coal (rating)%
=======amount

Cargo accepted:
Passengers

The other would be your stats thing. Graphs would be nice. Perhaps some income statistic would be nice too? Or trains handled? Not sure if this is possible at all, they're just random suggestions.
User avatar
AlexW
Traffic Manager
Traffic Manager
Posts: 213
Joined: 20 Feb 2007 07:59
Location: Newbury, UK

Re: Patch: new stations GUI

Post by AlexW »

Would it be worth having an option to view a "since time began" tab in the stats page? I.e. in addition to being able to see how much cargo has been delivered in this month, last month, and last year, you can see how much cargo has been transferred since the moment you placed that station?

Could be an interesting talking point in the game, perhaps the basis of future competitions to see who could drive the most cargo through one station in a game?
Hooked on Transport Tycoon since 1994
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 30 guests