News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[Patch] Compare players in finances window

Started by isidoro, January 19, 2009, 05:24:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

isidoro

A patch heading towards multiplayer: as you can see in the image, a white button appears in the players' window.  The button leads to finance statistics about all players together as well as the possibility to compare one item in all players.

Incidentally, the screenshot is taken from a game in which:
- Yellow deals with in-city passenger transport
- Red deals with inter-city passenger transport
- Green deals with sea transport
- Violet deals with air transport
- Rest of players deal with goods land transport

The patch is not yet finished.  I would like to be able to keep at most one button selected when in all_players and compare mode.


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

Final version of the patch.  Now, only one button is kept active in compare mode.  Moreover, selection is remembered just like other finances windows.  Hope you like it.

gerw

In your patch you save the finance history of each player twice: once in the player_t object and once in the static player_t variable. Is this really needed?

isidoro

I don't understand you.

Information is only stored once.  The static variable holds only the total amount of all players.

gerw

Quote from: isidoro on January 20, 2009, 08:29:42 PM
Information is only stored once.  The static variable holds only the total amount of all players.

Ok, then I misunderstood your code ;)
Maybe you name it sum_finance_history_* or overall_finance_history_*?

prissi

Maybe this window should be just shown for the public player, as its finances have not meaning anyway.

isidoro

Or perhaps, instead of the public player's.  Keeping the "All" label, and skipping the "public player" button.

But I wouldn't replace public player functionality.  Now, that window is not used, but nobody knows if that space or information would be needed in the future for multiplayer.


prissi

The longer I look at it, the less I like to misuse this window. I think the data should be taken from a dropdown, and on the right there should be some buttons to exclude/include players for comparisons. This one here breaks the player expectations on too many levels I fear.

isidoro

Yes.  It can be taken away to other place. Or change the way the information is presented since only one quantity can be compared at the same time.  Besides, rethinking again, my idea to suppress "Public Service" button makes no sense: the button to switch to this player  would disappear too.

Or two buttons: Total and Compare.  The second with the same functionality of the compare but with the interface you propose (combo+select players)...

prissi


isidoro

I have put the last one that I have in here:http://simutrans-germany.com/files/upload/all2.patch.zip, but it's for r2243, I'm afraid...